Skip to content

Commit 2ff4407

Browse files
committed
common log file (see #709)
1 parent b7cec10 commit 2ff4407

4 files changed

Lines changed: 10 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
- Refactor groups and user routes (Fix #721)
2727
- Added the `config` alert stream to save ufAlerts to the cache instead of sessions. Fix #633. The old `session` is still the default alertStream in 4.1.
2828
- Added support for the Redis cache driver and refactored the cache config values.
29-
- Added user and session cache.
29+
- Added user and session cache.
30+
- Common log file for db queries, auth checks, smtp, errors, and debug messages (#709).
3031

3132
See [http://learn.userfrosting.com/upgrading/40-to-41](Upgrading 4.0.x to 4.1.x documentation) for complete list of changes and breaking changes.
3233

app/sprinkles/account/src/ServicesProvider/ServicesProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,14 @@ public function register($container)
182182
};
183183

184184
/**
185-
* Auth logging with Monolog.
185+
* Authorization check logging with Monolog.
186186
*
187187
* Extend this service to push additional handlers onto the 'auth' log stack.
188188
*/
189189
$container['authLogger'] = function ($c) {
190190
$logger = new Logger('auth');
191191

192-
$logFile = $c->get('locator')->findResource('log://auth.log', true, true);
192+
$logFile = $c->get('locator')->findResource('log://userfrosting.log', true, true);
193193

194194
$handler = new StreamHandler($logFile);
195195

app/sprinkles/core/config/default.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
],
6969
'debug' => [
7070
'queries' => false,
71-
'smtp' => true,
71+
'smtp' => false,
7272
'twig' => false
7373
],
7474
'mail' => [
@@ -112,7 +112,7 @@
112112
// "Site" settings that are automatically passed to Twig
113113
'site' => [
114114
'AdminLTE' => [
115-
'skin' => "blue"
115+
'skin' => 'blue'
116116
],
117117
'analytics' => [
118118
'google' => [

app/sprinkles/core/src/ServicesProvider/ServicesProvider.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ public function register(ContainerInterface $container)
337337
$container['debugLogger'] = function ($c) {
338338
$logger = new Logger('debug');
339339

340-
$logFile = $c->locator->findResource('log://debug.log', true, true);
340+
$logFile = $c->locator->findResource('log://userfrosting.log', true, true);
341341

342342
$handler = new StreamHandler($logFile);
343343

@@ -374,7 +374,7 @@ public function register(ContainerInterface $container)
374374
$container['errorLogger'] = function ($c) {
375375
$log = new Logger('errors');
376376

377-
$logFile = $c->locator->findResource('log://errors.log', true, true);
377+
$logFile = $c->locator->findResource('log://userfrosting.log', true, true);
378378

379379
$handler = new StreamHandler($logFile, Logger::WARNING);
380380

@@ -448,7 +448,7 @@ public function register(ContainerInterface $container)
448448
$container['mailLogger'] = function ($c) {
449449
$log = new Logger('mail');
450450

451-
$logFile = $c->locator->findResource('log://mail.log', true, true);
451+
$logFile = $c->locator->findResource('log://userfrosting.log', true, true);
452452

453453
$handler = new StreamHandler($logFile);
454454
$formatter = new LineFormatter(null, null, true);
@@ -493,7 +493,7 @@ public function register(ContainerInterface $container)
493493
$container['queryLogger'] = function ($c) {
494494
$logger = new Logger('query');
495495

496-
$logFile = $c->locator->findResource('log://queries.log', true, true);
496+
$logFile = $c->locator->findResource('log://userfrosting.log', true, true);
497497

498498
$handler = new StreamHandler($logFile);
499499

0 commit comments

Comments
 (0)