/*
CLASS {NATIVE_Log_html|_Java}, NATIVE :

*/

//import java.util.ArrayList;
//import java.io.*;

import java.util.concurrent.*;

public class NATIVE_Log_html {
    
    
    public static String Path_html_stored = "";
    
    /*
    
    FUN Set_log_path( STR Path|_value ), NATIVE :
       @"NATIVE_Log_html.Path_html_stored = X_Path;" .
       
    FUN Get_log_path ==> STR, NATIVE:
       @"RESULT = NATIVE_Log_html.Path_html_stored;" .
       
    FUN Do_redirect_console_to_log(
    	BOOL R|edirect_if_TRUE,
    	BOOL Dup|licate_in_log), NATIVE :
		"	NATIVE_Log_html.Do_redirect_console_to_log(X_R, X_Dup);" .
       
    */
    
	public static void Do_redirect_console_to_log(boolean r, boolean dup) {

	     if(r) {
	     	AL4_system.sim_Write = new AL4_system.Sim_Write() {
	     		public void do_write(String S) {
	     			try {
						C_Log_html.M_Log_colored(0, S);
	     			}
	     			catch(Exception ex) {
	     			}
	     		}
	     	}; 
	     }
	   	 else AL4_system.sim_Write = null;
	   	 AL4_system.dup_Write = dup;

	}
    
	/*
	
	FUN Before_log, NATIVE : @
	"	NATIVE_Log_html.log_sema.acquire();" .
	
	FUN After_log, NATIVE : @
	"	NATIVE_Log_html.log_sema.release();" .
	
	*/
	
	public static Semaphore log_sema = new Semaphore(1, true);
	
}
/*
END
*/

