Examples of LogManager


Examples of java.util.logging.LogManager

            setRowCount(0);

            origLevels = new TreeMap<String, Level>();

            // collect the logger names and levels, and sort them by their name
            LogManager logManager = LogManager.getLogManager();
            Enumeration<String> loggerNames = logManager.getLoggerNames();
            while (loggerNames.hasMoreElements()) {
                String loggerName = loggerNames.nextElement();
                if (loggerName.length() == 0) {
                    // skip loggers with empty names
                    continue;
View Full Code Here

Examples of java.util.logging.LogManager

*/
public class LogControl {
   
    /** Creates a new instance of LogControl */
    public LogControl(Class refClass, String loggingProperties) {
        LogManager logManager = LogManager.getLogManager();
        InputStream in = refClass.getResourceAsStream(loggingProperties);
//        System.out.println("************************ LOADING LOG config from "+in);
        try {
            logManager.readConfiguration(in);
        } catch(IOException e) {
            e.printStackTrace();
        }
    }
View Full Code Here

Examples of java.util.logging.LogManager

  {
    DisplayMode chosenMode = null;
    int targetWidth = 800;
    int targetHeight = 600;

    LogManager logManager = LogManager.getLogManager();
    logManager.readConfiguration();
    logger = Logger.getLogger("");
   
    try
    {
      DisplayMode[] modes = Display.getAvailableDisplayModes();
View Full Code Here

Examples of java.util.logging.LogManager

    {
      // Configure java.util.logging and get a Logger instance
      System
          .setProperty("java.util.logging.config.file",
              PROPERTIES_FILE);
      LogManager logManager = LogManager.getLogManager();
      logManager.readConfiguration();
      logger = Logger.getLogger("");

      // Read the properties configuration
      reader = new FileReader(PROPERTIES_FILE);
      properties = new Properties();
View Full Code Here

Examples of java.util.logging.LogManager

    {
      // Configure java.util.logging and get a Logger instance
      System
          .setProperty("java.util.logging.config.file",
              PROPERTIES_FILE);
      LogManager logManager = LogManager.getLogManager();
      logManager.readConfiguration();
      logger = Logger.getLogger("");

      // Read the properties configuration
      reader = new FileReader(PROPERTIES_FILE);
      Client.properties = new Properties();
View Full Code Here

Examples of java.util.logging.LogManager

  {
    if (logger != null)
      return;
   
    System.setProperty("java.util.logging.config.file", PROPERTIES_FILE);
    LogManager logManager = LogManager.getLogManager();
    try
    {
      logManager.readConfiguration();
    }
    catch (IOException e){}
    logger = Logger.getLogger("");   
    textarea = new JTextArea();
    textarea.setLineWrap(true);
View Full Code Here

Examples of java.util.logging.LogManager

                Runtime.getRuntime().addShutdownHook(shutdownHook);
               
                // If JULI is being used, disable JULI's shutdown hook since
                // shutdown hooks run in parallel and log messages may be lost
                // if JULI's hook completes before the CatalinaShutdownHook()
                LogManager logManager = LogManager.getLogManager();
                if (logManager instanceof ClassLoaderLogManager) {
                    ((ClassLoaderLogManager) logManager).setUseShutdownHook(
                            false);
                }
            }
View Full Code Here

Examples of java.util.logging.LogManager

            if (useShutdownHook) {
                Runtime.getRuntime().removeShutdownHook(shutdownHook);

                // If JULI is being used, re-enable JULI's shutdown to ensure
                // log messages are not lost
                LogManager logManager = LogManager.getLogManager();
                if (logManager instanceof ClassLoaderLogManager) {
                    ((ClassLoaderLogManager) logManager).setUseShutdownHook(
                            true);
                }
            }
View Full Code Here

Examples of java.util.logging.LogManager

            } catch (Throwable ex) {
                log.error(sm.getString("catalina.shutdownHookFail"), ex);
            } finally {
                // If JULI is used, shut JULI down *after* the server shuts down
                // so log messages aren't lost
                LogManager logManager = LogManager.getLogManager();
                if (logManager instanceof ClassLoaderLogManager) {
                    ((ClassLoaderLogManager) logManager).shutdown();
                }
            }

View Full Code Here

Examples of java.util.logging.LogManager

    @Test
    public void testQuietLogging() throws Exception {

        final List<LogRecord> logRecords = new ArrayList<LogRecord>();
        LogManager logManager = LogManager.getLogManager();
        logManager.reset();
        Handler handler = new Handler() {
            @Override
            public void publish(LogRecord record) {
                logRecords.add(record);
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.