MiniLog
    
            
            in package
            
        
    
    
    
        
            Manage all log message information types.
Tags
Table of Contents
- DEFAULT_CHANNEL = 'master'
 - LIMIT = 5000
 - $channel : string
 - $context : array<string|int, mixed>
 - $data : array<string|int, mixed>
 - $disabled : bool
 - $storage : MiniLogStorageInterface
 - $translator : Translator|null
 - __construct() : mixed
 - clear() : void
 - Clears all data for one or all channels.
 - critical() : void
 - Critical conditions.
 - debug() : void
 - Detailed debug information.
 - disable() : void
 - error() : void
 - Runtime errors that do not require immediate action but should typically be logged and monitored.
 - getContext() : string
 - Gets the stored context value for a given key.
 - info() : void
 - Interesting information, advices.
 - notice() : void
 - Normal but significant events.
 - read() : array<string|int, mixed>
 - Returns all messages for a given channel (or all channels) and some levels.
 - save() : bool
 - Stores all messages on the default storage.
 - setContext() : void
 - Sets the context value for a given key.
 - setStorage() : void
 - Sets a new storage.
 - warning() : void
 - Exceptional occurrences that are not errors.
 - reduce() : void
 - Saves on the default storage and clear all data.
 - log() : void
 - Logs with an arbitrary level.
 
Constants
DEFAULT_CHANNEL
    public
        mixed
    DEFAULT_CHANNEL
    = 'master'
        
        
    
LIMIT
    public
        mixed
    LIMIT
    = 5000
        
        
    
Properties
$channel
    private
        string
    $channel
    
    
    
    
$context
    private
    static    array<string|int, mixed>
    $context
     = []
    
    
    
$data
    private
    static    array<string|int, mixed>
    $data
     = []
    
    
    
$disabled
    private
    static    bool
    $disabled
     = false
    
    
    
$storage
    private
    static    MiniLogStorageInterface
    $storage
    
    
    
    
$translator
    private
        Translator|null
    $translator
    
    
    
    
Methods
__construct()
    public
                    __construct([string $channel = '' ][, mixed $translator = null ]) : mixed
        
        Parameters
- $channel : string = ''
 - $translator : mixed = null
 
Return values
mixed —clear()
Clears all data for one or all channels.
    public
            static        clear([string $channel = '' ]) : void
    
        Parameters
- $channel : string = ''
 
Return values
void —critical()
Critical conditions.
    public
                    critical(string $message[, array<string|int, mixed> $context = [] ]) : void
        Example: Application component unavailable, unexpected exception.
Parameters
- $message : string
 - $context : array<string|int, mixed> = []
 
Return values
void —debug()
Detailed debug information.
    public
                    debug(string $message[, array<string|int, mixed> $context = [] ]) : void
    
        Parameters
- $message : string
 - $context : array<string|int, mixed> = []
 
Return values
void —disable()
    public
            static        disable([bool $value = true ]) : void
        
        Parameters
- $value : bool = true
 
Return values
void —error()
Runtime errors that do not require immediate action but should typically be logged and monitored.
    public
                    error(string $message[, array<string|int, mixed> $context = [] ]) : void
    
        Parameters
- $message : string
 - $context : array<string|int, mixed> = []
 
Return values
void —getContext()
Gets the stored context value for a given key.
    public
            static        getContext(string $key) : string
    
        Parameters
- $key : string
 
Return values
string —info()
Interesting information, advices.
    public
                    info(string $message[, array<string|int, mixed> $context = [] ]) : void
    
        Parameters
- $message : string
 - $context : array<string|int, mixed> = []
 
Return values
void —notice()
Normal but significant events.
    public
                    notice(string $message[, array<string|int, mixed> $context = [] ]) : void
    
        Parameters
- $message : string
 - $context : array<string|int, mixed> = []
 
Return values
void —read()
Returns all messages for a given channel (or all channels) and some levels.
    public
            static        read([string $channel = '' ][, array<string|int, mixed> $levels = [] ]) : array<string|int, mixed>
    
        Parameters
- $channel : string = ''
 - $levels : array<string|int, mixed> = []
 
Return values
array<string|int, mixed> —save()
Stores all messages on the default storage.
    public
            static        save([string $channel = '' ]) : bool
    
        Parameters
- $channel : string = ''
 
Return values
bool —setContext()
Sets the context value for a given key.
    public
            static        setContext(string $key, string $value) : void
    
        Parameters
- $key : string
 - $value : string
 
Return values
void —setStorage()
Sets a new storage.
    public
            static        setStorage(MiniLogStorageInterface $storage) : void
    
        Parameters
- $storage : MiniLogStorageInterface
 
Return values
void —warning()
Exceptional occurrences that are not errors.
    public
                    warning(string $message[, array<string|int, mixed> $context = [] ]) : void
        Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.
Parameters
- $message : string
 - $context : array<string|int, mixed> = []
 
Return values
void —reduce()
Saves on the default storage and clear all data.
    protected
                    reduce() : void
    
    
    
        Return values
void —log()
Logs with an arbitrary level.
    private
                    log(string $level, string $message[, array<string|int, mixed> $context = [] ]) : void
    
        Parameters
- $level : string
 - $message : string
 - $context : array<string|int, mixed> = []