1 package org
.argeo
.slc
.maven
.embedder
;
4 * Copyright 2001-2005 The Apache Software Foundation.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 * @author <a href="mailto:trygvis@inamo.no">Trygve Laugstøl</a>
21 * @version $Id: AbstractMavenEmbedderLogger.java 292888 2005-10-01 01:17:36Z jvanzyl $
23 public abstract class AbstractMavenEmbedderLogger
24 implements MavenEmbedderLogger
26 private int threshold
= MavenEmbedderLogger
.LEVEL_INFO
;
30 public int getThreshold()
35 public void setThreshold( int threshold
)
37 this.threshold
= threshold
;
40 public String
getName()
45 public void debug( String message
)
47 debug( message
, null );
50 public boolean isDebugEnabled()
52 return threshold
<= LEVEL_DEBUG
;
55 public void info( String message
)
57 info( message
, null );
60 public boolean isInfoEnabled()
62 return threshold
<= LEVEL_INFO
;
65 public void warn( String message
)
67 warn( message
, null );
70 public boolean isWarnEnabled()
72 return threshold
<= LEVEL_WARN
;
75 public void error( String message
)
77 error( message
, null );
80 public boolean isErrorEnabled()
82 return threshold
<= LEVEL_ERROR
;
85 public void fatalError( String message
)
87 fatalError( message
, null );
90 public boolean isFatalErrorEnabled()
92 return threshold
<= LEVEL_FATAL
;
95 protected boolean isValidThreshold( int threshold
)
97 if ( threshold
== LEVEL_DEBUG
)
101 if ( threshold
== LEVEL_INFO
)
105 if ( threshold
== LEVEL_WARN
)
109 if ( threshold
== LEVEL_ERROR
)
113 if ( threshold
== LEVEL_FATAL
)
117 if ( threshold
== LEVEL_DISABLED
)