|
71 | 71 | */ |
72 | 72 | 'filterType' => 'whitelist', |
73 | 73 |
|
| 74 | + /* |
| 75 | + |-------------------------------------------------------------------------- |
| 76 | + | Log driver for cron outputs |
| 77 | + |-------------------------------------------------------------------------- |
| 78 | + | |
| 79 | + | Log drivers may be none, database, laravelLog or file |
| 80 | + | |
| 81 | + */ |
74 | 82 | 'defaultCronOutput' => 'database', |
75 | 83 |
|
76 | 84 | 'cronOutputs' => [ |
| 85 | + /* |
| 86 | + |-------------------------------------------------------------------------- |
| 87 | + | Log driver: none |
| 88 | + |-------------------------------------------------------------------------- |
| 89 | + | |
| 90 | + | With this option the package will not log any information |
| 91 | + | |
| 92 | + */ |
77 | 93 | 'none' => [], |
78 | 94 |
|
| 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 | + */ |
79 | 104 | 'database' => [ |
80 | 105 | 'truncate' => false, |
81 | 106 | ], |
82 | 107 |
|
| 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 | + */ |
83 | 129 | 'laravelLog' => [ |
84 | 130 | 'prefix' => 'CronBundle', |
85 | 131 | 'logFormat' => '[%datetime%][%prefix%][userId:%userId%][jobId:%jobId%][jobName:%jobName%][runTime:%runTime%][exitCode:%exitCode%] Output: %output%', |
86 | 132 | 'truncate' => false, |
87 | 133 | ], |
88 | 134 |
|
| 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 | + */ |
89 | 144 | 'file' => [ |
90 | 145 | 'path' => storage_path('logs/cron-bundle/output.log'), |
91 | 146 | 'truncate' => false, |
92 | 147 | ], |
93 | 148 |
|
| 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 | + */ |
94 | 158 | 'singleFile' => [ |
95 | 159 | 'dirPath' => storage_path('logs/cron-bundle/outputs/'), |
96 | 160 | 'fileFormat' => '%datetime%_%jobId%_%jobName%_output.log', |
|
0 commit comments