>From the Logbook documentation:

   - critical – for errors that lead to termination
   - error – for errors that occur, but are handled
   - warning – for exceptional circumstances that might not be errors
   - notice – for non-error messages you usually want to see
   - info – for messages you usually don’t want to see
   - debug – for debug messages

You want to drop "critical", and "notice" from the list. Could you explain
for each case, why? If I look at the description, then these situations
could occur also in a web context. Maybe you can also explain what alert(),
or emerg() from the current interface are intended to be used for, and why
we don't need these?

For the method names, I think they need to be viewed in combination with the
variable they are called on, e.g.

$logger->log()     vs.    $logger->addRecord()
$logger->debug() vs.   $logger->addDebug()
etc.

I like the short names, and I think it's obvious what they do if you are
aware that you call them on a Logger object. Then again, these names are
pretty standard for logger objects. Consistency with the rest of the
framework is a weak reason imo since we do not have hard naming conventions,
but we usually tend to favor pragmatism.

Kind regards,
Johannes


On Thu, Apr 21, 2011 at 12:15 PM, Jordi Boggiano <[email protected]> wrote:

> On 21.04.2011 11:33, Lukas Kahwe Smith wrote:
> >
> > On 21.04.2011, at 11:28, Johannes Schmitt wrote:
> >
> >> Maybe we can view these two things separately as they have not really
> anything to do with each other.
> >>
> >> 1) Removing some log priorities
> >>
> >> I guess that isn't too bad, but nonetheless I'd like to see some
> reasoning why you want to drop individual log levels. Otherwise it's just
> based on some feeling, and imo that's not good enough for potentially
> breaking third party code at this point. We are in a stabilizing phase so
> these BC breaks should already be kept to a minimum. Fabien has turned down
> things for this reason before, so it just seems consequential that we need
> to discuss this a bit more thoroughly before making this change.
> >
> > What are the ones you want to remove Jordi? But overall I think the ones
> you mentioned to leave in seem sufficient to me.
>
> Basically there is the change:
>
> -    function log($message, $priority);
> -    function emerg($message);
> -    function alert($message);
> -    function crit($message);
> -    function err($message);
> -    function warn($message);
> -    function notice($message);
> -    function info($message);
> -    function debug($message);
>
> +    function addRecord($priority, $message);
> +    function addError($message);
> +    function addWarning($message);
> +    function addInfo($message);
> +    function addDebug($message);
>
> So emerg, alert, crit and notice are gone. The 4 other log levels
> provide more than enough flexibility imo.
>
> What's more, at the moment if you use crit it will be mapped to error by
> MonologBundle anyway.
>
> Note that it is just the standard interface, it doesn't mean you can't
> extend the logger class and add your own levels if you really need more
> in your very specific rocket-science enterprise-class application.
>
> Cheers
>
> --
> Jordi Boggiano
> @seldaek :: http://seld.be/
>
> --
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
>

-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to