Examples of LogManager


Examples of ServiceManager.LogManager

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        ConfigManager configManager = new ConfigManager();
        LogManager logManager = new LogManager(configManager);
        FilesManager filesManager = new FilesManager(configManager);

        DownloadManager downloadManager = new DownloadManager(configManager, filesManager, logManager);
        downloadManager.downloadSubTitles();

View Full Code Here

Examples of com.sleepycat.je.log.LogManager

        throws DatabaseException {

        this.envImpl = envImpl;
        this.undoDatabases = undoDatabases;

        LogManager logManager = envImpl.getLogManager();
        remainingLockedNodes = new HashSet<Long>();

        /*
         * keyToLsns holds lists of all intermediate versions, organized by
         * slot value. Using the header example, keyToLsns would hold this:
         *
         * (B)   -> 500
         * (A/A')-> 400, 300, 200
         */
        TreeMap<CompareSlot, LinkedList<Long>> keyToLsns =
            new TreeMap<CompareSlot, LinkedList<Long>>();

        /* The chain list will have an entry per entry in the transaction.*/
        LinkedList<VersionCalculator> chain =
            new LinkedList<VersionCalculator>();

        /*
         * Traverse this transaction's entire chain to record intermediate
         * versions.  Using the example in the header, traverse from lsn
         * 500->lsn 100.
         */
        long undoLsn = lastLoggedLsn;
        try {
            lastValidVLSN = VLSN.NULL_VLSN;
            while (undoLsn != DbLsn.NULL_LSN) {
                WholeEntry wholeEntry =
                    logManager.getLogEntryAllowInvisible(undoLsn);
                LNLogEntry undoEntry = (LNLogEntry) wholeEntry.getEntry();

                DatabaseImpl dbImpl = getDatabaseImpl(undoEntry.getDbId());
                undoEntry.postFetchInit(dbImpl);

View Full Code Here

Examples of flex.management.runtime.messaging.log.LogManager

        {
            controller = new MessageBrokerControl(this);
            controller.register();
            setControl(controller);

           logManager = new LogManager();
           logManager.setLog(log);
           logManager.setParent(this);
           logManager.setupLogControl();
           logManager.initialize(LOG_MANAGER_ID, null);
        }
View Full Code Here

Examples of fr.dz.swan.log.LogManager

public class LogPanel extends JPanel {

  public LogPanel(String id) {
    setLayout(new BorderLayout());
    LogManager log =LogManager.getLogger(id);
    String[][] messages =parseLog(log.getLog("parse"));
    String[] titres= new String[2];
    titres[0]="ligne";
    titres[1]="message";
    JTable table = new JTable(messages,titres);
    table.setCellSelectionEnabled(false);
View Full Code Here

Examples of jade.tools.logging.LogManager

      }
    }
  }
 
  void setDefaultLoggingSystem() {
    LogManager lm = initializeLogManager();
    if (lm != null) {
      defaultLogManager = lm;
    }
  }
View Full Code Here

Examples of java.util.logging.LogManager

         "Global", "Can't find java.util.logging.config.file=logging.properties");
      }
      try {
         InputStream in = url.openStream();

         LogManager logManager = LogManager.getLogManager();
         logManager.readConfiguration(in);
         in.close();

         // init from command line (or xmlBlaster.properties)
         synchronized (Global.class) {
            if (!logIsInitialized) {
               Map map = this.property.getPropertiesForContextNode(this.contextNode, ContextNode.LOGGING_MARKER_TAG, "__default");
               String defVal = (String)map.get("__default");
               if (defVal != null) {
                  try {
                     Level defaultLevel = Level.parse(defVal);
                     Logger defLogger = logManager.getLogger("");
                     if (defLogger != null) {
                        defLogger.setLevel(defaultLevel);
                        log.info("Setting default log level to '" + defaultLevel.getName() + "'");
                     }
                     else
                        log.warning("Setting default log level to '" + defaultLevel.getName() + "' failed since default log level is null");
                  }
                  catch (Throwable ex) {
                     log.warning("An exception occured when parsing '" + defVal + "' as a log level");
                  }
               }
               Iterator iter = map.entrySet().iterator();

               Logger defLogger = logManager.getLogger("");
               // Handler[] tmpHandlers = defLogger.getHandlers();
               // Handler[] refHandlers = new Handler[tmpHandlers.length];
               Handler[] refHandlers = defLogger.getHandlers();
               for (int i=0; i < refHandlers.length; i++) {
                  refHandlers[i].setLevel(Level.FINEST);
View Full Code Here

Examples of java.util.logging.LogManager

  /**
   * Apply the logging configuration to the current loggers
   * Can be called several times in case new classes are loaded
   */
  public void apply(){
    LogManager lm=LogManager.getLogManager();
        if(lowestLevel != null){
            for(Iterator handlerIterator = outHandlerList.iterator(); handlerIterator.hasNext();){
                Handler outHandler = (Handler) handlerIterator.next();
                outHandler.setLevel(lowestLevel);
            }
        }
    Enumeration e=lm.getLoggerNames();
    while(e.hasMoreElements()){
      Logger l=lm.getLogger((String)e.nextElement());
      apply(l);
    }
  }
View Full Code Here

Examples of java.util.logging.LogManager

    return url.substring(0, endIndex);
  }
 
  private Map<String, Level> getLoggers() {
    Map<String, Level> result = new HashMap<String, Level>();
    LogManager logManager = LogManager.getLogManager();
    Enumeration loggerNames = logManager.getLoggerNames();
    while ( loggerNames.hasMoreElements() ){
      String loggerName = (String)loggerNames.nextElement();
      Logger logger = logManager.getLogger(loggerName);
      result.put(loggerName, logger.getLevel());
    }
    return sortMap(result);
  }
View Full Code Here

Examples of java.util.logging.LogManager

            command.execute();
        }
    }

    private static void setLogging(Command command){
        LogManager logManager = LogManager.getLogManager();
        logManager.reset();
        /* set the log level on the root logger */
        Logger rootLogger = Logger.getLogger("");
        rootLogger.setLevel(command.getLogLevel());
        ConsoleHandler consoleHandler = new ConsoleHandler();
        consoleHandler.setLevel(command.getLogLevel());
View Full Code Here

Examples of java.util.logging.LogManager

   
    /**
     * Get any configuration properties set
     */
    private void configure() {
        final LogManager manager = LogManager.getLogManager();
        final String className = getClass().getName();
       
        final String level = manager.getProperty(className + ".level");
        setLevel((level == null) ? Level.INFO : Level.parse(level));
       
        final Level levelStdOut = parseLevel(manager.getProperty(className + ".levelStdOut"));
        final Level levelSplit = parseLevel(manager.getProperty(className + ".levelSplit"));
        final Level levelStdErr = parseLevel(manager.getProperty(className + ".levelStdErr"));
        setLevels(levelStdOut,levelSplit,levelStdErr);
       
        final String filter = manager.getProperty(className + ".filter");
        setFilter(makeFilter(filter));
       
        final String formatter = manager.getProperty(className + ".formatter");
        setFormatter(makeFormatter(formatter));
       
        final String encoding = manager.getProperty(className + ".encoding");
        try {
            this.stdOutHandler.setEncoding(encoding);
            this.stdErrHandler.setEncoding(encoding);
        } catch (final UnsupportedEncodingException e) {
            Log.logException(e);
        }
       
        final String ignoreCtrlChrStr = manager.getProperty(className + ".ignoreCtrlChr");
        this.ignoreCtrlChr = (ignoreCtrlChrStr==null) ? false : "true".equalsIgnoreCase(ignoreCtrlChrStr);
       
    }   
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.