Package microsim.gui.shell
Class JasConsoleAppender
- java.lang.Object
-
- org.apache.log4j.AppenderSkeleton
-
- org.apache.log4j.WriterAppender
-
- microsim.gui.shell.JasConsoleAppender
-
- All Implemented Interfaces:
org.apache.log4j.Appender
,org.apache.log4j.spi.OptionHandler
public class JasConsoleAppender extends org.apache.log4j.WriterAppender
JAS custom log4j appender to catch logs and write them into the JAS Console window.
If you want to enable logging on the JAS console simply add this appender to the log4j.properties file, like that:
log4j.appender.stdout=microsim.gui.shell.JasConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - %m%n
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 Summary
Constructors Constructor Description JasConsoleAppender()
JasConsoleAppender(org.apache.log4j.Layout layout, java.io.OutputStream os)
JasConsoleAppender(org.apache.log4j.Layout layout, java.io.Writer writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
append(org.apache.log4j.spi.LoggingEvent event)
-
Methods inherited from class org.apache.log4j.WriterAppender
activateOptions, close, getEncoding, getImmediateFlush, requiresLayout, setEncoding, setErrorHandler, setImmediateFlush, setWriter
-
-