[Typo3-dev] using devLog instead of debug in the core?
Martin T. Kutschker
Martin.no5pam.Kutschker at blackbox.n0spam.net
Thu Feb 3 08:52:23 CET 2005
René Fritz wrote:
>>>But I strongly sugest to use a common one-line format. Like
>>>
>>>if ($this->writeDevLog) ...
>>
>>Good, but what to do about the static methods of eg t3lib_div?
>>
>>/* WRITE DEV LOG */ t3lib_div::devLog(..)
>
>
> We should agree on a common format but in fact it doesn't matter if devLog
> calls are one liner and just every line with "t3lib_div::devLog" in it will
> be deleted by the "tuning" script.
>
> But we have to put a if() in the beginning of the line.
>
> if (TYPO3_DLOG OR $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']
> ['writeDevLog']) t3lib_div::devLog(...
>
> This is ugly isn't it?
How about
if (TYPO3_T3LIB_DLOG) t3lib_div::devLog(...)
and
if (TYPO3_TSLIB_DLOG) t3lib_div::devLog(...)
That would configure logging for STATIC methods in t3lib and tslib
respectively.
But IMHO critical failures should be logged anyway. Perhaps we need not
only a developer log but also a system failure log for admins
(/var/log/critcal).
Masi
More information about the TYPO3-dev
mailing list