LoggerManager
AbstractYes
A logger manager.
Table of Contents
Constants
- DEFAULT_EXTENSION = '.log'
- DEFAULT_NAME = 'log'
- DEFAULT_PATH = 'log'
- READ = 'r'
- WRITE = 'w'
Properties
- $directory : string|mixed
- The log directory.
- $extension : string|mixed
- The extension of the logs files.
- $name : string|null
- The name of the logging channel, a simple descriptive name that is attached to all log records.
- $path : string
- The path of the log folder.
Methods
- __construct() : mixed
- Creates a new MonoLogManager instance.
- clear() : bool
- Clear the content of the specific file.
- countLines() : int
- Returns the number of lines in a file.
- createLog() : array<string|int, mixed>|null
- Create a basic log definition.
- createLogger() : LoggerInterface
- getDirectory() : string
- Returns the log directory.
- getExtension() : string
- Returns the extension of the log files.
- getFileName() : string
- Returns the log file name.
- getFilePath() : string
- Returns the full log path.
- getLoggerFiles() : array<string|int, mixed>|false
- getLogLines() : array<string|int, mixed>|null
- Returns the list of lines of a specific log file.
Constants
DEFAULT_EXTENSION
public
mixed
DEFAULT_EXTENSION
= '.log'
DEFAULT_NAME
public
mixed
DEFAULT_NAME
= 'log'
DEFAULT_PATH
public
mixed
DEFAULT_PATH
= 'log'
READ
public
mixed
READ
= 'r'
WRITE
public
mixed
WRITE
= 'w'
Properties
$directory
The log directory.
public
string|mixed
$directory
= \oihana\enums\Char::EMPTY
$extension
The extension of the logs files.
public
string|mixed
$extension
$name
The name of the logging channel, a simple descriptive name that is attached to all log records.
public
string|null
$name
$path
The path of the log folder.
public
string
$path
Methods
__construct()
Creates a new MonoLogManager instance.
public
__construct([string $directory = Char::EMPTY ][, array<string|int, mixed> $init = [] ][, string|null $name = null ]) : mixed
Parameters
- $directory : string = Char::EMPTY
- $init : array<string|int, mixed> = []
- $name : string|null = null
clear()
Clear the content of the specific file.
public
clear(string $file) : bool
Parameters
- $file : string
Return values
boolcountLines()
Returns the number of lines in a file.
public
countLines(string $file) : int
Parameters
- $file : string
-
return int
Return values
intcreateLog()
Create a basic log definition.
public
createLog(string $line) : array<string|int, mixed>|null
Parameters
- $line : string
Return values
array<string|int, mixed>|nullcreateLogger()
public
abstract createLogger() : LoggerInterface
Return values
LoggerInterfacegetDirectory()
Returns the log directory.
public
getDirectory() : string
Return values
stringgetExtension()
Returns the extension of the log files.
public
getExtension() : string
Return values
stringgetFileName()
Returns the log file name.
public
getFileName() : string
Return values
stringgetFilePath()
Returns the full log path.
public
getFilePath() : string
Return values
stringgetLoggerFiles()
public
getLoggerFiles() : array<string|int, mixed>|false
Return values
array<string|int, mixed>|falsegetLogLines()
Returns the list of lines of a specific log file.
public
getLogLines(string $file) : array<string|int, mixed>|null
Parameters
- $file : string