View Javadoc

1   /**
2    * Logback: the generic, reliable, fast and flexible logging framework.
3    * 
4    * Copyright (C) 2000-2009, QOS.ch
5    * 
6    * This library is free software, you can redistribute it and/or modify it under
7    * the terms of the GNU Lesser General Public License as published by the Free
8    * Software Foundation.
9    */
10  package chapter11;
11  
12  import ch.qos.logback.classic.spi.LoggingEvent;
13  import ch.qos.logback.core.LayoutBase;
14  
15  
16  /**
17   * 
18   * A very simple logback-classic layout which formats a logging event
19   * by returning the message contained therein.
20   * 
21   * @author Ceki Gülcü
22   *
23   */
24  public class TrivialLogbackLayout extends LayoutBase<LoggingEvent> {
25  
26    public String doLayout(LoggingEvent loggingEvent) {
27      return loggingEvent.getMessage();
28    }
29  }