WebcomLog

public struct WebcomLog : CustomStringConvertible, CustomDebugStringConvertible

A value that contains a log.

Logs produced by the SDK use this type.

Types

  • A value representing a log level.

    See more

    Declaration

    Swift

    @frozen
    public enum Level : Int, CaseIterable, Hashable, SelfIdentifiable
  • A value representing a log category.

    Categories are used to group logs related to the same subject.

    See more

    Declaration

    Swift

    public struct Category : Hashable

Constants

  • A log with empty content.

    Declaration

    Swift

    public static let empty: WebcomLog

Stored Properties

  • The date when the log was produced.

    Declaration

    Swift

    public let date: Date
  • The level of the log.

    Declaration

    Swift

    public let level: Level
  • The category of the log.

    Declaration

    Swift

    public let category: Category
  • The message of the log.

    Declaration

    Swift

    public let message: String
  • The location in source code where the log was produced.

    Declaration

    Swift

    public let location: WebcomLocation

API

  • Sends the log to the os.log logging system.

    This method is designed to be used by applications when they set the Webcom.log closure.

    With iOS 9, this method uses NSLog instead of os_log.

    Declaration

    Swift

    public func systemLog()
  • Prints the log to the standard output.

    This method is designed to be used by applications when they set the Webcom.log closure.

    Declaration

    Swift

    public func print()

CustomDebugStringConvertible Protocol

  • Declaration

    Swift

    public var description: String { get }
  • Declaration

    Swift

    public var debugDescription: String { get }