MibLoaderLog (Mibble 2.10.1 Documentation)
Date: 2017-02-20

net.percederberg.mibble

## Class MibLoaderLog

- java.lang.Object
- - net.percederberg.mibble.MibLoaderLog

-     public class MibLoaderLog
      extends java.lang.Object

  A MIB loader log. This class contains error and warning messages from loading a MIB file and all imports not previously loaded.
  Since:
    2.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `MibLoaderLog.LogEntry` A log entry.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MibLoaderLog()` Creates a new loader log without entries.

  - ### Method Summary

    Methods
    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.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MibLoaderLog

          public MibLoaderLog()

      Creates a new loader log without entries.

  - ### Method Detail

    - #### errorCount

          public int errorCount()

      Returns the number of errors in the log.
      Returns:
        the number of errors in the log

    - #### warningCount

          public int warningCount()

      Returns the number of warnings in the log.
      Returns:
        the number of warnings in the log

    - #### add

          public void add(MibLoaderLog.LogEntry entry)

      Adds a log entry to this log.
      Parameters:
        `entry` - the log entry to add

    - #### addInternalError

          public void addInternalError(java.lang.String message)

      Adds an internal error message to the log. Internal errors are only issued when possible bugs are encountered. They are counted as errors.
      Parameters:
        `message` - the error message

    - #### addError

          public void addError(MibException e)

      Adds an error message to the log.
      Parameters:
        `e` - the MIB exception cause

    - #### addError

          public void addError(MibFileRef fileRef,
                      java.lang.String message)

      Adds an error message to the log.
      Parameters:
        `fileRef` - the MIB file location
        `message` - the error message

    - #### addWarning

          public void addWarning(MibFileRef fileRef,
                        java.lang.String message)

      Adds a warning message to the log.
      Parameters:
        `fileRef` - the MIB file location
        `message` - the warning message

    - #### addAll

          public void addAll(MibLoaderLog log)

      Adds all log entries from another log.
      Parameters:
        `log` - the MIB loader log

    - #### entries

          public java.util.Iterator<MibLoaderLog.LogEntry> entries()

      Returns an iterator with all the log entries. The iterator will only return LogEntry instances.
      Returns:
        an iterator with all the log entries
      Since:
        2.2
      See Also:
        `MibLoaderLog.LogEntry`

    - #### printTo

          public void printTo(java.io.PrintStream output)

      Prints all log entries to the specified output stream.
      Parameters:
        `output` - the output stream to use

    - #### printTo

          public void printTo(java.io.PrintWriter output)

      Prints all log entries to the specified output stream.
      Parameters:
        `output` - the output stream to use

    - #### printTo

          public void printTo(java.io.PrintWriter output,
                     int margin)

      Prints all log entries to the specified output stream.
      Parameters:
        `output` - the output stream to use
        `margin` - the print margin
      Since:
        2.2