org.apache.maven.dotnet.embedder.logger
Class SocketLogger
java.lang.Object
org.codehaus.plexus.logging.AbstractLogger
org.apache.maven.dotnet.embedder.logger.SocketLogger
- All Implemented Interfaces:
- org.codehaus.plexus.logging.Logger
public class SocketLogger
- extends org.codehaus.plexus.logging.AbstractLogger
Provides logging services for writing log messages over a socket port.
- Author:
- Shane Isbell
TODO: This class needs a lot more work. Currently only support INFO messages.
Fields inherited from interface org.codehaus.plexus.logging.Logger |
LEVEL_DEBUG, LEVEL_DISABLED, LEVEL_ERROR, LEVEL_FATAL, LEVEL_INFO, LEVEL_WARN |
Constructor Summary |
SocketLogger(int threshold)
Constructor. |
Method Summary |
void |
debug(java.lang.String message,
java.lang.Throwable throwable)
|
void |
error(java.lang.String message,
java.lang.Throwable throwable)
|
void |
fatalError(java.lang.String message,
java.lang.Throwable throwable)
|
org.codehaus.plexus.logging.Logger |
getChildLogger(java.lang.String name)
|
void |
info(java.lang.String message)
|
void |
info(java.lang.String message,
java.lang.Throwable throwable)
|
void |
setHandlerFor(int port)
Sets a socket handler on the logger for the specified port. |
void |
warn(java.lang.String message,
java.lang.Throwable throwable)
|
Methods inherited from class org.codehaus.plexus.logging.AbstractLogger |
debug, error, fatalError, getName, getThreshold, isDebugEnabled, isErrorEnabled, isFatalErrorEnabled, isInfoEnabled, isValidThreshold, isWarnEnabled, setThreshold, warn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SocketLogger
public SocketLogger(int threshold)
- Constructor. This method is intended to by invoked by an instance of the org.codehaus.plexus.logging.LoggerManager
class, not by the application developer.
- Parameters:
threshold
- the threshold for the logger. If the log message level is below this defined level, the logger
will not write out the log.
setHandlerFor
public void setHandlerFor(int port)
throws java.io.IOException
- Sets a socket handler on the logger for the specified port. The host will be local. The application may
re-invoke this method to set a new port for the logger.
- Parameters:
port
- the socket port of the loggers socket handler.
- Throws:
java.io.IOException
- if there is a problem binding to the specified port
getChildLogger
public org.codehaus.plexus.logging.Logger getChildLogger(java.lang.String name)
debug
public void debug(java.lang.String message,
java.lang.Throwable throwable)
info
public void info(java.lang.String message)
- Specified by:
info
in interface org.codehaus.plexus.logging.Logger
- Overrides:
info
in class org.codehaus.plexus.logging.AbstractLogger
info
public void info(java.lang.String message,
java.lang.Throwable throwable)
warn
public void warn(java.lang.String message,
java.lang.Throwable throwable)
error
public void error(java.lang.String message,
java.lang.Throwable throwable)
fatalError
public void fatalError(java.lang.String message,
java.lang.Throwable throwable)
Copyright © 2007 NMaven. All Rights Reserved.