Skip to content

Commit 84fe9fb

Browse files
committed
Update config documentation
1 parent 3fc62cf commit 84fe9fb

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

src/Resources/config.php

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,26 +71,90 @@
7171
*/
7272
'filterType' => 'whitelist',
7373

74+
/*
75+
|--------------------------------------------------------------------------
76+
| Log driver for cron outputs
77+
|--------------------------------------------------------------------------
78+
|
79+
| Log drivers may be none, database, laravelLog or file
80+
|
81+
*/
7482
'defaultCronOutput' => 'database',
7583

7684
'cronOutputs' => [
85+
/*
86+
|--------------------------------------------------------------------------
87+
| Log driver: none
88+
|--------------------------------------------------------------------------
89+
|
90+
| With this option the package will not log any information
91+
|
92+
*/
7793
'none' => [],
7894

95+
/*
96+
|--------------------------------------------------------------------------
97+
| Log driver: database
98+
|--------------------------------------------------------------------------
99+
|
100+
| With this option the package will log all the outputs to database,
101+
| You can truncate the output
102+
|
103+
*/
79104
'database' => [
80105
'truncate' => false,
81106
],
82107

108+
/*
109+
|--------------------------------------------------------------------------
110+
| Log driver: laravelLog
111+
|--------------------------------------------------------------------------
112+
|
113+
| With this option the package will log all the changes to laravel.log,
114+
| Prefixes can be set in `prefix`
115+
|
116+
| log format placeholders:
117+
| - prefix
118+
| - datetime: format: Y-m-d H:i:s
119+
| - userId: Given user id by CronBundle::setUser()
120+
| - jobId
121+
| - jobName
122+
| - runTime
123+
| - exitCode
124+
| - output
125+
|
126+
| You can truncate the output
127+
|
128+
*/
83129
'laravelLog' => [
84130
'prefix' => 'CronBundle',
85131
'logFormat' => '[%datetime%][%prefix%][userId:%userId%][jobId:%jobId%][jobName:%jobName%][runTime:%runTime%][exitCode:%exitCode%] Output: %output%',
86132
'truncate' => false,
87133
],
88134

135+
/*
136+
|--------------------------------------------------------------------------
137+
| Log driver: file
138+
|--------------------------------------------------------------------------
139+
|
140+
| With this option the package will log all the outputs to a file
141+
| You can truncate the output
142+
|
143+
*/
89144
'file' => [
90145
'path' => storage_path('logs/cron-bundle/output.log'),
91146
'truncate' => false,
92147
],
93148

149+
/*
150+
|--------------------------------------------------------------------------
151+
| Log driver: singleFile
152+
|--------------------------------------------------------------------------
153+
|
154+
| With this option the package will log all the outputs to multiple files
155+
| You can truncate the output
156+
|
157+
*/
94158
'singleFile' => [
95159
'dirPath' => storage_path('logs/cron-bundle/outputs/'),
96160
'fileFormat' => '%datetime%_%jobId%_%jobName%_output.log',

0 commit comments

Comments
 (0)