Log core class facade for the Monolog composer package.

This class will provide the interface between the Fuel v1.x class API and the Monolog package, in preparation for FuelPHP v2.0

 Methods

create the monolog instance

_init() 

Logs a message with the Debug Log Level

debug(string $msg, string $context) : bool

Parameters

$msg

string

The log message

$context

string

The message context

Returns

boolIf it was successfully logged

Logs a message with the Error Log Level

error(string $msg, string $context) : bool

Parameters

$msg

string

The log message

$context

string

The message context

Returns

boolIf it was successfully logged

Logs a message with the Info Log Level

info(string $msg, string $context) : bool

Parameters

$msg

string

The log message

$context

string

The message context

Returns

boolIf it was successfully logged

initialize the created the monolog instance

initialize() 

return the monolog instance

instance() 

Write a log entry to Monolog

log(int | string $level, string $msg, array $context) : bool

Parameters

$level

intstring

the log level

$msg

string

the log message

$context

array

message context

Exceptions

\FuelException

Returns

bool

Get the current log filename, optionally with a prefix or suffix.

logfile($prefix, $suffix) 

Parameters

$prefix

$suffix

Logs a message with the Warning Log Level

warning(string $msg, string $context) : bool

Parameters

$msg

string

The log message

$context

string

The message context

Returns

boolIf it was successfully logged

Write Log File

write(int | string $level, string $msg, string | array $context) : bool

Generally this function will be called using the global log_message() function

Parameters

$level

intstring

the log level

$msg

string

the log message

$context

stringarray

message context

Exceptions

\FuelException

Returns

bool

Check if a message with this log level needs logging

need_logging(int | string $level) : bool

Parameters

$level

intstring

the log level

Exceptions

\FuelException

Returns

bool

 Properties

 

log file filename

$filename 

 

container for the Monolog instance

$monolog 

 

log file path

$path