@@ -36,7 +36,7 @@ class SlackApi
3636 private const SLACK_COMPLETE_UPLOAD_EXTERNAL = 'https://slack.com/api/files.completeUploadExternal ' ;
3737 private const SLACK_POST_MESSAGE_URL = 'https://slack.com/api/chat.postMessage ' ;
3838
39- private const SLACK_TIMEOUT = 5000 ;
39+ private const SLACK_TIMEOUT = 5 ;
4040
4141 public function __construct (
4242 #[\SensitiveParameter]
@@ -60,7 +60,7 @@ public function uploadFile(string $subject, string $fileName, string $fileConten
6060 return $ this ->completeUploadExternal ($ channel , $ subject );
6161 }
6262
63- $ this ->logger ->debug ('Unable to send ' . $ fileName . ' report to Slack ' );
63+ $ this ->logger ->info ('Unable to send ' . $ fileName . ' report to Slack ' );
6464
6565 return false ;
6666 }
@@ -87,7 +87,7 @@ public function getUploadURLExternal(string $fileName, int $fileLength): string
8787 ['Content-Type ' => 'multipart/form-data ' ]
8888 );
8989 } catch (\Exception $ e ) {
90- $ this ->logger ->debug ('Slack error getUploadURLExternal: ' . $ e ->getMessage ());
90+ $ this ->logger ->error ('Slack error getUploadURLExternal: ' . $ e ->getMessage ());
9191 return '' ;
9292 }
9393
@@ -120,7 +120,7 @@ public function sendFile(string $uploadURL, string $fileContents): bool
120120 true
121121 );
122122 } catch (\Exception $ e ) {
123- $ this ->logger ->debug ('Slack error sendFile: ' . $ e ->getMessage ());
123+ $ this ->logger ->error ('Slack error sendFile: ' . $ e ->getMessage ());
124124 return false ;
125125 }
126126
@@ -151,7 +151,7 @@ public function completeUploadExternal(string $channel, string $subject): bool
151151 ['Content-Type ' => 'multipart/form-data ' ]
152152 );
153153 } catch (\Exception $ e ) {
154- $ this ->logger ->debug ('Slack error completeUploadExternal: ' . $ e ->getMessage ());
154+ $ this ->logger ->error ('Slack error completeUploadExternal: ' . $ e ->getMessage ());
155155 return false ;
156156 }
157157
@@ -171,7 +171,7 @@ public function completeUploadExternal(string $channel, string $subject): bool
171171 public function sendMessage (string $ message , string $ channel ): bool
172172 {
173173 if (empty ($ message ) || empty ($ channel )) {
174- $ this ->logger ->debug ('Empty message or channel for sending message ' );
174+ $ this ->logger ->info ('Empty message or channel for sending message ' );
175175 return false ;
176176 }
177177
@@ -187,7 +187,7 @@ public function sendMessage(string $message, string $channel): bool
187187 ['Content-Type ' => 'multipart/form-data ' ]
188188 );
189189 } catch (\Exception $ e ) {
190- $ this ->logger ->debug ('Slack error sendMessage: ' . $ e ->getMessage ());
190+ $ this ->logger ->error ('Slack error sendMessage: ' . $ e ->getMessage ());
191191 return false ;
192192 }
193193
0 commit comments