
Public Member Functions | |
| logMessage ($path, $priority, $message, $file, $line) | |
| This function will be called by the logging facility. | |
Static Public Member Functions | |
| static | getInstance () |
| The singleton getter. | |
| static | formatMessage ($message) |
| Will make the message more readable. | |
| static | getLevelString ($priority) |
| Will convert the numeric event priority to a string. | |
| static | convertObjectToString ($object, $indent=0, $visited=array(), $verbose=true) |
| Converts an object to a string value. | |
Private Member Functions | |
| __construct () | |
| Constructor. | |
| init () | |
| Initializes cosole logger. | |
| adjustPath ($path) | |
| Will make the path a bit prettier by removing trailing paranthesis. | |
Private Attributes | |
| $initialized = false | |
| Stores whether init() was processed once. | |
Static Private Attributes | |
| static | $instance |
| The singleton instance of this class. | |
Note that Stdout on a web server is the response to the browser. So this class is only useful if php is invoked from the command line. Other LogTargets could handle logging to the browser more efficiently.
Definition at line 9 of file ConsoleLogTarget.class.php.
| spunQ_ConsoleLogTarget::__construct | ( | ) | [private] |
Constructor.
Defined to reduce visibility.
Definition at line 32 of file ConsoleLogTarget.class.php.
| spunQ_ConsoleLogTarget::adjustPath | ( | $ | path | ) | [private] |
Will make the path a bit prettier by removing trailing paranthesis.
| $path | The path where the log event was triggered. |
Definition at line 85 of file ConsoleLogTarget.class.php.
| static spunQ_LogTarget::convertObjectToString | ( | $ | object, | |
| $ | indent = 0, |
|||
| $ | visited = array(), |
|||
| $ | verbose = true | |||
| ) | [static, inherited] |
Converts an object to a string value.
| $object | The object to convert. | |
| $indent | Indentation level of the hierarchy | |
| $visited | array of processed objects. Tracked to detect recursion. |
Definition at line 15 of file LogTarget.class.php.
| static spunQ_ConsoleLogTarget::formatMessage | ( | $ | message | ) | [static] |
Will make the message more readable.
Will convert objects using spunQ_LogTarget::convertObjectToString() and remove trailing newlines.
| $message | The message of the log event. |
Definition at line 96 of file ConsoleLogTarget.class.php.
| static spunQ_ConsoleLogTarget::getInstance | ( | ) | [static] |
The singleton getter.
Definition at line 21 of file ConsoleLogTarget.class.php.
| static spunQ_ConsoleLogTarget::getLevelString | ( | $ | priority | ) | [static] |
Will convert the numeric event priority to a string.
| $priority | The numeric priority, could be either of the constants in spunQ_Logger. |
Definition at line 114 of file ConsoleLogTarget.class.php.
| spunQ_ConsoleLogTarget::init | ( | ) | [private] |
Initializes cosole logger.
Prints css definitions if running in HTML mode.
We should use a state parttern here, this is just awful.
Definition at line 51 of file ConsoleLogTarget.class.php.
| spunQ_ConsoleLogTarget::logMessage | ( | $ | path, | |
| $ | priority, | |||
| $ | message, | |||
| $ | file, | |||
| $ | line | |||
| ) |
This function will be called by the logging facility.
A logger rule matched a logging event that was triggered and this log target was provided to the rule.
| $path | The source of the log event. | |
| $priority | The priority with which the Logger was invoked. | |
| $message | The message of the log event. | |
| $file | The path to the file where the event actually occured. | |
| $line | The line within the file where the log event was triggered |
Implements spunQ_ILogTarget.
Definition at line 66 of file ConsoleLogTarget.class.php.
spunQ_ConsoleLogTarget::$initialized = false [private] |
Stores whether init() was processed once.
Definition at line 40 of file ConsoleLogTarget.class.php.
spunQ_ConsoleLogTarget::$instance [static, private] |
1.5.9