ZMObject
└─ZMLogging
public class ZMLogging
extends ZMObject
| Field Summary | |
|---|---|
| final int | Log level: ALL. |
| final int | Log level: Debug. |
| final int | Log level: Error. |
| final int | Log level: Info. |
| final int | Log level: Disabled. |
| final int | Log level: Trace. |
| final int | Log level: Warning. |
| Fields inherited from org.zenmagick.core.ZMObject | |
|---|---|
| properties_ | |
| Constructor Summary | |
|---|---|
Create new instance. |
|
| Method Summary | |
|---|---|
| void | dump(mixed obj, string msg, int level) Simple dump function. |
| void | errorHandler(int errno, string errstr, string errfile, int errline, array errcontext) PHP error handler callback. |
| void | exceptionHandler(Exception e) PHP exception handler callback. |
| protected string | formatLog(int errno, string errstr, string errfile, int errline, array errcontext) Format error handler log line. |
| static void | instance() Get instance. |
| void | log(string msg, int level) Simple logging function. |
| void | logError(string line, array info) A callback function that can be overriden to implement custom logging. |
| void | trace(mixed msg, int level) Create a simple stack trace. |
| Methods inherited from org.zenmagick.core.ZMObject | |
|---|---|
| attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton | |
public final int ALL = 99999
Log level: ALL.
public final int DEBUG = 4
Log level: Debug.
public final int ERROR = 1
Log level: Error.
public final int INFO = 3
Log level: Info.
public final int $NONE
Log level: Disabled.
public final int TRACE = 5
Log level: Trace.
public final int WARN = 2
Log level: Warning.
public ZMLogging()
Create new instance.
public void dump(mixed obj, string msg, int level)
Simple dump function.
ZMLogging::DEBUG.public void errorHandler(int errno, string errstr, string errfile, int errline, array errcontext)
PHP error handler callback.
if configured, this method will append all messages to the file configured with zmLogFilename.
If no file is configured, the regular webserver error file will be used.
public void exceptionHandler(Exception e)
PHP exception handler callback.
protected string formatLog(int errno, string errstr, string errfile, int errline, array errcontext)
Format error handler log line.
public static void instance()
Get instance.
public void log(string msg, int level)
Simple logging function.
Messages will either be appended to the webserver's error log or, if a custom error handler is installed, trigger a E_USER_NOTICE error.
ZMLogging::INFO.public void logError(string line, array info)
A callback function that can be overriden to implement custom logging.
public void trace(mixed msg, int level)
Create a simple stack trace.
ZMLogging::DEBUG.
ZenMagick logging service.
The dump and trace methods are browser oriented and will generate HTML in the response page.
Browser output depends on the PHP ini setting display_errors.