comparison src/luan/modules/logging/LuanLogger.java @ 1687:f48db13ae2d9

unlogged lucene support
author Franklin Schmidt <fschmidt@gmail.com>
date Thu, 09 Jun 2022 19:44:41 -0600
parents c922446f53aa
children
comparison
equal deleted inserted replaced
1686:e34b73678a4f 1687:f48db13ae2d9
36 } 36 }
37 37
38 38
39 private static final String KEY = "Logger.Appender"; 39 private static final String KEY = "Logger.Appender";
40 private static volatile Appender globalAppender = GoodLoggerFactory.DEFAULT_APPENDER; 40 private static volatile Appender globalAppender = GoodLoggerFactory.DEFAULT_APPENDER;
41 public static int level = Level.INFO;
41 42
42 public static synchronized void initThreadLogging() { 43 public static synchronized void initThreadLogging() {
43 if( !(globalAppender instanceof ThreadLocalAppender) ) { 44 if( !(globalAppender instanceof ThreadLocalAppender) ) {
44 if( !(LoggerFactory.implementation instanceof LoggingFactory) ) 45 if( !(LoggerFactory.implementation instanceof LoggingFactory) )
45 throw new RuntimeException("must use goodjava.logger for thread logging"); 46 throw new RuntimeException("must use goodjava.logger for thread logging");
88 configure(); 89 configure();
89 } 90 }
90 } 91 }
91 92
92 private static void configure() { 93 private static void configure() {
93 GoodLoggerFactory.setConfigurer( new SimpleConfigurer(Level.INFO,globalAppender) ); 94 GoodLoggerFactory.setConfigurer( new SimpleConfigurer(level,globalAppender) );
94 } 95 }
95 96
96 } 97 }