Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
S
Silex
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
common
Silex
Commits
b4f5a709
Commit
b4f5a709
authored
May 18, 2016
by
Francisco Calderon
Committed by
Fabien Potencier
Feb 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added monolog.formatter.output and monolog.formatter.dateformat param…
parent
42bda7b7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/Silex/Provider/MonologServiceProvider.php
src/Silex/Provider/MonologServiceProvider.php
+5
-2
No files found.
src/Silex/Provider/MonologServiceProvider.php
View file @
b4f5a709
...
...
@@ -69,8 +69,8 @@ class MonologServiceProvider implements ServiceProviderInterface, BootableProvid
return
$log
;
};
$app
[
'monolog.formatter'
]
=
function
()
{
return
new
LineFormatter
();
$app
[
'monolog.formatter'
]
=
function
()
use
(
$app
)
{
return
new
LineFormatter
(
$app
[
'monolog.formatter.output'
],
$app
[
'monolog.formatter.dateformat'
]
);
};
$app
[
'monolog.handler'
]
=
$defaultHandler
=
function
()
use
(
$app
)
{
...
...
@@ -107,6 +107,8 @@ class MonologServiceProvider implements ServiceProviderInterface, BootableProvid
$app
[
'monolog.exception.logger_filter'
]
=
null
;
$app
[
'monolog.logfile'
]
=
null
;
$app
[
'monolog.use_error_handler'
]
=
!
$app
[
'debug'
];
$app
[
'monolog.formatter.output'
]
=
"[%datetime%] [%level_name%] %channel% - %message% %context% %extra%
\n
"
;
$app
[
'monolog.formatter.dateformat'
]
=
'Y-m-d H:i:s'
;
}
public
function
boot
(
Application
$app
)
...
...
@@ -137,3 +139,4 @@ class MonologServiceProvider implements ServiceProviderInterface, BootableProvid
return
$levels
[
$upper
];
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment