<commit_before>// Level.java

package ed.log;

import ed.js.*;
import ed.js.func.*;
import ed.js.engine.*;

public enum Level {
    DEBUG , INFO , ERROR , FATAL ;

    JSFunction func = new JSFunctionCalls2(){
            public Object call( Scope s , Object msgObject , Object excObject , Object extra[] ){

		if ( msgObject == null )
		    msgObject = "null";

                Object t = s.getThis();
                if ( t == null || ! ( t instanceof Logger ) )
                    throw new RuntimeException( "has to be called with this being a Logger" );
                
                Logger l = (Logger)t;
                l.log( Level.this , msgObject.toString() , (Throwable)excObject );
                return true;
            }
        };
    
    static Level forName( String name ){
        if ( name.equalsIgnoreCase( "debug" ) )
            return DEBUG;

        if ( name.equalsIgnoreCase( "info" ) )
            return INFO;
        
        if ( name.equalsIgnoreCase( "error" ) )
            return ERROR;

        if ( name.equalsIgnoreCase( "fatal" ) )
            return FATAL;

        throw new RuntimeException( "unknown level : " + name );
    }

    static JSObject me = new JSObjectBase();
    static {
        me.set( "DEBUG" , DEBUG );
        me.set( "INFO" , INFO );
        me.set( "ERROR" , ERROR );
        me.set( "FATAL" , FATAL );
    }<commit_msg>log.LEVEL.ALL works<commit_after>// Level.java

package ed.log;

import ed.js.*;
import ed.js.func.*;
import ed.js.engine.*;

public enum Level {
    DEBUG , INFO , ERROR , FATAL ;

    JSFunction func = new JSFunctionCalls2(){
            public Object call( Scope s , Object msgObject , Object excObject , Object extra[] ){

		if ( msgObject == null )
		    msgObject = "null";

                Object t = s.getThis();
                if ( t == null || ! ( t instanceof Logger ) )
                    throw new RuntimeException( "has to be called with this being a Logger" );
                
                Logger l = (Logger)t;
                l.log( Level.this , msgObject.toString() , (Throwable)excObject );
                return true;
            }
        };
    
    static Level forName( String name ){
        if ( name.equalsIgnoreCase( "debug" ) )
            return DEBUG;

        if ( name.equalsIgnoreCase( "info" ) )
            return INFO;
        
        if ( name.equalsIgnoreCase( "error" ) )
            return ERROR;

        if ( name.equalsIgnoreCase( "fatal" ) )
            return FATAL;

        throw new RuntimeException( "unknown level : " + name );
    }

    static JSObject me = new JSObjectBase();
    static {
        me.set( "DEBUG" , DEBUG );
        me.set( "INFO" , INFO );
        me.set( "ERROR" , ERROR );
        me.set( "FATAL" , FATAL );

        me.set( "ALL" , DEBUG );
    }
{'fraction_non_alphanumeric': 0.11887863733144073, 'fraction_numerical': 0.0007097232079489, 'mean_word_length': 1.6321195144724556, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3920245', 'n_tokens_mistral': 827, 'n_tokens_neox': 784, 'n_words': 236}