src/Core/Core.php
protected function normalizeMonologParameters($level = null, $message = null, $extra = [])
    {
        // Normalize the parameters so they're translated into sensible categories
        if (null !== $level) {
            if (is_array($level)) {
                $extra = $level;
                $level = null;
            } elseif (null === $message || is_array($message)) {
                $extra   = is_array($message) ? $message : $extra;
                $message = $level;
                $level   = null;
            }
        }

        if (is_array($message)) {
            $extra   = $message;
            $message = null;
        }

        if ( ! empty($extra) && ! is_array($extra)) {
            $extra = (array) $extra;
        }

        if ($message instanceof \Exception) {
            $level = 'error';
        }

        if ( ! $extra) {
            $extra = [];
        }

        return [
            $level   ?: 'info',
            $message ?: 'Data.',
            $extra
        ];
    }
protected function normalizeMonologParameters($level = null, $message = null, $extra = [])
    {
        // Normalize the parameters so they're translated into sensible categories
        if (null !== $level) {
            if (is_array($level)) {
                $extra = $level;
                $level = null;
            } elseif (null === $message || is_array($message)) {
                $extra   = is_array($message) ? $message : $extra;
                $message = $level;
                $level   = null;
            }
        }

        if (is_array($message)) {
            $extra   = $message;
            $message = null;
        }

        if ( ! empty($extra) && ! is_array($extra)) {
            $extra = (array) $extra;
        }

        if ($message instanceof \Exception) {
            $level = 'error';
        }

        if ( ! $extra) {
            $extra = [];
        }

        return [
            $level   ?: 'info',
            $message ?: 'Data.',
            $extra
        ];
    }
protected function normalizeMonologParameters ( $ level = null , $ message = null , $ extra = [ ] ) { // Normalize the parameters so they're translated into sensible categories if ( null !== $ level ) { if ( is_array ( $ level ) ) { $ extra = $ level ; $ level = null ; } elseif ( null === $ message || is_array ( $ message ) ) { $ extra = is_array ( $ message ) ? $ message : $ extra ; $ message = $ level ; $ level = null ; } } if ( is_array ( $ message ) ) { $ extra = $ message ; $ message = null ; } if ( ! empty ( $ extra ) && ! is_array ( $ extra ) ) { $ extra = ( array ) $ extra ; } if ( $ message instanceof \ Exception ) { $ level = 'error' ; } if ( ! $ extra ) { $ extra = [ ] ; } return [ $ level ? : 'info' , $ message ? : 'Data.' , $ extra ] ; }
Normalizes typical monolog parameters to level, message, extra parameter set.

@param null|string|array $level   if $message is set as non-array, type, otherwise, if string, the message
@param null|string|array $message if an array and $type was the message, the extra data, otherwise the message
@param array             $extra   only used if neither $type nor $message are arrays
@return array
Normalizes typical monolog parameters to level message extra parameter set .