Diffusion Apple API  6.7.4
Unified Client Library for iOS, tvOS and OS X / macOS
 All Classes Files Functions Variables Enumerations Enumerator Properties Pages
Class Methods | Properties | Instance Methods | List of all members
PTDiffusionLogging Class Reference

Introduction

Logging provides access to debug information that can be enabled at runtime.

Changes to properties here have immediate effect on the verbosity or otherwise of log output.

The format of output log messages is subject to change.

By default messages are sent to the Apple System Log facility using synchronous calls to the Foundation framework's NSLog function. The destinationConfiguration property can be used to change this behaviour.

Since
5.7
Inheritance diagram for PTDiffusionLogging:

Class Methods

(PTDiffusionLogging *) + logging
 

Properties

BOOL enabled
 
PTDiffusionLoggingLevellevel
 
PTDiffusionLoggingDestinationConfigurationdestinationConfiguration
 

Instance Methods

(void) - setFormat:
 
(void) - reset
 

Method Documentation

+ (PTDiffusionLogging *) logging

Returns the Diffusion logging object representing the current application process.

Returns
Singleton Diffusion logging object representing the current application process.
Since
5.7
- (void) reset

Set all properties to default values, as required for production use when debugging information is not required or desired. A call to this method turns off all runtime-switchable log output.

Note
This method intentionally does not reset the destinationConfiguration property.
Since
5.7
- (void) setFormat: (NSString *)  format

Set the format of log message output. The syntax of this string is subject to change so the required formatting tokens are not documented or intended to be constructed for use by application developers unless instructed by a member of support staff in order to assist in debugging an issue.

Parameters
formatThe format of log message output.
Since
5.7

Property Documentation

- (PTDiffusionLoggingDestinationConfiguration*) destinationConfiguration
readwritenonatomicassign

Options allowing log output to be directed to a custom location.

The default value for this property is nil, specifying that messages should be sent to the Apple System Log facility using synchronous calls to the Foundation framework's NSLog function.

Since
6.0
- (BOOL) enabled
readwritenonatomicassign

Global switch to switch on or off logging. A value of YES switches logging on and a value of NO switches it off.

The default value for this property is NO.

Note
Logging may be switched on using this property but the amount of informational messages output depends on the combination of other properties defined by this interface.
Since
5.7
- (PTDiffusionLoggingLevel*) level
readwritenonatomicassign

The ranking of information messages required to be output. This property allows the granularity of log output to be set. Only messages ranked at this granularity or above will be enabled.

The default value for this property is [PTDiffusionLoggingLevel info].

Since
5.7