1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.pluto.portalImpl.services.log;
21
22 import org.apache.commons.logging.LogFactory;
23 import org.apache.pluto.services.log.Logger;
24
25 /*** LogService implementation which uses Commons Logging.
26 * The use of commons logging provides us with a simple yet
27 * effective way to abstract the logging implementation. Commons
28 * Logging will be initialized in it's default manner according
29 * to: http://jakarta.apache.org/commons/logging/userguide.html.
30 *
31 * If no configuraiton is found, Commons Logging will use it's
32 * SimpleLog configuration, which will log everything to standard
33 * error.
34 */
35 public class LogServiceImpl
36 extends LogService {
37
38 public Logger getLogger(String component) {
39 return new LoggerImpl(
40 LogFactory.getLog(component)
41 );
42
43 }
44
45 public Logger getLogger(Class klass) {
46 return new LoggerImpl(
47 LogFactory.getLog(klass)
48 );
49 }
50
51 }