TT CORE SDK

Logging

Logging

TT logs messages for your application and stores them in the '/var/log/TT' directory.

You can write additional information to the TT Core SDK log files by using the following function:

void TTLog(const LogLevel level, const char* category, const char *msg);

The LogLevel enumeration is defined as follows:


typedef enum
{
    LogDebug = 0,
    LogInfo = 10,
    LogWarning = 20,
    LogError = 30,
    LogCritical = 40,
    LogAlways = 100
} LogLevel;

The LogAlways value is used for messages which must be logged regardless of the minimal logging level.

You can also use the following convenience functions that pre-define the logging levels.


void TTLogInfo(const char *format, ...) __attribute__((format(printf, 1, 2)));

void TTLogWarning(const char *format, ...) __attribute__((format(printf, 1, 2)));
  
void TTLogError(const char *format, ...) __attribute__((format(printf, 1, 2)));