# TCGBLogger Class Reference

Inherits from | NSObject
Declared in | TCGBLogger.h TCGBLogger.m

### `+ initializeWithConfiguration:`

Initialize the singletone instance of a TCGBLogger.

`+ (void)initializeWithConfiguration:(TCGBLoggerConfiguration *)configuration`

#### Parameters

`configuration` | Log & Crash Configuration.

#### Declared In

`TCGBLogger.h`

### `+ initializeWithCompletion:`

Initialize the singletone instance of a TCGBLogger with a configuration in Info.plist. Keys are TCGBLoggerAppKey, TCGBLoggerEnableCrashReporter and TCGBLoggerServiceZone.

`+ (void)initializeWithCompletion:(void ( ^ ) ( TCGBError *_Nullable ))completion`

#### Declared In

`TCGBLogger.h`

### `+ setDelegate:`

Sets a TCGBLoggerDelegate.

`+ (void)setDelegate:(nullable id<TCGBLoggerDelegate>)delegate`

#### Parameters

`delegate` | The delegate following TCGBLoggerDelegate protocol

#### Declared In

`TCGBLogger.h`

### `+ setUserFieldWithValue:forKey:`

Sets the key and value of the user field to send when sending the log.

`+ (void)setUserFieldWithValue:(nullable NSString *)value forKey:(NSString *)key`

#### Parameters

`value` | Value of the user field
`key` | Key of the user field

#### Declared In

`TCGBLogger.h`

### `+ setCrashHandler:`

Sets the handler to be executed after a crash.

`+ (void)setCrashHandler:(nullable void ( ^ ) ( void ))handler`

#### Parameters

`handler` | The handler to be executed after a crash

#### Declared In

`TCGBLogger.h`

### `+ debug:`

Sends a log message of level debug.

`+ (void)debug:(NSString *)message`

#### Parameters

`message` | The message to send

#### Declared In

`TCGBLogger.h`

### `+ info:`

Sends a log message of level info.

`+ (void)info:(NSString *)message`

#### Parameters

`message` | The message to send

#### Declared In

`TCGBLogger.h`

### `+ warn:`

Sends a log message of level warn.

`+ (void)warn:(NSString *)message`

#### Parameters

`message` | The message to send

#### Declared In

`TCGBLogger.h`

### `+ error:`

Sends a log message of level error.

`+ (void)error:(NSString *)message`

#### Parameters

`message` | The message to send

#### Declared In

`TCGBLogger.h`

### `+ fatal:`

Sends a log message of level fatal.

`+ (void)fatal:(NSString *)message`

#### Parameters

`message` | The message to send

#### Declared In

`TCGBLogger.h`

### `+ debug:userFields:`

Sends a log message with user fields of level debug.

`+ (void)debug:(NSString *)message userFields:(nullable NSDictionary<NSString*,NSString*> *)userFields`

#### Parameters

`message` | The message to send
`userFields` | You have additional information to send.

#### Declared In

`TCGBLogger.h`

### `+ info:userFields:`

Sends a log message with user fields of level info.

`+ (void)info:(NSString *)message userFields:(nullable NSDictionary<NSString*,NSString*> *)userFields`

#### Parameters

`message` | The message to send
`userFields` | You have additional information to send.

#### Declared In

`TCGBLogger.h`

### `+ warn:userFields:`

Sends a log message with user fields of level warn.

`+ (void)warn:(NSString *)message userFields:(nullable NSDictionary<NSString*,NSString*> *)userFields`

#### Parameters

`message` | The message to send
`userFields` | You have additional information to send.

#### Declared In

`TCGBLogger.h`

### `+ error:userFields:`

Sends a log message with user fields of level error.

`+ (void)error:(NSString *)message userFields:(nullable NSDictionary<NSString*,NSString*> *)userFields`

#### Parameters

`message` | The message to send
`userFields` | You have additional information to send.

#### Declared In

`TCGBLogger.h`

### `+ fatal:userFields:`

Sends a log message with user fields of level fatal.

`+ (void)fatal:(NSString *)message userFields:(nullable NSDictionary<NSString*,NSString*> *)userFields`

#### Parameters

`message` | The message to send
`userFields` | You have additional information to send.

#### Declared In

`TCGBLogger.h`

### `+ debugWithFormat:`

Sends a log message with format of level debug.

`+ (void)debugWithFormat:(NSString *)format, ...`

#### Parameters

`format` | The message string to send
`...` | A comma separated list of arguments to substitute into the format.

#### Declared In

`TCGBLogger.h`

### `+ infoWithFormat:`

Sends a log message with format of level info.

`+ (void)infoWithFormat:(NSString *)format, ...`

#### Parameters

`format` | The message string to send
`...` | A comma separated list of arguments to substitute into the format.

#### Declared In

`TCGBLogger.h`

### `+ warnWithFormat:`

Sends a log message with format of level warn.

`+ (void)warnWithFormat:(NSString *)format, ...`

#### Parameters

`format` | The message string to send
`...` | A comma separated list of arguments to substitute into the format.

#### Declared In

`TCGBLogger.h`

### `+ errorWithFormat:`

Sends a log message with format of level error.

`+ (void)errorWithFormat:(NSString *)format, ...`

#### Parameters

`format` | The message string to send
`...` | A comma separated list of arguments to substitute into the format.

#### Declared In

`TCGBLogger.h`

### `+ fatalWithFormat:`

Sends a log message with format of level fatal.

`+ (void)fatalWithFormat:(NSString *)format, ...`

#### Parameters

`format` | The message string to send
`...` | A comma separated list of arguments to substitute into the format.

#### Declared In

`TCGBLogger.h`