View Javadoc
1   package org.apache.maven.scm.manager.plexus;
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.codehaus.plexus.logging.Logger;
24  
25  /**
26   * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
27   *
28   */
29  public class PlexusLogger
30      implements ScmLogger
31  {
32      private Logger logger;
33  
34      public PlexusLogger( Logger logger )
35      {
36          this.logger = logger;
37      }
38  
39      /** {@inheritDoc} */
40      public boolean isDebugEnabled()
41      {
42          return logger.isDebugEnabled();
43      }
44  
45      /** {@inheritDoc} */
46      public void debug( String content )
47      {
48          logger.debug( content );
49      }
50  
51      /** {@inheritDoc} */
52      public void debug( String content, Throwable error )
53      {
54          logger.debug( content, error );
55      }
56  
57      /** {@inheritDoc} */
58      public void debug( Throwable error )
59      {
60          logger.debug( "", error );
61      }
62  
63      /** {@inheritDoc} */
64      public boolean isInfoEnabled()
65      {
66          return logger.isInfoEnabled();
67      }
68  
69      /** {@inheritDoc} */
70      public void info( String content )
71      {
72          logger.info( content );
73      }
74  
75      /** {@inheritDoc} */
76      public void info( String content, Throwable error )
77      {
78          logger.info( content, error );
79      }
80  
81      /** {@inheritDoc} */
82      public void info( Throwable error )
83      {
84          logger.info( "", error );
85      }
86  
87      /** {@inheritDoc} */
88      public boolean isWarnEnabled()
89      {
90          return logger.isWarnEnabled();
91      }
92  
93      /** {@inheritDoc} */
94      public void warn( String content )
95      {
96          logger.warn( content );
97      }
98  
99      /** {@inheritDoc} */
100     public void warn( String content, Throwable error )
101     {
102         logger.warn( content, error );
103     }
104 
105     /** {@inheritDoc} */
106     public void warn( Throwable error )
107     {
108         logger.warn( "", error );
109     }
110 
111     /** {@inheritDoc} */
112     public boolean isErrorEnabled()
113     {
114         return logger.isErrorEnabled();
115     }
116 
117     /** {@inheritDoc} */
118     public void error( String content )
119     {
120         logger.error( content );
121     }
122 
123     /** {@inheritDoc} */
124     public void error( String content, Throwable error )
125     {
126         logger.error( content, error );
127     }
128 
129     /** {@inheritDoc} */
130     public void error( Throwable error )
131     {
132         logger.error( "", error );
133     }
134 }