DeBot Framework


DeBot\Logs
core/Logs.php at line 13

Class Logs

Singleton
└─Logs

public class Logs
extends Singleton

DeBot Core - Logs Created by dab Jul ?? 2010 Last Edited: Aug 14 2010 Handles the config, and allows for a global access through singleton (Static).

Author:
David (dab)
Version:
v1.0

Field Summary
object the error handle

$m_oErrorHandle

The handle for the error log

object The log handle

$m_oLogHandle

The handle for the log file

object Where to send? (Bot object)

$m_oLogTo

Er, it was to be used for sending to a channel....

object Where to send? (Bot object)

$m_oToObj

Er, it was to be used for sending to a channel....

Method Summary
void

addDebug(string sLine, boolean The)

Adds a debug line to the logs, assuming debug is enabled in the config

boolean

addLog(string sLine, boolean bError)

Add a new line to our logs.

void

load()

Initiate our Logs object

void

onError(mixed iError, mixed sError, mixed sFile, mixed iLine)

This function is called by the Error handler of PHP.

void

onFatal()

Called on fatal errors.

void

updateLogHandle()

This occurs every so often (seconds) to update the file we are writing to if the time of day changes (midnight).

Methods inherited from DeBot\Singleton
__construct, obj

Field Detail

core/Logs.php at line 40

m_oErrorHandle

public object the error handle $m_oErrorHandle

The handle for the error log


core/Logs.php at line 34

m_oLogHandle

public object The log handle $m_oLogHandle

The handle for the log file


core/Logs.php at line 48

m_oLogTo

public object Where to send? (Bot object) $m_oLogTo = ''

Er, it was to be used for sending to a channel.... but I don't need it anymore

Deprecated:
since v1.0

core/Logs.php at line 57

m_oToObj

public object Where to send? (Bot object) $m_oToObj = null

Er, it was to be used for sending to a channel.... but I don't need it anymore

Deprecated:
since v1.0

Method Detail

core/Logs.php at line 127

addDebug

public void addDebug(string sLine, boolean The)

Adds a debug line to the logs, assuming debug is enabled in the config

Parameters:
sLine - The line to add
The - result

core/Logs.php at line 92

addLog

public boolean addLog(string sLine, boolean bError)

Add a new line to our logs.

Parameters:
sLine - The message to add
bError - Is this message an error?

core/Logs.php at line 63

load

public void load()

Initiate our Logs object


core/Logs.php at line 181

onError

public void onError(mixed iError, mixed sError, mixed sFile, mixed iLine)

This function is called by the Error handler of PHP. I don't feel like exlaining the parameters.


core/Logs.php at line 212

onFatal

public void onFatal()

Called on fatal errors. I don't actually think it is called.


core/Logs.php at line 157

updateLogHandle

public void updateLogHandle()

This occurs every so often (seconds) to update the file we are writing to if the time of day changes (midnight).


DeBot Framework