[TYPO3-core] RFC #9480: Bug/cleanup: Enhance debug information with SQL data

Dmitry Dulepov dmitry at typo3.org
Sat Oct 18 14:07:39 CEST 2008


Hi!

Francois Suter wrote:
> I'm not sure this is really necessary. t3lib_div::devLog() is already 
> empty. It only calls a hook, so logging actually happens only if you 
> have some extension installed that uses this hook. So there's already a 
> mechanism similar to what you describe.
> 
> There is furthermore this TYPO3_DLOG constant, that says the following 
> (in the Install Tool):
> 
> "Whether the developer log is enabled. See constant "TYPO3_DLOG""
> 
> This is not very explicit and could even be seen as redundant. If you 
> have installed an extension that uses the t3lib_div::devLog() hook, it 
> could mean that you actually *want* to log things and may not need to 
> activate TYPO3 logging on top of it. On the other hand it gives a finer 
> control which is quite useful in some cases.
> 
> The main point is that if the TYPO3_DLOG is to mean something then calls 
> to t3lib_div::devLog() should be wrapped inside a test on this constant 
> IMO.

This is correct :) The idea is: you can have logging extension installed all the time but logging should happen only if it is enabled.

There should be no null logger. Loggers are called one after another by t3lib_div::devLog(). Some of them can be interested only in some events. Null logger does not make sense.

Here is an example when multiple different loggers are useful. I often use rlmp_filedevlog, which writes everything to log. But sometimes I'd love to have just a realurl_devlog, which could write only RealURL events to the log. And I could have another logger, which saved all but RealURL events to another file. Very useful.

The option in the configuration (and corresponding constant) globally enables and disables logging. It is very useful in practice, when working on a live customer site.

-- 
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/post-details/iphone_as_productivity_tool/


More information about the TYPO3-team-core mailing list