Package org.apache.log4j

Examples of org.apache.log4j.SimpleLayout


          logger.setLevel(Level.DEBUG);
        }
      }

      if (objJSAppender == null) {
        SimpleLayout layout = new SimpleLayout();
        objJSAppender = new JobSchedulerLog4JAppender(layout);
        Appender consoleAppender = objJSAppender ; // JobSchedulerLog4JAppender(layout);
        logger.addAppender(consoleAppender);

        // ALL | DEBUG | INFO | WARN | ERROR | FATAL | OFF:
View Full Code Here


    else {
      /**
       * hier jetzt direkt konfigurieren
       */
      try {
        SimpleLayout layout = new SimpleLayout();
        // Appender consoleAppender = new JobSchedulerLog4JAppender(layout);
        Appender consoleAppender = new ConsoleAppender(layout);
        objRootLog.addAppender(consoleAppender);
        // ALL | DEBUG | INFO | WARN | ERROR | FATAL | OFF:
        objRootLog.setLevel(Level.DEBUG);
View Full Code Here

  private JTextArea textArea = null;
    private int textSize = 0;

    public TextAreaAppender(JTextArea textArea) {
        this.textArea = textArea;
        this.layout = new SimpleLayout();
        setImmediateFlush(true);
    }
View Full Code Here

  @Before
  public void setUp() {
    this.stdStream = new ByteArrayOutputStream(1000);
    this.l4jLogger = org.apache.log4j.Logger.getLogger(LOGGER_NAME);

    WriterAppender appender = new WriterAppender(new SimpleLayout(),
        this.stdStream);
    this.l4jLogger.addAppender(appender);
    appender.setImmediateFlush(true);

    this.l4jLogger.setLevel(org.apache.log4j.Level.ALL);
View Full Code Here

    }

    private static org.apache.log4j.Logger getFallabckLogger() {
        org.apache.log4j.Logger logger = org.apache.log4j.Logger.getLogger("OpenEJB.logging");

        SimpleLayout simpleLayout = new SimpleLayout();
        ConsoleAppender newAppender = new ConsoleAppender(simpleLayout);
        logger.addAppender(newAppender);
        return logger;
    }
View Full Code Here

  }

  public void accept() throws Exception {
   
    // set up appender
    Layout layout = new SimpleLayout();
    Appender appender = new FileAppender(layout, ACCEPT_FILE, false);
   
    // create LevelMatchFilter
    LevelMatchFilter matchFilter = new LevelMatchFilter();
View Full Code Here

  }

  public void deny() throws Exception {
   
    // set up appender
    Layout layout = new SimpleLayout();
    Appender appender = new FileAppender(layout, DENY_FILE, false);
   
    // create LevelMatchFilter, set to deny matches
    LevelMatchFilter matchFilter = new LevelMatchFilter();
    matchFilter.setAcceptOnMatch(false);
View Full Code Here

   * @param args
   */
  public static void main(String[] args) throws Exception
  {

    ConsoleAppender app = new ConsoleAppender(new SimpleLayout());
    Logger.getRootLogger().removeAllAppenders();
    Logger.getRootLogger().addAppender(app);

    AvroConvertCli cli = new AvroConvertCli();

View Full Code Here

    @Override
    public void setUp() throws Exception{
        Logger logger = Logger.getLogger(ColumnPruneVisitor.class);
        logger.removeAllAppenders();
        logger.setLevel(Level.INFO);
        SimpleLayout layout = new SimpleLayout();
        logFile = File.createTempFile("log", "");
        FileAppender appender = new FileAppender(layout, logFile.toString(), false, false, 0);
        logger.addAppender(appender);
       
        Logger pigStorageWithTraceLogger = Logger.getLogger(PigStorageWithTrace.class);
View Full Code Here

        }
        else
        {
            // This is mostly for running the test outside of the ant setup
            _logfile = File.createTempFile("LogMonitor", ".log");
            _appender = new FileAppender(new SimpleLayout(),
                                                     _logfile.getAbsolutePath());
            _appender.setFile(_logfile.getAbsolutePath());
            _appender.setImmediateFlush(true);
            Logger.getRootLogger().addAppender(_appender);
        }
View Full Code Here

TOP

Related Classes of org.apache.log4j.SimpleLayout

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.