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
14487c1f
Commit
14487c1f
authored
Mar 27, 2011
by
Igor Wiedler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MonologExtension] monolog.name and monolog.level options
parent
8022d089
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/Silex/Extension/MonologExtension.php
src/Silex/Extension/MonologExtension.php
+3
-2
No files found.
src/Silex/Extension/MonologExtension.php
View file @
14487c1f
...
...
@@ -24,7 +24,7 @@ class MonologExtension implements ExtensionInterface
public
function
register
(
Application
$app
)
{
$app
[
'monolog'
]
=
$app
->
share
(
function
()
use
(
$app
)
{
$log
=
new
Logger
(
'myapp'
);
$log
=
new
Logger
(
isset
(
$app
[
'monolog.name'
])
?
$app
[
'monolog.name'
]
:
'myapp'
);
$app
[
'monolog.configure'
](
$log
);
...
...
@@ -32,7 +32,8 @@ class MonologExtension implements ExtensionInterface
});
$app
[
'monolog.configure'
]
=
$app
->
protect
(
function
(
$log
)
use
(
$app
)
{
$log
->
pushHandler
(
new
StreamHandler
(
$app
[
'monolog.logfile'
],
Logger
::
DEBUG
));
$level
=
isset
(
$app
[
'monolog.level'
])
?
$app
[
'monolog.level'
]
:
Logger
::
DEBUG
;
$log
->
pushHandler
(
new
StreamHandler
(
$app
[
'monolog.logfile'
],
$level
));
});
if
(
isset
(
$app
[
'monolog.class_path'
]))
{
...
...
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