Package org.jzonic.jlo

Examples of org.jzonic.jlo.LogEvent


        thread.setDaemon(true);
        thread.start();
    }
   
    public void run() {
        LogEvent le;
        while ( running ) {           
      while ( getEvents().iterator().hasNext() ) {
                le = getNextRecord();
                handlePipes(le);               
                handle(le);               
                handleSpecialChannels(le.getLogRecord());       
            }           
            // time to sleep.
            try {
                Thread.sleep(this.milliSecondSleepTime);
            }
View Full Code Here


     *@param  handler    the handler for this logevent
     *@param  formatter  the formatter for this logevent (can be null)
     *@param  lr         the LogRecord
     */
    public void processEvent(LogGenerator lg,LogRecord lr) {     
        LogEvent le = new LogEvent(lg.getHandler(), lg.getFormatter(), lr);       
        if ( lg.getFilter() != null ) {           
            if ( lg.getFilter().match(lr.getMessage() )) {
                getEvents().add(le);       
            }
        }
View Full Code Here

        }       
    }  
   
    public void flush() {
        while ( getEvents().iterator().hasNext() ) {
            LogEvent le = getNextRecord();
            if (le.getFormatter() != null) {
                String msg = le.getFormatter().formatMessage(le.getLogRecord());
                le.getHandler().publish(msg);
            } else {
                le.getHandler().publish(le.getLogRecord());
            }
           
        }
    }
View Full Code Here

           
        }
    }

  private synchronized LogEvent getNextRecord() {
    LogEvent le = (LogEvent) getEvents().iterator().next();
    getEvents().remove(le);
    return le;
  }
View Full Code Here

     *
     *@param  lg the LogGenerator    
     *@param  lr the LogRecord
     */
    public void processEvent(LogGenerator lg,LogRecord lr) {       
        LogEvent le = new LogEvent(lg.getHandler(), lg.getFormatter(), lr);
        handlePipes(le);
        if ( lg.getFilter() != null ) {
            if ( lg.getFilter().match(lr.getMessage() )) {
                handle(le);
            }
View Full Code Here

TOP

Related Classes of org.jzonic.jlo.LogEvent

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.