lib/level.js
function($str)
    {
        if (!this.hasFormatOptions)
        {
            this.addToLog($str);
            return false;
        }

        // strip colors from the string. this is ok with multilines
        if (this.options.stripColor)
        {
            $str = Utils.stripColor($str);
        }

        var $result = [];
        if (this.options.splitOnLinebreak)
        {
            var $split = Utils.splitOnLinebreak($str,
                                                this.options.trimLinebreak);

            for (var $i = 0, $iL = $split.length; $i < $iL; $i++)
            {
                $str = $split[$i];
                if (this.options.trimTimestamp)
                {
                    $str = Utils.trimTimestamp($str, !this.options.stripColor);
                }

                this.addToLog($str);
                $result.push($str);
            }
        }
        else
        {
            if (this.options.trimTimestamp)
            {
                $str = Utils.trimTimestamp($str, !this.options.stripColor);
            }

            if (this.options.trimLinebreak)
            {
                $str = Utils.trimLinebreak($str);
            }

            this.addToLog($str);
            $result.push($str);
        }

        return $result;
    }
function($str)
    {
        if (!this.hasFormatOptions)
        {
            this.addToLog($str);
            return false;
        }

        // strip colors from the string. this is ok with multilines
        if (this.options.stripColor)
        {
            $str = Utils.stripColor($str);
        }

        var $result = [];
        if (this.options.splitOnLinebreak)
        {
            var $split = Utils.splitOnLinebreak($str,
                                                this.options.trimLinebreak);

            for (var $i = 0, $iL = $split.length; $i < $iL; $i++)
            {
                $str = $split[$i];
                if (this.options.trimTimestamp)
                {
                    $str = Utils.trimTimestamp($str, !this.options.stripColor);
                }

                this.addToLog($str);
                $result.push($str);
            }
        }
        else
        {
            if (this.options.trimTimestamp)
            {
                $str = Utils.trimTimestamp($str, !this.options.stripColor);
            }

            if (this.options.trimLinebreak)
            {
                $str = Utils.trimLinebreak($str);
            }

            this.addToLog($str);
            $result.push($str);
        }

        return $result;
    }
function ( $str ) { if ( ! this . hasFormatOptions ) { this . addToLog ( $str ) ; return false ; } // strip colors from the string. this is ok with multilines if ( this . options . stripColor ) { $str = Utils . stripColor ( $str ) ; } var $result = [ ] ; if ( this . options . splitOnLinebreak ) { var $split = Utils . splitOnLinebreak ( $str , this . options . trimLinebreak ) ; for ( var $i = 0 , $iL = $split . length ; $i < $iL ; $i ++ ) { $str = $split [ $i ] ; if ( this . options . trimTimestamp ) { $str = Utils . trimTimestamp ( $str , ! this . options . stripColor ) ; } this . addToLog ( $str ) ; $result . push ( $str ) ; } } else { if ( this . options . trimTimestamp ) { $str = Utils . trimTimestamp ( $str , ! this . options . stripColor ) ; } if ( this . options . trimLinebreak ) { $str = Utils . trimLinebreak ( $str ) ; } this . addToLog ( $str ) ; $result . push ( $str ) ; } return $result ; }
Will format and log the intercepted string and return an array with the
formatted result, or `false` when no format options are enabled.

@param {string} $str
@return {boolean|array}
Will format and log the intercepted string and return an array with the formatted result or false when no format options are enabled .