[TYPO3-v4] Harmonizing severity levels

Xavier Perseguers typo3 at perseguers.ch
Sat Nov 6 08:25:24 CET 2010


Hi,

[...]
> Yes, a central logging method would be great, and the severities from
> sysLog are fine with that, just adding DEBUG to it (or maybe even TRACE
> for even more detailed stuff), but then have all features in place so
> that every extension uses this central logging instance.

Actually I could live without a TRACE level, but if we have to add 
levels, I guess it would not cost much to add it too and could be really 
powerful in a few edge-cases.

> I thought to just use t3lib_div::sysLog, because its there already, it
> is being used, it already interfaces to "file" and "syslog()" by default
> and it is hookeable just like devLog() also is.
>
>>> BTW: I find it silly that our core authentication services activate
>>> their devLog calls when DLOG is enabled. Usually these userauth devlogs
>>> are only interesting if you are trying to debug some authentication
>>> mechanism and there is already a SC_OPTIONS to activate it. See attached
>>> patch #1, maybe others have a similar feeling.
>
>> Well, DLOG is supposed to be a general debugging flag. RealURL also logs
>> everything if DLOG is on.
>
> Not really, because you need to switch realUrls "enableDevLog" (ext
> manager) ON *and* have DLOG activated before it starts logging. This is
> differnet in the auth-services, because those are logged in any case as
> soon as you activate DLOG.
>
> The constant TYPO3_DLOG was introducted to allow devLog() calls be kept
> in the code without affecting (so much) the performance, by using:
>
> if (TYPO3_DLOG) t3lib_div::devLog ...

... and if TYPO3_DLOG acts a bit like a threshold for levels DEBUG and 
TRACE for the central logging, it could be very powerful and would 
really allow to keep "debugging" stuff inside the extension/module.

> So every extension, every developer and even the core does it differently.

Yes :-/

> Another reason to make this more generic and a central logging interface
> which is known to everybody and which could decide which logs from which
> extensions in which severities should go *where* (database, mail, file,
> SMS alert, ...).

I'd love to have this.

> And for the "database" part, we could re-use lots of the interface
> "devlog" extension is currently providing.

Sounds good.

> And if we end up with the nice feature of sys_log which is to provide
> *translations* for log messages, we might even integrate this also in
> this central logging routine.

:-)

Cheers
Xavier


More information about the TYPO3-project-v4 mailing list