org.apache.ivy.util

Interface MessageLogger

public interface MessageLogger

A MessageLogger is used to log messages.

Where the messages are logged is depending on the implementation.

This interface provides both level specific methods (info, warn, ...) and generic methods (MessageLogger, MessageLogger). Note that calling level specific methods is usually not equivalent to calling the generic method with the corresponding level. Indeed, for warn and error level, the implementation will actually log the message at a lower level (usually MSG_VERBOSE) and log the message at the actual level only when sumupProblems is called.

See Also: Message

Method Summary
abstract voidclearProblems()
Clears the list of problems, warns and errors.
abstract voiddebug(String msg)
abstract voiddeprecated(String msg)
abstract voidendProgress()
abstract voidendProgress(String msg)
abstract voiderror(String msg)
abstract ListgetErrors()
abstract ListgetProblems()
abstract ListgetWarns()
abstract voidinfo(String msg)
abstract booleanisShowProgress()
abstract voidlog(String msg, int level)
Logs a message at the given level.
abstract voidprogress()
abstract voidrawinfo(String msg)
abstract voidrawlog(String msg, int level)
Same as MessageLogger, but without adding any contextual information to the message.
abstract voidsetShowProgress(boolean progress)
abstract voidsumupProblems()
Sumup all problems encountered so far, and clear them.
abstract voidverbose(String msg)
abstract voidwarn(String msg)

Method Detail

clearProblems

public abstract void clearProblems()
Clears the list of problems, warns and errors.

debug

public abstract void debug(String msg)

deprecated

public abstract void deprecated(String msg)

endProgress

public abstract void endProgress()

endProgress

public abstract void endProgress(String msg)

error

public abstract void error(String msg)

getErrors

public abstract List getErrors()

getProblems

public abstract List getProblems()

getWarns

public abstract List getWarns()

info

public abstract void info(String msg)

isShowProgress

public abstract boolean isShowProgress()

log

public abstract void log(String msg, int level)
Logs a message at the given level.

level constants are defined in the Message class.

Parameters: msg the message to log level the level at which the message should be logged.

See Also: MSG_DEBUG MSG_VERBOSE MSG_INFO MSG_WARN Message

progress

public abstract void progress()

rawinfo

public abstract void rawinfo(String msg)

rawlog

public abstract void rawlog(String msg, int level)
Same as MessageLogger, but without adding any contextual information to the message.

Parameters: msg the message to log level the level at which the message should be logged.

setShowProgress

public abstract void setShowProgress(boolean progress)

sumupProblems

public abstract void sumupProblems()
Sumup all problems encountered so far, and clear them.

verbose

public abstract void verbose(String msg)

warn

public abstract void warn(String msg)