33
44class Slack {
55 public function Default (string $ content , $ fileContent = false , $ fields = [], string $ type = "" , string $ name = "LaravelLogger " ){
6- (new \App \NotifySlack ("" ))->notify (new \App \Notifications \SlackNotification ($ content , $ fileContent , $ fields , $ type , $ name , "Default " ));
6+ try {
7+ (new \App \NotifySlack ("" ))->notify (new \App \Notifications \SlackNotification ($ content , $ fileContent , $ fields , $ type , $ name , "Default " ));
8+ } catch (\Throwable $ th ) {
9+ // なにもしない
10+ }
711 }
12+
813 public function Debug (string $ content , $ fileContent = false , $ fields = [], string $ type = "" , string $ name = "LaravelLogger " ){
9- (new \App \NotifySlack ("debug " ))->notify (new \App \Notifications \SlackNotification ($ content , $ fileContent , $ fields , $ type , $ name , "Debug " ));
14+ try {
15+ (new \App \NotifySlack ("debug " ))->notify (new \App \Notifications \SlackNotification ($ content , $ fileContent , $ fields , $ type , $ name , "Debug " ));
16+ } catch (\Throwable $ th ) {
17+ // なにもしない
18+ }
1019 }
20+
1121 public function Info (string $ content , $ fileContent = false , $ fields = [], string $ type = "" , string $ name = "LaravelLogger " ){
12- (new \App \NotifySlack ("info " ))->notify (new \App \Notifications \SlackNotification ($ content , $ fileContent , $ fields , $ type , $ name , "Info " ));
22+ try {
23+ (new \App \NotifySlack ("info " ))->notify (new \App \Notifications \SlackNotification ($ content , $ fileContent , $ fields , $ type , $ name , "Info " ));
24+ } catch (\Throwable $ th ) {
25+ // なにもしない
26+ }
1327 }
28+
1429 public function Notice (string $ content , $ fileContent = false , $ fields = [], string $ type = "" , string $ name = "LaravelLogger " ){
15- (new \App \NotifySlack ("notice " ))->notify (new \App \Notifications \SlackNotification ($ content , $ fileContent , $ fields , $ type , $ name , "Notice " ));
30+ try {
31+ (new \App \NotifySlack ("notice " ))->notify (new \App \Notifications \SlackNotification ($ content , $ fileContent , $ fields , $ type , $ name , "Notice " ));
32+ } catch (\Throwable $ th ) {
33+ // なにもしない
34+ }
1635 }
36+
1737 public function Warning (string $ content , $ fileContent = false , $ fields = [], string $ type = "" , string $ name = "LaravelLogger " ){
18- (new \App \NotifySlack ("warning " ))->notify (new \App \Notifications \SlackNotification ($ content , $ fileContent , $ fields , $ type , $ name , "Warning " ));
38+ try {
39+ (new \App \NotifySlack ("warning " ))->notify (new \App \Notifications \SlackNotification ($ content , $ fileContent , $ fields , $ type , $ name , "Warning " ));
40+ } catch (\Throwable $ th ) {
41+ // なにもしない
42+ }
1943 }
44+
2045 public function Error (string $ content , $ fileContent = false , $ fields = [], string $ type = "" , string $ name = "LaravelLogger " ){
21- (new \App \NotifySlack ("error " ))->notify (new \App \Notifications \SlackNotification ($ content , $ fileContent , $ fields , $ type , $ name , "Error " ));
46+ try {
47+ (new \App \NotifySlack ("error " ))->notify (new \App \Notifications \SlackNotification ($ content , $ fileContent , $ fields , $ type , $ name , "Error " ));
48+ } catch (\Throwable $ th ) {
49+ // なにもしない
50+ }
2251 }
52+
2353 public function Critical (string $ content , $ fileContent = false , $ fields = [], string $ type = "" , string $ name = "LaravelLogger " ){
24- (new \App \NotifySlack ("critical " ))->notify (new \App \Notifications \SlackNotification ($ content , $ fileContent , $ fields , $ type , $ name , "Critical " ));
54+ try {
55+ (new \App \NotifySlack ("critical " ))->notify (new \App \Notifications \SlackNotification ($ content , $ fileContent , $ fields , $ type , $ name , "Critical " ));
56+ } catch (\Throwable $ th ) {
57+ // なにもしない
58+ }
2559 }
60+
2661 public function Alert (string $ content , $ fileContent = false , $ fields = [], string $ type = "" , string $ name = "LaravelLogger " ){
27- (new \App \NotifySlack ("alert " ))->notify (new \App \Notifications \SlackNotification ($ content , $ fileContent , $ fields , $ type , $ name , "Alert " ));
62+ try {
63+ (new \App \NotifySlack ("alert " ))->notify (new \App \Notifications \SlackNotification ($ content , $ fileContent , $ fields , $ type , $ name , "Alert " ));
64+ } catch (\Throwable $ th ) {
65+ // なにもしない
66+ }
2867 }
68+
2969 public function Emergency (string $ content , $ fileContent = false , $ fields = [], string $ type = "" , string $ name = "LaravelLogger " ){
30- (new \App \NotifySlack ("emergency " ))->notify (new \App \Notifications \SlackNotification ($ content , $ fileContent , $ fields , $ type , $ name , "Emergency " ));
70+ try {
71+ (new \App \NotifySlack ("emergency " ))->notify (new \App \Notifications \SlackNotification ($ content , $ fileContent , $ fields , $ type , $ name , "Emergency " ));
72+ } catch (\Throwable $ th ) {
73+ // なにもしない
74+ }
3175 }
32- }
76+ }
0 commit comments