Logging

A logging class that can be told where to log to via transports.

Features include:

  • Asynchronous, ordered output to transports
  • Optionally keeps a history of logs
  • All log messages can be tagged
  • LogLevels are provided as well
  • Force logging enables output via print even if no transports available

## Filtering

Two methods exist to allow for filtering of the log stream.

  • The logger class is used within the library to output logs of what is going on. Multi-threading and task management is very complicated and having logs can help immensely when it comes to debugging purposes

    Everytime the log function is called, a number of tags are automatically produced that are attached to the message. These are:

    • the function name that the log is called from
    • The thread that the log is called from (UI or BG - for background)
    • The filename
    • The log level (see LogLevel)

    This class is also made public so the API is meant to be stable

    There’re also a number of predefined tags that the logs from within the library use. See LogTags for a list.

    See more

    Declaration

    Swift

    public class Logger
  • Thes log tags can be passed to filter the logs produced by Tasker. This can be used to aid in debugging, or to get information about what your tasks are up to.

    SeeAlso:

    See more

    Declaration

    Swift

    public struct LogTags
  • You can specify log levels when calling any of the log functions of Logger

    See more

    Declaration

    Swift

    public enum LogLevel : String