FileHandler
        
        extends BaseHandler
    
    
            
            in package
            
        
    
    
    
Log error messages to file system
Tags
Table of Contents
Properties
- $dateFormat : string
- Date format for logging
- $fileExtension : string
- Extension to use for log files
- $filePermissions : int
- Permissions for new log files
- $handles : array<int, string>
- Handles
- $path : string
- Folder to hold logs
Methods
- __construct() : mixed
- canHandle() : bool
- Checks whether the Handler will handle logging items of this log Level.
- handle() : bool
- Handles logging the message.
- setDateFormat() : HandlerInterface
- Stores the date format to use while logging messages.
Properties
$dateFormat
Date format for logging
        protected
            string
    $dateFormat
     = 'Y-m-d H:i:s'
    
    
    
    
    
$fileExtension
Extension to use for log files
        protected
            string
    $fileExtension
    
    
    
    
    
    
$filePermissions
Permissions for new log files
        protected
            int
    $filePermissions
    
    
    
    
    
    
$handles
Handles
        protected
            array<int, string>
    $handles
    
    
    
    
    
    
$path
Folder to hold logs
        protected
            string
    $path
    
    
    
    
    
    
Methods
__construct()
    public
                    __construct([array{handles?: list, path?: string, fileExtension?: string, filePermissions?: int}  $config = [] ]) : mixed
    Parameters
- 
                $config
                : array{handles?: list, path?: string, fileExtension?: string, filePermissions?: int} = []
canHandle()
Checks whether the Handler will handle logging items of this log Level.
    public
                    canHandle(string $level) : bool
    Parameters
- $level : string
Return values
boolhandle()
Handles logging the message.
    public
                    handle(string $level, string $message) : bool
    If the handler returns false, then execution of handlers will stop. Any handlers that have not run, yet, will not be run.
Parameters
- $level : string
- $message : string
Tags
Return values
boolsetDateFormat()
Stores the date format to use while logging messages.
    public
                    setDateFormat(string $format) : HandlerInterface
    Parameters
- $format : string