1 | package org.apache.continuum.scm.manager; |
2 | |
3 | /* |
4 | * Licensed to the Apache Software Foundation (ASF) under one |
5 | * or more contributor license agreements. See the NOTICE file |
6 | * distributed with this work for additional information |
7 | * regarding copyright ownership. The ASF licenses this file |
8 | * to you under the Apache License, Version 2.0 (the |
9 | * "License"); you may not use this file except in compliance |
10 | * with the License. You may obtain a copy of the License at |
11 | * |
12 | * http://www.apache.org/licenses/LICENSE-2.0 |
13 | * |
14 | * Unless required by applicable law or agreed to in writing, |
15 | * software distributed under the License is distributed on an |
16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
17 | * KIND, either express or implied. See the License for the |
18 | * specific language governing permissions and limitations |
19 | * under the License. |
20 | */ |
21 | |
22 | import org.apache.maven.scm.log.ScmLogger; |
23 | import org.slf4j.Logger; |
24 | import org.slf4j.LoggerFactory; |
25 | import org.springframework.stereotype.Service; |
26 | |
27 | /** |
28 | * SLF4J logger for Maven SCM. |
29 | * |
30 | * @version $Id: Slf4jScmLogger.java 765340 2009-04-15 20:22:00Z evenisse $ |
31 | * @todo move to maven-scm? |
32 | */ |
33 | @Service("scmLogger") |
34 | public class Slf4jScmLogger |
35 | implements ScmLogger |
36 | { |
37 | private static final Logger logger = LoggerFactory.getLogger( Slf4jScmLogger.class ); |
38 | |
39 | public void debug( String arg0 ) |
40 | { |
41 | logger.debug( arg0 ); |
42 | } |
43 | |
44 | public void debug( Throwable arg0 ) |
45 | { |
46 | logger.debug( "Exception", arg0 ); |
47 | } |
48 | |
49 | public void debug( String arg0, Throwable arg1 ) |
50 | { |
51 | logger.debug( arg0, arg1 ); |
52 | } |
53 | |
54 | public void error( String arg0 ) |
55 | { |
56 | logger.error( arg0 ); |
57 | } |
58 | |
59 | public void error( Throwable arg0 ) |
60 | { |
61 | logger.error( "Exception", arg0 ); |
62 | } |
63 | |
64 | public void error( String arg0, Throwable arg1 ) |
65 | { |
66 | logger.error( arg0, arg1 ); |
67 | } |
68 | |
69 | public void info( String arg0 ) |
70 | { |
71 | logger.info( arg0 ); |
72 | } |
73 | |
74 | public void info( Throwable arg0 ) |
75 | { |
76 | logger.info( "Exception", arg0 ); |
77 | } |
78 | |
79 | public void info( String arg0, Throwable arg1 ) |
80 | { |
81 | logger.info( arg0, arg1 ); |
82 | } |
83 | |
84 | public boolean isDebugEnabled() |
85 | { |
86 | return logger.isDebugEnabled(); |
87 | } |
88 | |
89 | public boolean isErrorEnabled() |
90 | { |
91 | return logger.isErrorEnabled(); |
92 | } |
93 | |
94 | public boolean isInfoEnabled() |
95 | { |
96 | return logger.isInfoEnabled(); |
97 | } |
98 | |
99 | public boolean isWarnEnabled() |
100 | { |
101 | return logger.isWarnEnabled(); |
102 | } |
103 | |
104 | public void warn( String arg0 ) |
105 | { |
106 | logger.warn( arg0 ); |
107 | } |
108 | |
109 | public void warn( Throwable arg0 ) |
110 | { |
111 | logger.warn( "Exception", arg0 ); |
112 | } |
113 | |
114 | public void warn( String arg0, Throwable arg1 ) |
115 | { |
116 | logger.warn( arg0, arg1 ); |
117 | } |
118 | } |