Examples of Log


Examples of akka.event.ActorWithMDC.Log

        final ActorSystem system = ActorSystem.create("test-system", config);
        new LogJavaTestKit(system) {{
            system.eventStream().subscribe(getRef(), LogEvent.class);
            ActorRef ref = system.actorOf(Props.create(ActorWithMDC.class));

            ref.tell(new Log(ErrorLevel(), "An Error"), system.deadLetters());
            expectLog(ErrorLevel(), "An Error", "Map(messageLength -> 8)");
            ref.tell(new Log(WarningLevel(), "A Warning"), system.deadLetters());
            expectLog(WarningLevel(), "A Warning", "Map(messageLength -> 9)");
            ref.tell(new Log(InfoLevel(), "Some Info"), system.deadLetters());
            expectLog(InfoLevel(), "Some Info", "Map(messageLength -> 9)");
            ref.tell(new Log(DebugLevel(), "No MDC for 4th call"), system.deadLetters());
            expectLog(DebugLevel(), "No MDC for 4th call");
            ref.tell(new Log(Logging.DebugLevel(), "And now yes, a debug with MDC"), system.deadLetters());
            expectLog(DebugLevel(), "And now yes, a debug with MDC", "Map(messageLength -> 29)");
        }};
    }
View Full Code Here

Examples of anvil.Log

    } else {
      dev = new anvil.server.basic.BasicLogDevice();
    }
    dev.initialize(getParent());
    Log log = new Log(name, dev);
    log.setSeverity(_level);
    return log;
  }
View Full Code Here

Examples of beaver.comp.util.Log

    {
      Options opts = parseOptions(args);
      File src_file = getSrcFile(args[args.length - 1]);
      SrcReader src_reader = new SrcReader(src_file);
     
      Log log = new Log();
      compile(src_reader, opts, log);
      boolean logHasErrors = log.hasErrors();
     
      log.report(src_file.getName(), src_reader);
      System.exit(logHasErrors ? 1 : 0);
    }
    catch (IllegalArgumentException e)
    {
      System.err.println(e.getMessage());
View Full Code Here

Examples of bm.core.log.Log

    public synchronized int getRecordSize( final int recordId )
            throws RSException,
                   InvalidRecordIDException,
                   RecordStoreFullException
    {
        final Log log = Store.log;
        try
        {
            //log.debug( "getRecordSize( " + recordId + " )" );
            open();
            final RecordLocator locator = this.locator;
            locator.translate( recordId );
            makeCurrent( locator.recordId, false );
            if( currentRecord.isNull( locator.offset ) )
            {
                throw new InvalidRecordIDException( Constants.ERR_STR_GET_RECORD_SIZE, Integer.toString( recordId ) );
            }
            else
            {
                return currentRecord.getSize( locator.offset );
            }
        }
        catch( SerializationException e )
        {
            log.error( e );
            throw new RSException( Constants.ERR_STR_GET_RECORD_SIZE, Integer.toString( recordId ) );
        }
        finally
        {
            close();
View Full Code Here

Examples of cn.com.byd.support.impl.Log

    /**
     * 获取日志输出类
     * @return
     */
    public ILogger getLogger() {
        return new Log();
    }
View Full Code Here

Examples of co.paralleluniverse.fibers.instrument.Log

        super(parent);
    }

    private QuasarInstrumentor newInstrumentor() {
        QuasarInstrumentor inst = new QuasarInstrumentor(this); // must be called *after* construction has completed
        inst.setLog(new Log() {
            @Override
            public void log(LogLevel level, String msg, Object... args) {
                System.out.println("[quasar] " + level + ": " + String.format(msg, args));
            }

View Full Code Here

Examples of com.adaptrex.tools.log.Log

 
  /*
   * Simple logging method
   */
  public void log(String logType, String title, String message) {
    printLog(new Log(logType, title, message));
  }
View Full Code Here

Examples of com.admob.rocksteady.event.Log

      Integer end;
      end = generator.nextInt(10);
      for (i = 0; i <= end; i++) {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream out = new ObjectOutputStream(baos);
        Log log = new Log();

        // logger.info("Loop 1 " + String.valueOf(i));

        log.setHostname("had" + i + ".sc9.admob.int");
        log.setTimestamp("332423");
        log.setName("dmJob100");
        log.setValue("Log line as following: random string " + generator.nextInt());
        log.setError("Line explaining error 1 ");
        log.setStatus(2);
        out.writeObject(log);
        out.flush();
        // Send message to rabbit
        MessageManager.getInstance().publishMessage(baos.toByteArray(), rabbitExchange);

      }
      end = generator.nextInt(10);
      for (i = 0; i <= end; i++) {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream out = new ObjectOutputStream(baos);
        Log log = new Log();
        // logger.info("Loop 2 " + String.valueOf(baos.size()));

        log.setHostname("had" + i + ".sc9.admob.int");
        log.setTimestamp("332423");
        log.setName("dmJob300");
        log.setValue("Log line as following: random string " + generator.nextInt());
        log.setError("line explaining error 2");
        log.setStatus(2);
        out.writeObject(log);
        out.flush();
        // Send message to rabbit
        MessageManager.getInstance().publishMessage(baos.toByteArray(), rabbitExchange);
View Full Code Here

Examples of com.alibaba.druid.support.logging.Log

    }

    public void test_oracle() throws Exception {
        Field field = DruidDataSource.class.getDeclaredField("LOG");
        field.setAccessible(true);
        Log log = (Log) field.get(null);
        log.resetStat();
       
        Connection conn = dataSource.getConnection();
       
        conn.close();
       
        Assert.assertEquals(1, log.getErrorCount());
    }
View Full Code Here

Examples of com.barrybecker4.ui.util.Log

        // the main board viewer, It displays the current state of the board.
        // the board viewer creates its own controller
        boardViewer_ = createBoardViewer();

        OutputWindow logWindow = new OutputWindow( GameContext.getLabel("LOG_OUTPUT"), null);
        GameContext.setLogger( new Log(logWindow) );

        newGameDialog_ = createNewGameDialog( parent, boardViewer_ );
        optionsDialog_ = createOptionsDialog( parent, boardViewer_.getController() );

        infoPanel_ = createInfoPanel(boardViewer_.getController());
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.