1
19
20 package com.liferay.portal.kernel.log;
21
22 import java.util.logging.Level;
23 import java.util.logging.Logger;
24
25
31 public class Jdk14LogImpl implements Log {
32
33 public Jdk14LogImpl(Logger log) {
34 _log = log;
35 }
36
37 public void debug(Object msg) {
38 _log.log(Level.FINE, msg.toString());
39 }
40
41 public void debug(Throwable t) {
42 _log.log(Level.FINE, t.getMessage(), t);
43 }
44
45 public void debug(Object msg, Throwable t) {
46 _log.log(Level.FINE, msg.toString(), t);
47 }
48
49 public void error(Object msg) {
50 _log.log(Level.SEVERE, msg.toString());
51 }
52
53 public void error(Throwable t) {
54 _log.log(Level.SEVERE, t.getMessage(), t);
55 }
56
57 public void error(Object msg, Throwable t) {
58 _log.log(Level.SEVERE, msg.toString(), t);
59 }
60
61 public void fatal(Object msg) {
62 _log.log(Level.SEVERE, msg.toString());
63 }
64
65 public void fatal(Throwable t) {
66 _log.log(Level.SEVERE, t.getMessage(), t);
67 }
68
69 public void fatal(Object msg, Throwable t) {
70 _log.log(Level.SEVERE, msg.toString(), t);
71 }
72
73 public void info(Object msg) {
74 _log.log(Level.INFO, msg.toString());
75 }
76
77 public void info(Throwable t) {
78 _log.log(Level.INFO, t.getMessage(), t);
79 }
80
81 public void info(Object msg, Throwable t) {
82 _log.log(Level.INFO, msg.toString(), t);
83 }
84
85 public boolean isDebugEnabled() {
86 return _log.isLoggable(Level.FINE);
87 }
88
89 public boolean isErrorEnabled() {
90 return _log.isLoggable(Level.SEVERE);
91 }
92
93 public boolean isFatalEnabled() {
94 return _log.isLoggable(Level.SEVERE);
95 }
96
97 public boolean isInfoEnabled() {
98 return _log.isLoggable(Level.INFO);
99 }
100
101 public boolean isTraceEnabled() {
102 return _log.isLoggable(Level.FINEST);
103 }
104
105 public boolean isWarnEnabled() {
106 return _log.isLoggable(Level.WARNING);
107 }
108
109 public void trace(Object msg) {
110 _log.log(Level.FINEST, msg.toString());
111 }
112
113 public void trace(Throwable t) {
114 _log.log(Level.FINEST, t.getMessage(), t);
115 }
116
117 public void trace(Object msg, Throwable t) {
118 _log.log(Level.FINEST, msg.toString(), t);
119 }
120
121 public void warn(Object msg) {
122 _log.log(Level.WARNING, msg.toString());
123 }
124
125 public void warn(Throwable t) {
126 _log.log(Level.WARNING, t.getMessage(), t);
127 }
128
129 public void warn(Object msg, Throwable t) {
130 _log.log(Level.WARNING, msg.toString(), t);
131 }
132
133 private Logger _log;
134
135 }