1   /**
2    * Logback: the generic, reliable, fast and flexible logging framework.
3    * 
4    * Copyright (C) 2000-2008, 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 ch.qos.logback.classic.net.testObjectBuilders;
11  
12  import ch.qos.logback.classic.Level;
13  import ch.qos.logback.classic.Logger;
14  import ch.qos.logback.classic.LoggerContext;
15  import ch.qos.logback.classic.spi.LoggingEvent;
16  
17  public class TrivialLoggingEventBuilder implements Builder {
18  
19    private Logger logger = new LoggerContext()
20        .getLogger(LoggerContext.ROOT_NAME);
21  
22    public Object build(int i) {
23      LoggingEvent le = new LoggingEvent();
24      le.setTimeStamp(System.currentTimeMillis());
25      le.setLevel(Level.DEBUG);
26      le.setLoggerRemoteView(logger.getLoggerRemoteView());
27      le.setMessage(MSG_PREFIX);
28      le.setThreadName("threadName");
29      return le;
30    }
31  }