com.h3c.sdn.adm.log

## Interface LogService

-     public interface LogService

  Service for collecting various support log files.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearLogEntries()` Clears all log entries from the log buffer.
    `File` | `collectLogs()` Collects the local system support log files into a single ZIP log file.
    `File` | `collectTeamLogs()` Collects the support log files from all team-members, including this system, into a single ZIP file of ZIP file(s).
    `List<LogEntry>` | `logEntries()` Returns the log entries currently stored in the log buffer.
    `int` | `logEntriesCapacity()` Returns the log entries capacity.
    `String` | `requestTeamLogs()` Request asynchronous collection of support log data from all team members.
    `File` | `retrieveTeamLogs(String ticket)` Retrieve the zip file containing the support log data from all team members, based on the given ticket.

- - ### Method Detail

    - #### collectLogs

          File collectLogs()
                           throws IOException

      Collects the local system support log files into a single ZIP log file.
      Returns:
        temporary file containing the collected logs
      Throws:
        `IOException` - if unable to collect logs

    - #### collectTeamLogs

          File collectTeamLogs()
                               throws IOException

      Collects the support log files from all team-members, including this system, into a single ZIP file of ZIP file(s). The support log collection is done as port of a synchronous call.
      Returns:
        temporary file containing the collected logs
      Throws:
        `IOException` - if unable to collect logs

    - #### requestTeamLogs

          String requestTeamLogs()
                                 throws IOException

      Request asynchronous collection of support log data from all team members. A ticket is issued representing the unique identification of this request for support log data. The consumers of this method must call back via the `retrieveTeamLogs(java.lang.String)` method with the issued ticket to obtain the support log data.
      Returns:
        the unique ticket to retrieve the log data once collected
      Throws:
        `IOException` - if staging area for log file collection cannot be created

    - #### retrieveTeamLogs

          File retrieveTeamLogs(String ticket)

      Retrieve the zip file containing the support log data from all team members, based on the given ticket. If unable to locate a matching request for asynchronous collection of support log data, an `IllegalArgumentException` is thrown.
      Parameters:
        `ticket` - the ticket issued when the requst was made
      Returns:
        the collected long data

    - #### logEntries

          List<LogEntry> logEntries()

      Returns the log entries currently stored in the log buffer.
      Returns:
        list of log entries

    - #### clearLogEntries

          void clearLogEntries()

      Clears all log entries from the log buffer.

    - #### logEntriesCapacity

          int logEntriesCapacity()

      Returns the log entries capacity.
      Returns:
        the log entries capacity

Copyright © 2014. All Rights Reserved.