-
Notifications
You must be signed in to change notification settings - Fork 1
/
teams_logger.php
executable file
·100 lines (93 loc) · 3.29 KB
/
teams_logger.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?php
use Kopitar\LaravelTeamsLogger\Style\Color;
use Kopitar\LaravelTeamsLogger\Style\Avatar;
return [
/*
|--------------------------------------------------------------------------
| Log Name
|--------------------------------------------------------------------------
| Name of logger, also used as title/summary in messages of type 'card'
|
| Allowed value: string (default: Teams Logger)
|
*/
'name' => env('TEAMS_LOG_NAME', 'Teams Logger'),
/*
|--------------------------------------------------------------------------
| Log Type
|--------------------------------------------------------------------------
| Sets one of three types of log messages
|
| Allowed value: 'simple' (default), 'card' and 'json'
|
*/
'type' => env('TEAMS_LOG_TYPE', 'simple'),
/*
|--------------------------------------------------------------------------
| Webhook POST request retries
|--------------------------------------------------------------------------
| Number of retries if request to Teams webhook fails
|
| Allowed value: integer (default: 0)
|
*/
'retries' => env('TEAMS_RETRIES', 0),
/*
|--------------------------------------------------------------------------
| Use markdown
|--------------------------------------------------------------------------
| Disable or enable markdown in messages
|
| Allowed value: boolean (default: true)
|
*/
'use_markdown' => env('TEAMS_MARKDOWN', true),
/*
|--------------------------------------------------------------------------
| Use Avatar
|--------------------------------------------------------------------------
| Display avatar image in messages of type 'card'
|
| Allowed value: boolean (default: true)
|
*/
'use_avatar' => env('TEAMS_AVATAR', true),
/*
|--------------------------------------------------------------------------
| Log message colors
|--------------------------------------------------------------------------
| Colors for all of the available log levels
|
| Allowed values: hex color codes (example: #721C24)
|
*/
'colors' => [
'emergency' => Color::fromLevel('EMERGENCY'),
'alert' => Color::fromLevel('ALERT'),
'critical' => Color::fromLevel('CRITICAL'),
'error' => Color::fromLevel('ERROR'),
'warning' => Color::fromLevel('WARNING'),
'notice' => Color::fromLevel('NOTICE'),
'info' => Color::fromLevel('INFO'),
'debug' => Color::fromLevel('DEBUG'),
],
/*
|--------------------------------------------------------------------------
| Log message avatars
|--------------------------------------------------------------------------
| Avatar images for all of the available log levels
|
| Allowed values: URL of avatar image
|
*/
'avatars' => [
'emergency' => Avatar::fromLevel('EMERGENCY'),
'alert' => Avatar::fromLevel('ALERT'),
'critical' => Avatar::fromLevel('CRITICAL'),
'error' => Avatar::fromLevel('ERROR'),
'warning' => Avatar::fromLevel('WARNING'),
'notice' => Avatar::fromLevel('NOTICE'),
'info' => Avatar::fromLevel('INFO'),
'debug' => Avatar::fromLevel('DEBUG'),
]
];