Class Log

  • All Implemented Interfaces:
    java.io.Serializable

    public class Log
    extends java.lang.Object
    implements java.io.Serializable
    A Log is a list of messages where each messages has a Log.LogType.
    Author:
    Copyright (c) 2014-2020 Piketec GmbH - MIT License (MIT) - All rights reserved
    See Also:
    Serialized Form
    • Field Detail

      • errorCount

        protected int errorCount
      • warningCount

        protected int warningCount
      • infoCount

        protected int infoCount
    • Constructor Detail

      • Log

        public Log()
    • Method Detail

      • addError

        public void addError​(java.lang.String message)
        Adds a new log entry with Log.LogType.ERROR
        Parameters:
        message - The message text
      • getErrorCount

        public int getErrorCount()
        Returns:
        The amout of error messages contained in this log.
      • addWarning

        public void addWarning​(java.lang.String message)
        Adds a new log entry with Log.LogType.WARNING
        Parameters:
        message - The message text
      • getWarningCount

        public int getWarningCount()
        Returns:
        The amout of warning messages contained in this log.
      • addInfo

        public void addInfo​(java.lang.String message)
        Adds a new log entry with Log.LogType.INFO
        Parameters:
        message - The message text
      • getInfoCount

        public int getInfoCount()
        Returns:
        The amout of info messages contained in this log.
      • getEntries

        public java.util.List<Log.LogEntry> getEntries()
        Returns:
        all log entries of all LogTypes of this log as an unmodifiable list.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object