PHP Class Expose\Log\Mongo

Inheritance: extends Expose\Log
Show file Open project: enygma/expose

Public Methods

Method Description
__construct ( string $connectString = null ) Init the object and set the connection string if given
alert ( string $message, array $context = [] ) : boolean Log alert messages
critical ( string $message, array $context = [] ) : boolean Log critical messages
debug ( string $message, array $context = [] ) : boolean Log debug messages
emergency ( string $message, array $context = [] ) : boolean Log emergency messages
error ( string $message, array $context = [] ) : boolean Log error messages
getConnectString ( ) : string Get the current connection string
getDbCollection ( ) : string Get the current DB collection name
getDbName ( ) : string Get the current database name
info ( string $message, array $context = [] ) : boolean Log info messages
log ( string $level, string $message, array $context = [] ) : boolean Push the log message and context information into Mongo
notice ( string $message, array $context = [] ) : boolean Log notice messages
setConnectString ( string $string ) Set the current connection string
setDbCollection ( string $collection ) Set the current DB collection name
setDbName ( string $name ) Set the current database name
warning ( string $message, array $context = [] ) : boolean Log warning messages

Method Details

__construct() public method

Init the object and set the connection string if given
public __construct ( string $connectString = null )
$connectString string Mongo connection string

alert() public method

Log alert messages
public alert ( string $message, array $context = [] ) : boolean
$message string Log message
$context array Extra contact information
return boolean Log pass/fail

critical() public method

Log critical messages
public critical ( string $message, array $context = [] ) : boolean
$message string Log message
$context array Extra contact information
return boolean Log pass/fail

debug() public method

Log debug messages
public debug ( string $message, array $context = [] ) : boolean
$message string Log message
$context array Extra contact information
return boolean Log pass/fail

emergency() public method

Log emergency messages
public emergency ( string $message, array $context = [] ) : boolean
$message string Log message
$context array Extra contact information
return boolean Log pass/fail

error() public method

Log error messages
public error ( string $message, array $context = [] ) : boolean
$message string Log message
$context array Extra contact information
return boolean Log pass/fail

getConnectString() public method

Get the current connection string
public getConnectString ( ) : string
return string Connection string

getDbCollection() public method

Get the current DB collection name
public getDbCollection ( ) : string
return string Collection name

getDbName() public method

Get the current database name
public getDbName ( ) : string
return string DB name

info() public method

Log info messages
public info ( string $message, array $context = [] ) : boolean
$message string Log message
$context array Extra contact information
return boolean Log pass/fail

log() public method

Push the log message and context information into Mongo
public log ( string $level, string $message, array $context = [] ) : boolean
$level string Logging level (ex. info, debug, notice...)
$message string Log message
$context array Extra context information
return boolean Success/fail of logging

notice() public method

Log notice messages
public notice ( string $message, array $context = [] ) : boolean
$message string Log message
$context array Extra contact information
return boolean Log pass/fail

setConnectString() public method

Set the current connection string
public setConnectString ( string $string )
$string string Connection string

setDbCollection() public method

Set the current DB collection name
public setDbCollection ( string $collection )
$collection string Collection name

setDbName() public method

Set the current database name
public setDbName ( string $name )
$name string DB name

warning() public method

Log warning messages
public warning ( string $message, array $context = [] ) : boolean
$message string Log message
$context array Extra contact information
return boolean Log pass/fail