|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ivy.util.MessageLoggerEngine
public class MessageLoggerEngine
A MessageLogger
implementation delegating the work to the current top logger on a stack.
When the logger stack is empty, it delegates the work to a default logger, which by default is
the Message.getDefaultLogger()
.
pushLogger(MessageLogger)
should be called to delegate to a new logger, and
popLogger()
should be called when the context of this logger is finished.
Constructor Summary | |
---|---|
MessageLoggerEngine()
|
Method Summary | |
---|---|
void |
clearProblems()
Clears the list of problems, warns and errors. |
void |
debug(java.lang.String msg)
|
void |
deprecated(java.lang.String msg)
|
void |
endProgress()
|
void |
endProgress(java.lang.String msg)
|
void |
error(java.lang.String msg)
|
java.util.List |
getErrors()
|
java.util.List |
getProblems()
|
java.util.List |
getWarns()
|
void |
info(java.lang.String msg)
|
boolean |
isShowProgress()
|
void |
log(java.lang.String msg,
int level)
Logs a message at the given level. |
void |
popLogger()
Pops a logger from the logger stack. |
void |
progress()
|
void |
pushLogger(MessageLogger logger)
Push a logger on the stack. |
void |
rawinfo(java.lang.String msg)
|
void |
rawlog(java.lang.String msg,
int level)
Same as MessageLogger.log(String, int) , but without adding any contextual information to the
message. |
void |
setDefaultLogger(MessageLogger defaultLogger)
Sets the logger used when the stack is empty. |
void |
setShowProgress(boolean progress)
|
void |
sumupProblems()
Sumup all problems encountered so far, and clear them. |
void |
verbose(java.lang.String msg)
|
void |
warn(java.lang.String msg)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MessageLoggerEngine()
Method Detail |
---|
public void setDefaultLogger(MessageLogger defaultLogger)
defaultLogger
- the logger to use when the stack is empty.public void pushLogger(MessageLogger logger)
logger
- the logger to push. Must not be null
.public void popLogger()
Does nothing if the logger stack is empty
public void warn(java.lang.String msg)
warn
in interface MessageLogger
public void error(java.lang.String msg)
error
in interface MessageLogger
public java.util.List getErrors()
getErrors
in interface MessageLogger
public java.util.List getProblems()
getProblems
in interface MessageLogger
public java.util.List getWarns()
getWarns
in interface MessageLogger
public void sumupProblems()
MessageLogger
sumupProblems
in interface MessageLogger
public void clearProblems()
MessageLogger
clearProblems
in interface MessageLogger
public void setShowProgress(boolean progress)
setShowProgress
in interface MessageLogger
public boolean isShowProgress()
isShowProgress
in interface MessageLogger
public void debug(java.lang.String msg)
debug
in interface MessageLogger
public void deprecated(java.lang.String msg)
deprecated
in interface MessageLogger
public void endProgress()
endProgress
in interface MessageLogger
public void endProgress(java.lang.String msg)
endProgress
in interface MessageLogger
public void info(java.lang.String msg)
info
in interface MessageLogger
public void rawinfo(java.lang.String msg)
rawinfo
in interface MessageLogger
public void log(java.lang.String msg, int level)
MessageLogger
level
constants are defined in the Message
class.
log
in interface MessageLogger
msg
- the message to loglevel
- the level at which the message should be logged.Message.MSG_DEBUG
,
Message.MSG_VERBOSE
,
Message.MSG_INFO
,
Message.MSG_WARN
,
Message#MSG_ERROR
public void progress()
progress
in interface MessageLogger
public void rawlog(java.lang.String msg, int level)
MessageLogger
MessageLogger.log(String, int)
, but without adding any contextual information to the
message.
rawlog
in interface MessageLogger
msg
- the message to loglevel
- the level at which the message should be logged.public void verbose(java.lang.String msg)
verbose
in interface MessageLogger
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |