Class JasConsoleAppender

java.lang.Object
microsim.gui.shell.JasConsoleAppender
All Implemented Interfaces:
org.apache.logging.log4j.core.Appender, org.apache.logging.log4j.core.LifeCycle

public class JasConsoleAppender extends Object implements org.apache.logging.log4j.core.Appender
JAS custom log4j appender to catch logs and write them into the JAS Console window.

Title: JAS

Description: Java Agent-based Simulation library

Copyright (C) 2002-13 Michele Sonnessa

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
Author:
Michele Sonnessa
  • Constructor Details

    • JasConsoleAppender

      public JasConsoleAppender()
    • JasConsoleAppender

      public JasConsoleAppender(org.apache.logging.log4j.core.Layout<?> layout, OutputStream os)
    • JasConsoleAppender

      public JasConsoleAppender(org.apache.logging.log4j.core.Layout<?> layout, Writer writer)
  • Method Details

    • append

      public void append(org.apache.logging.log4j.core.LogEvent event)
      Specified by:
      append in interface org.apache.logging.log4j.core.Appender
    • getState

      public org.apache.logging.log4j.core.LifeCycle.State getState()
      Specified by:
      getState in interface org.apache.logging.log4j.core.LifeCycle
    • initialize

      public void initialize()
      Specified by:
      initialize in interface org.apache.logging.log4j.core.LifeCycle
    • isStarted

      public boolean isStarted()
      Specified by:
      isStarted in interface org.apache.logging.log4j.core.LifeCycle
    • isStopped

      public boolean isStopped()
      Specified by:
      isStopped in interface org.apache.logging.log4j.core.LifeCycle
    • start

      public void start()
      Specified by:
      start in interface org.apache.logging.log4j.core.LifeCycle
    • stop

      public void stop()
      Specified by:
      stop in interface org.apache.logging.log4j.core.LifeCycle
    • getHandler

      public org.apache.logging.log4j.core.ErrorHandler getHandler()
      Specified by:
      getHandler in interface org.apache.logging.log4j.core.Appender
    • getLayout

      public org.apache.logging.log4j.core.Layout<? extends Serializable> getLayout()
      Specified by:
      getLayout in interface org.apache.logging.log4j.core.Appender
    • getName

      public String getName()
      Specified by:
      getName in interface org.apache.logging.log4j.core.Appender
    • ignoreExceptions

      public boolean ignoreExceptions()
      Specified by:
      ignoreExceptions in interface org.apache.logging.log4j.core.Appender
    • setHandler

      public void setHandler(org.apache.logging.log4j.core.ErrorHandler handler)
      Specified by:
      setHandler in interface org.apache.logging.log4j.core.Appender