Package org.objectweb.util.monolog.api

Examples of org.objectweb.util.monolog.api.Logger


      if (file.exists()) {
        long period = getLong(LogMonitoringTimerTask.MONITORING_CONFIG_PERIOD_PROPERTY,
                              LogMonitoringTimerTask.DEFAULT_MONITORING_CONFIG_PERIOD).longValue();       
        String logname = getProperty(LogMonitoringTimerTask.MONITORING_RESULT_LOGGER_PROPERTY,
                                     LogMonitoringTimerTask.DEFAULT_MONITORING_RESULT_LOGGER);
        Logger logger = Debug.getLogger(logname);
        int loglevel = getInteger(LogMonitoringTimerTask.MONITORING_RESULT_LEVEL_PROPERTY,
                                  LogMonitoringTimerTask.DEFAULT_MONITORING_RESULT_LEVEL).intValue();
        String logmsg = getProperty(LogMonitoringTimerTask.MONITORING_RESULT_MESSAGE_PROPERTY,
                                    LogMonitoringTimerTask.DEFAULT_MONITORING_RESULT_MESSAGE);
       
View Full Code Here


                         ldebugFileName);
      factory = org.objectweb.util.monolog.Monolog.initialize();
      if (factory == null) {
        System.err.println("Error in Monolog initialization: null factory");
      } else {
        Logger dl = factory.getLogger("fr.dyade.aaa.util.debug");
        dl.log(BasicLevel.INFO, "Debug.initialize() - " + ldebugFileName);
      }
    } catch(Throwable exc) {
      System.err.println("Unable to instantiate monolog wrapper");
      exc.printStackTrace();
    }
View Full Code Here

      }
    } else if (objElement instanceof PersistentObjectItf) {
      if (ceElem instanceof PName) {
          Object pn = ((PersistentObjectItf) objElement).getPName();
          if (pn == null) {
              Logger l = gca.getLogger();
              if (l != null) {
                  l.log(BasicLevel.WARN,
                          "Internal error: a collection/set/map elemnent is no more persistent and it is impossible to compare it: ",
                          new RuntimeException());
              }
              return false;
          } else {
View Full Code Here

  }

  private void execute(String[] args) {
        System.out.println();
        LoggerFactory lf = Monolog.initialize();
        Logger logger = lf.getLogger(this.getClass().toString());
        logger.setLevel( BasicLevel.LEVEL_DEBUG );

    //Check parameter
    if (args.length == 0) {
      System.err.println("Usage: ");
      System.err.println("\tDataStructureCreation (<class name to initialize> | <.jdo file name>)*");
 
View Full Code Here

            logger = (Logger) o;
      if (P6SpyLogger.logger == null) {
        P6SpyLogger.logger = logger;
      }
    } else if ("monolog-factory".equals(s)) {
      Logger l = logger;
            setLoggerFactory((LoggerFactory) o);
      if (l != null) {
        logger = l;
      }
      P6SpyLogger.logger = getLoggerFactory()
View Full Code Here

            SpeedoXMLDescriptor desc = (SpeedoXMLDescriptor) itDesc.next();
            for (Iterator itPack = desc.packages.values().iterator(); itPack.hasNext();) {
                SpeedoPackage sp = (SpeedoPackage) itPack.next();
                for (Iterator itclass = sp.classes.values().iterator(); itclass.hasNext();) {
                    SpeedoClass sc = (SpeedoClass) itclass.next();
                    Logger log = scp.loggerFactory.getLogger(LOGGER_NAME + '.' + sc.getFQName());
                    treatPC(sc, log);
                    treatOID(sc, log);
                    processedClasses ++;
                }
            }
View Full Code Here

  public final PersistentObjectItf detachCopy(PersistentObjectItf sp,
          POManagerItf pm,
          Map map,
          Object clone,
          Collection fgHints) {
    Logger logger = getLogger();
    if (Debug.ON && logger != null && logger.isLoggable(BasicLevel.DEBUG)) {
      logger.log(BasicLevel.DEBUG, "detachCopy()");
    }
    if (!isAbstract() && clone == null){
      try {
        //instanciate the PersistentObjectItf clone
        clone = newSpeedoPOInstance(sp.getClass());
View Full Code Here

        return (Logger) factory.getLogger(topic);
    }

    public static void main(String args[]) {
        cfgfn = (args.length > 0 ? args[0] : "./debug.cfg");
        Logger logmon = getLogger("mono");
        logmon.log(BasicLevel.DEBUG, "ca marche");
    }
View Full Code Here

        + "mode");
      e.printStackTrace();
      System.exit(12);
    }

    Logger l = mlf.getLogger("org.objectweb.monolog.javalog.test.toto");
    l.log(BasicLevel.INFO, "test PASSED");
  }
View Full Code Here

    p.setProperty("handler.consoleHandler.output", output);
    p.setProperty("handler.consoleHandler.pattern", "%l %d %m%n");
    p.setProperty("logger.root.level", "INFO");
    p.setProperty("logger.root.handler.0", "consoleHandler");
    mf = Monolog.getMonologFactory(p);
    Logger logger =  mf.getLogger("TestConsoleSwitcher.test1");
    logger.log(BasicLevel.WARN, "warning message via Monolog");
    logger.log(BasicLevel.INFO, "info message via Monolog");
    System.out.println("Message on System.out");
    System.err.println("Message on System.err");
  }
View Full Code Here

TOP

Related Classes of org.objectweb.util.monolog.api.Logger

Copyright © 2018 www.massapicom. 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.