1
2
3
4
5
6
7 package org.slf4j.impl;
8
9 import org.mule.module.logging.MuleLoggerFactory;
10
11 import org.apache.log4j.Level;
12 import org.slf4j.ILoggerFactory;
13 import org.slf4j.LoggerFactory;
14 import org.slf4j.helpers.Util;
15 import org.slf4j.spi.LoggerFactoryBinder;
16
17
18
19
20
21
22 public class StaticLoggerBinder implements LoggerFactoryBinder {
23
24
25
26
27
28 private static final StaticLoggerBinder SINGLETON = new StaticLoggerBinder();
29
30
31
32
33
34
35 public static final StaticLoggerBinder getSingleton() {
36 return SINGLETON;
37 }
38
39
40
41
42
43
44 public static String REQUESTED_API_VERSION = "1.6";
45
46 private static final String loggerFactoryClassStr = MuleLoggerFactory.class
47 .getName();
48
49
50
51
52
53 private final ILoggerFactory loggerFactory;
54
55 private StaticLoggerBinder() {
56 loggerFactory = new MuleLoggerFactory();
57 try {
58 Level level = Level.TRACE;
59 } catch (NoSuchFieldError nsfe) {
60 Util
61 .report("This version of SLF4J requires log4j version 1.2.12 or later. See also http://www.slf4j.org/codes.html#log4j_version");
62 }
63 }
64
65 public ILoggerFactory getLoggerFactory() {
66 return loggerFactory;
67 }
68
69 public String getLoggerFactoryClassStr() {
70 return loggerFactoryClassStr;
71 }
72 }