rct2·com Posted October 5, 2009 Posted October 5, 2009 I've been exploring the ShowError routine and error logging. I've read http://community.invisionpower.com/resources/official.html?record=128 . Matt has also promised that the next release of IP.Board will make some of the logging functions public instead of protected. Would it be possible to handle a new level of error reporting, the '0' level for 'information only'. This level is not an error, it's a log of activity. It would be far preferable to have this capability, rather than having to write my own activity logging, and would be a useful facility for all modders I think. I've suggested a '0' level to make it easier to implement (I think), '1' upwards are alreay defined.
bfarber Posted October 5, 2009 Posted October 5, 2009 Hmm. Well, we already have moderator and admin logs, and error logging. I don't think activity logging really fits inline with any of that, however. I'd tend to think activity logging would need to be custom implemented myself. There is separate debug logging if that's what you need.
rct2·com Posted October 5, 2009 Author Posted October 5, 2009 [quote name='bfarber' date='05 October 2009 - 08:16 PM' timestamp='1254770189' post='1863731']There is separate debug logging if that's what you need. And that's into files yes? Are there any articles about it? From what I remember when I looked, if I switch it on, there will be messages in the logs from all over the code?
bfarber Posted October 5, 2009 Posted October 5, 2009 You can leave the logging disabled, but add into your code the ability to log and pass a parameter that overrides the enabled/disabled global flag. * Add a message to the log file * Handy for __destruct stuff, etc * * @access public * @param string Message to add * @param string Which file to add it to * @param mixed False, or an array of vars to include in log * @param bool Force log even if IPS_LOG_ALL is off - handy for on-the-fly debugging * @param bool Unlink file before writing * @return void */ static public function addLogMessage( $message, $file='debugLog', $array=FALSE, $force=FALSE, $unlink=FALSE ) /**
Recommended Posts
Archived
This topic is now archived and is closed to further replies.