\core\commonLogging

Summary

Methods
Properties
Constants
__construct()
debug()
writeAudit()
writeSQLAudit()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
writeToFile()
No private properties found
N/A

Methods

__construct()

__construct() 

We don't have a lot to do here, but at least make sure that the logdir is specified and exists.

debug()

debug(  level,   stuff) : 

write debug messages to the log, if the debug level is high enough

Parameters

level

the debug level of the message that is to be logged

stuff

the stuff to be logged (via print_r)

Returns

writeAudit()

writeAudit(  user,   category,   message) : 

Writes an audit log entry to the audit log file. These audits are semantic logs; they don't record every single modification in the database, but provide a logical "who did what" overview. The exact modification SQL statements are logged automatically with writeSQLAudit() instead. The log file path is configurable in _config.php.

Parameters

user

persistent identifier of the user who triggered the action

category

type of modification, from the fixed vocabulary: "NEW", "OWN", "MOD", "DEL"

message

message to log into the audit log

Returns

TRUE if successful. Will terminate script execution on failure.

writeSQLAudit()

writeSQLAudit(  query) 

Write an audit log entry to the SQL log file. Every SQL statement which is not a simple SELECT one will be written to the log file. The log file path is configurable in _config.php.

Parameters

query

the SQL query to be logged

writeToFile()

writeToFile(  filename,   message) 

Parameters

filename

the name of the log file, relative (path to logdir gets prepended)

message

what to write into the file