On 11-06-17 2:52 AM, Fabien Potencier wrote:
On 6/17/11 11:02 AM, Jordi Boggiano wrote:
On 17.06.2011 11:00, Fabien Potencier wrote:
On 6/17/11 10:39 AM, Christophe COEVOET wrote:
Le 17/06/2011 10:36, Jordi Boggiano a écrit :
Heya,
For Monolog's InsightHandler (FirePHP/Firebug logging), and eventually
for other handlers as well, having a way to pass extra information
along
with log messages can be pretty useful.
This would be easily possible by just adding a second "$context =
null"
parameter to all the LoggerInterface methods, to which you could pass
arrays, objects, anything. Then the handlers (or rather formatters in
Monolog) can serialize that, if needed, or just discard it.
To be exact, it is "$context = array()" according to the start of the
discussion and the implementation for Monolog :)
Yes, I think enforcing the context as an array is good. So, "array
$context = array()".
Yup sorry about that detail. Aside from that, I guess nobody is opposed
to it, but I'll let the thread sit there for a while just in case.
I think you can go ahead as it adds flexibility with no BC at all.
Would it be better to call the extra argument?:
array $details = array()
The Insight/FirePHP system uses the idea of a "context" to frame the
origin, relative (execution flow) and logical (architecture) position of
a log message within an application. Setting this context manually or
augmenting it could happen via $details['_CONTEXT_'] or equivalent if
desired.
I am concerned if the $context name is used as the extra argument for
monolog it will lead to confusion (when Insight more prominently
replaces FirePHP). I also find the term $context too restrictive as you
are usually trying to convey more "detail" about the message be it
context or variables of interest surrounding the logging call (details).
Thoughts?
Christoph
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to symfony-devs@googlegroups.com
To unsubscribe from this group, send email to
symfony-devs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en