On 21.04.2011 12:47, Johannes Schmitt wrote: > 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?
Interesting, I don't have notice on the docs I see [1]. To me, reading those descriptions, notice should be info, info should be debug, and debug takes the same description, which is messages I usually don't want to see. I agree with warning and errors. For critical usually it means you throw an exception that's not caught, which will be logged as an error by the exception handler, done. > 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. Well, I can't repeat myself over and over, you obviously don't agree, fine. But there are many cases where we could have had shorter names and we still picked the more explicit ones, so I don't see this argument as valid. Also it's not about shortness but about having method names that make sense, if you didn't look at it with past knowledge, I think you'd realize those names don't make sense compared to the rest. Anyway, it unsettles me a bit to see your reaction considering the usual verbosity of your work. I guess nobody else cares to have an opinion? [1] http://packages.python.org/Logbook/api/base.html#logbook.CRITICAL 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
