@@ -29,6 +29,7 @@ public function format(array $record)
29
29
protected function composeStyle (array $ record )
30
30
{
31
31
$ level = $ record ['level ' ];
32
+ $ level_name = $ record ['level_name ' ];
32
33
33
34
return "<link href='https://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
34
35
<style>
@@ -37,11 +38,13 @@ protected function composeStyle(array $record)
37
38
font-size: 16px;
38
39
}
39
40
.title, .subtitle {
40
- background: {$ this ->logLevels [$ level ]};
41
41
color: #ffffff;
42
42
margin: 0px;
43
43
padding: 15px;
44
44
}
45
+ .title. {$ level_name }, .subtitle. {$ level_name } {
46
+ background: {$ this ->logLevels [$ level ]};
47
+ }
45
48
.details-row {
46
49
text-align: left;
47
50
font-size: 16px;
@@ -63,7 +66,7 @@ protected function composeStyle(array $record)
63
66
protected function composeTitle (array $ record )
64
67
{
65
68
$ levelName = e ($ record ['level_name ' ]);
66
- $ title = "<h2 class='title'> {$ levelName }</h2> " ;
69
+ $ title = "<h2 class='title { $ levelName } '> {$ levelName }</h2> " ;
67
70
68
71
$ environment = app ()->environment ();
69
72
if ($ environment == 'production ' ) {
@@ -72,7 +75,7 @@ protected function composeTitle(array $record)
72
75
73
76
$ environment = e (str_upper ($ environment ));
74
77
$ title .= '<style>.title { padding-bottom: 0px !important; } .subtitle { padding-top: 0px !important; }</style> ' ;
75
- $ title .= "<h3 class='subtitle'>This notification was sent from ` {$ environment }` environment!</h3> " ;
78
+ $ title .= "<h3 class='subtitle { $ levelName } '>This notification was sent from ` {$ environment }` environment!</h3> " ;
76
79
77
80
return $ title ;
78
81
}
0 commit comments