MixedFormatter extends LineFormatter
Monolog formatter for pretty-printing arrays and objects.
This class extends the basic Monolog LineFormatter class, and provides basically the same functionality but with one exception: if the second parameter of any logging method (debug, error, info, etc) is an array, it will print it as a nicely formatted, multi-line JSON object instead of all on a single line.
Tags
Table of Contents
| toJson() | Return the JSON representation of a value. | string | 
|---|---|---|
| jsonEncodePretty() | string | 
Methods
toJson()
Return the JSON representation of a value.
        protected
                                toJson(
                    
                            $data :
                mixed
                            
                    
            [,                 $ignoreErrors :
                bool
                 = false ]            
                )
        : string
    
    
            Parameters
- $data : mixed
 - $ignoreErrors : bool = false
 
Tags
Return values
stringjsonEncodePretty()
        private
                                jsonEncodePretty(
                    
                            $data :
                mixed
                            
                )
        : string
    
    
            Parameters
- $data : mixed
 
Return values
string —JSON encoded data or null on failure