Adaptive Media Player

AmpCore Docs

AmpLogger

open class AmpLogger

This class manages the logging of the event of the player

  • Instance of an AmpLoggerInspector to listen to the logging events

    Declaration

    Swift

    public static var ampLoggerInspector: AmpLoggerInspector?
  • This propety determines the types of log that are wanted

    The default value is verbose

    Declaration

    Swift

    public static var logLevel: AmpLogLevel
  • This flag enables or disables the logging feature

    The default value is true

    Declaration

    Swift

    public static var isEnabled: Bool
  • This property is the String representation of a file path to write the logs in.

    The default value is nil

    Declaration

    Swift

    public static var pathToWrite: String?
  • Writes a new verbose log into the console or file

    The path, fucntion, and line parameters are autogenerated, there is no need to send this values

    Declaration

    Swift

    public static func verbose(_ message: String, _ path: String = #file, _ function: String = #function, _ line: Int = #line)

    Parameters

    message

    String representation of the log message

    path

    String representation of the file path where the log was originated

    function

    String representation of the function name where the log was originated

    line

    String representation of the line number where the log was called

  • Writes a new debug log into the console or file

    The path, function, and line parameters are autogenerated, there is no need to send these values

    Declaration

    Swift

    public static func debug(_ message: String, _ path: String = #file, _ function: String = #function, _ line: Int = #line)

    Parameters

    message

    String representation of the log message

    path

    String representation of the file path where the log was originated

    function

    String representation of the function name where the log was originated

    line

    String representation of the line number where the log was called

  • Writes a new info log into the console or file

    The path, fucntion, and line parameters are autogenerated, there is no need to send this values

    Declaration

    Swift

    public static func info(_ message: String, _ path: String = #file, _ function: String = #function, _ line: Int = #line)

    Parameters

    message

    String representation of the log message

    path

    String representation of the file path where the log was originated

    function

    String representation of the function name where the log was originated

    line

    String representation of the line number where the log was called

  • Writes a new warning log into the console or file

    The path, fucntion, and line parameters are autogenerated, there is no need to send this values

    Declaration

    Swift

    public static func warning(_ message: String, _ path: String = #file, _ function: String = #function, _ line: Int = #line)

    Parameters

    message

    String representation of the log message

    path

    String representation of the file path where the log was originated

    function

    String representation of the function name where the log was originated

    line

    String representation of the line number where the log was called

  • Writes a new error log into the console or file

    The path, fucntion, and line parameters are autogenerated, there is no need to send this values

    Declaration

    Swift

    public static func error(_ message: String, _ path: String = #file, _ function: String = #function, _ line: Int = #line)

    Parameters

    message

    String representation of the log message

    path

    String representation of the file path where the log was originated

    function

    String representation of the function name where the log was originated

    line

    String representation of the line number where the log was called

  • This function deletes the logging file.

    Declaration

    Swift

    public static func deleteFile()