Starting with a default install of Symfony2, I logged an INFO-level message using this line in my controller:
$this->get('logger')->info('foo');
and this showed up in app/logs/dev.log:
[2012-07-06 10:56:19] app.INFO: foo [] []
What are those empty square braces?
From
Monolog\Formatter\LineFormatter, it looks like the first[]is%context%, and the second is%extra%. Neither are populated by default. See this useful doc for how toreplace the empty square brackets with a session token.
If you want to fill in
%context%, here’s an idea (don’t use this for real, though):See: