[TYPO3-english] devlog on production system
Hi, Today we had a problem with a payment transaction on our website.. i tried to find any logs but i had no devLog extension installed so my only logfile was the one from Apache. I checked the TER and found the Extension devlog. How do you manage logging on production systems? Is it a good idea to activate it on a production system if Minimun level for logging is set to 3 (only Errors)? Do i have to expect less performance? - Georg ___ TYPO3-english mailing list TYPO3-english@lists.typo3.org http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
Re: [TYPO3-english] devlog on production system
Hi, How do you manage logging on production systems? Is it a good idea to activate it on a production system if Minimun level for logging is set to 3 (only Errors)? Do i have to expect less performance? It really depends. There's a general setting in the Install Tool called enableDLOG. If you enable it, TYPO3 (and extensions respecting this flag) will start spitting a huge number of devlog entries. So with this setting, you have to be careful, it could indeed lower performance. And blow up your database if you don't set a limit on the amount of records to store in table tx_devlog. There are lost of ways you can reduce the number of entries, though. Minimum level is one, although sometimes you may want to see also informational messages and not just errors. You can set extension keys to ignore some source of messages (for example, RealURL is very verbose and if your problem is not related to RealURL, these log entries would be useless to you). Now besides that general setting, quite a few extensions have their own debug/devlog flag. In such a case you may just turn on logging for one extension and have a reduced number of log entries. And of course you may add devlog calls yourself inside the code you're trying to debug. Still if the calls are in a piece of code that's called very often, you could encounter performance problems. Maybe in such a case - if all the above-mentioned filtering is not enough - you could just turn logging on for a few minutes, hoping you catch the problematic event and turn it off again. HTH -- Francois Suter Cobweb Development Sarl - http://www.cobweb.ch ___ TYPO3-english mailing list TYPO3-english@lists.typo3.org http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
Re: [TYPO3-english] devlog on production system
Hello Francois, thank you for your explanation. In class.t3lib_div.php i found: * If you want to implement the devLog in your applications, simply add lines like: * if (TYPO3_DLOG) t3lib_div::devLog('[write message in english here]', 'extension key'); So the proper way of implementing devLog in own extensions is to first check if enable_DLOG is enabled. Also the problematic extension on our website is writing to devlog only with enable_DLOG=1 I looked now at the source code of devlog extension. The checks if devlog should write to database are made at the beginning of class.tx_devlog.php . So if i have enabled enable_DLOG and set Minimum logging level to 3 it would log not that much to DB. For all other debug messages with log levels less than 3 it is just a few IF conditions .. do you think this few if conditions can reduce the performance? Are there so many calls to devLog() in Typo3 Core with enable_DLOG=1? - Georg Am 31.03.2011 13:26, schrieb François Suter: Hi, How do you manage logging on production systems? Is it a good idea to activate it on a production system if Minimun level for logging is set to 3 (only Errors)? Do i have to expect less performance? It really depends. There's a general setting in the Install Tool called enableDLOG. If you enable it, TYPO3 (and extensions respecting this flag) will start spitting a huge number of devlog entries. So with this setting, you have to be careful, it could indeed lower performance. And blow up your database if you don't set a limit on the amount of records to store in table tx_devlog. There are lost of ways you can reduce the number of entries, though. Minimum level is one, although sometimes you may want to see also informational messages and not just errors. You can set extension keys to ignore some source of messages (for example, RealURL is very verbose and if your problem is not related to RealURL, these log entries would be useless to you). Now besides that general setting, quite a few extensions have their own debug/devlog flag. In such a case you may just turn on logging for one extension and have a reduced number of log entries. And of course you may add devlog calls yourself inside the code you're trying to debug. Still if the calls are in a piece of code that's called very often, you could encounter performance problems. Maybe in such a case - if all the above-mentioned filtering is not enough - you could just turn logging on for a few minutes, hoping you catch the problematic event and turn it off again. HTH ___ TYPO3-english mailing list TYPO3-english@lists.typo3.org http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
Re: [TYPO3-english] devlog on production system
Hi Georg, Also the problematic extension on our website is writing to devlog only with enable_DLOG=1 [snip] For all other debug messages with log levels less than 3 it is just a few IF conditions .. do you think this few if conditions can reduce the performance? Are there so many calls to devLog() in Typo3 Core with enable_DLOG=1? I would really avoid turning on enable_DLOG on a live site. If you have looked inside the extension and found the devlog calls, I would suggest that you temporarily exchange the if (enable_DLOG) tests by if (true), so that the extension logs unconditionally, and then you don't get the output of the rest of the core + other extensions. Cheers -- Francois Suter Cobweb Development Sarl - http://www.cobweb.ch ___ TYPO3-english mailing list TYPO3-english@lists.typo3.org http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english