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