src/log/Logger.php
public static function logLevelToId($value) {
        if (!is_string($value)) throw new IllegalTypeException('Illegal type of parameter $value: '.gettype($value));

        switch (strtolower($value)) {
            case 'debug' : return L_DEBUG;
            case 'info'  : return L_INFO;
            case 'notice': return L_NOTICE;
            case 'warn'  : return L_WARN;
            case 'error' : return L_ERROR;
            case 'fatal' : return L_FATAL;
            default:
                return null;
        }
    }
public static function logLevelToId($value) {
        if (!is_string($value)) throw new IllegalTypeException('Illegal type of parameter $value: '.gettype($value));

        switch (strtolower($value)) {
            case 'debug' : return L_DEBUG;
            case 'info'  : return L_INFO;
            case 'notice': return L_NOTICE;
            case 'warn'  : return L_WARN;
            case 'error' : return L_ERROR;
            case 'fatal' : return L_FATAL;
            default:
                return null;
        }
    }
public static function logLevelToId ( $ value ) { if ( ! is_string ( $ value ) ) throw new IllegalTypeException ( 'Illegal type of parameter $value: ' . gettype ( $ value ) ) ; switch ( strtolower ( $ value ) ) { case 'debug' : return L_DEBUG ; case 'info' : return L_INFO ; case 'notice' : return L_NOTICE ; case 'warn' : return L_WARN ; case 'error' : return L_ERROR ; case 'fatal' : return L_FATAL ; default : return null ; } }
Convert a loglevel description to a loglevel constant.

@param  string $value - loglevel description

@return int|null - loglevel constant or NULL, if $value is not a valid loglevel description
Convert a loglevel description to a loglevel constant .