public class MibLoaderLog
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
MibLoaderLog.LogEntry
A log entry.
|
Constructor and Description |
---|
MibLoaderLog()
Creates a new loader log without entries.
|
Modifier and Type | Method and Description |
---|---|
void |
add(MibLoaderLog.LogEntry entry)
Adds a log entry to this log.
|
void |
addAll(MibLoaderLog log)
Adds all log entries from another log.
|
void |
addError(MibException e)
Adds an error message to the log.
|
void |
addError(MibFileRef fileRef,
java.lang.String message)
Adds an error message to the log.
|
void |
addInternalError(java.lang.String message)
Adds an internal error message to the log.
|
void |
addWarning(MibFileRef fileRef,
java.lang.String message)
Adds a warning message to the log.
|
java.util.Iterator<MibLoaderLog.LogEntry> |
entries()
Returns an iterator with all the log entries.
|
int |
errorCount()
Returns the number of errors in the log.
|
void |
printTo(java.io.PrintStream output)
Prints all log entries to the specified output stream.
|
void |
printTo(java.io.PrintWriter output)
Prints all log entries to the specified output stream.
|
void |
printTo(java.io.PrintWriter output,
int margin)
Prints all log entries to the specified output stream.
|
int |
warningCount()
Returns the number of warnings in the log.
|
public int errorCount()
public int warningCount()
public void add(MibLoaderLog.LogEntry entry)
entry
- the log entry to addpublic void addInternalError(java.lang.String message)
message
- the error messagepublic void addError(MibException e)
e
- the MIB exception causepublic void addError(MibFileRef fileRef, java.lang.String message)
fileRef
- the MIB file locationmessage
- the error messagepublic void addWarning(MibFileRef fileRef, java.lang.String message)
fileRef
- the MIB file locationmessage
- the warning messagepublic void addAll(MibLoaderLog log)
log
- the MIB loader logpublic java.util.Iterator<MibLoaderLog.LogEntry> entries()
MibLoaderLog.LogEntry
public void printTo(java.io.PrintStream output)
output
- the output stream to usepublic void printTo(java.io.PrintWriter output)
output
- the output stream to usepublic void printTo(java.io.PrintWriter output, int margin)
output
- the output stream to usemargin
- the print margin