All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
kzs_log.h File Reference

Logging. More...

Macros

#define KZS_LOG_LEVEL_ERROR
 Error log level. More...
 
#define KZS_LOG_LEVEL_USER_WARNING
 Warning log level, which is important enough to show for end-user also. More...
 
#define KZS_LOG_LEVEL_WARNING
 Warning log level. More...
 
#define KZS_LOG_LEVEL_INFO
 Information log level. More...
 
#define KZS_LOG_LEVEL_DEBUG
 Debug log level. More...
 
#define KZS_LOG_LEVEL_DETAIL
 Detailed information log level. More...
 
#define KZS_LOG_LEVEL_CONTEXT_INFO_THRESHOLD
 Threshold for which log levels are enabled. More...
 
#define kzsLog(level, message)
 Creates a log entry of given level with the message. More...
 
#define kzsLogFormat(level, formatArgs)
 

Typedefs

typedef kzsError(* KzsLogFunction )(KzsLogLevel level, kzsError errorCode, kzString message, kzString file, kzUint line, void *userData)
 Log handler function type. More...
 

Functions

KANZI_API kzsError kzsLogInitialize (void)
 Initialize logging. More...
 
KANZI_API kzsError kzsLogUninitialize (void)
 Uninitialize logging. More...
 
KANZI_API kzsError kzsLogInitializeThread (void)
 Initializes logging for thread. More...
 
KANZI_API kzsError kzsLogDeinitializeThread (void)
 De-initializes logging for thread. More...
 
KANZI_API kzsError kzsLogRegisterHandler (KzsLogFunction logFunction, void *userData)
 Register log handler. More...
 
KANZI_API void kzsLogUnregisterHandler (KzsLogFunction logFunction)
 Unregister log handler. More...
 
KANZI_API void kzsLog_private (KzsLogLevel level, kzsError errorCode, kzString message, kzString file, kzUint line)
 
KANZI_API kzString kzsLogMessageFormat_private (kzString format,...)
 Formats and results log string. More...
 
KANZI_API kzsError kzsLogBasicLogger (KzsLogLevel level, kzsError errorCode, kzString message, kzString file, kzUint line, void *userData)
 Basic logger handler. More...
 
KANZI_API kzsError kzsLogCreateDefaultLoggers (void)
 Creates default loggers. More...
 

Variables

KZ_HEADER_BEGIN typedef kzUint KzsLogLevel
 If defined, log functions can be safely called from multiple threads. More...
 

Detailed Description

Logging.

Copyright 2008-2020 by Rightware. All rights reserved.

Macro Definition Documentation

#define KZS_LOG_LEVEL_ERROR

Error log level.

Not to be used outside internal error generator macros.

#define KZS_LOG_LEVEL_USER_WARNING

Warning log level, which is important enough to show for end-user also.

#define KZS_LOG_LEVEL_WARNING

Warning log level.

#define KZS_LOG_LEVEL_INFO

Information log level.

#define KZS_LOG_LEVEL_DEBUG

Debug log level.

#define KZS_LOG_LEVEL_DETAIL

Detailed information log level.

#define KZS_LOG_LEVEL_CONTEXT_INFO_THRESHOLD

Threshold for which log levels are enabled.

#define kzsLog (   level,
  message 
)

Creates a log entry of given level with the message.

Users should not use KZS_LOG_LEVEL_ERROR as it is reserved for internal usage.

#define kzsLogFormat (   level,
  formatArgs 
)
See also
kzsLogFormat formatArgs is the collection of format string and format arguments in parentheses, i.e. kzsLogFormat(KZS_LOG_LEVEL_WARNING, ("Trying to get integer value from setting \'%s\' which is not a number.", settingName));

Typedef Documentation

typedef kzsError(* KzsLogFunction)(KzsLogLevel level, kzsError errorCode, kzString message, kzString file, kzUint line, void *userData)

Log handler function type.

Function Documentation

KANZI_API kzsError kzsLogInitialize ( void  )

Initialize logging.

KANZI_API kzsError kzsLogUninitialize ( void  )

Uninitialize logging.

KANZI_API kzsError kzsLogInitializeThread ( void  )

Initializes logging for thread.

KANZI_API kzsError kzsLogDeinitializeThread ( void  )

De-initializes logging for thread.

KANZI_API kzsError kzsLogRegisterHandler ( KzsLogFunction  logFunction,
void *  userData 
)

Register log handler.

KANZI_API void kzsLogUnregisterHandler ( KzsLogFunction  logFunction)

Unregister log handler.

KANZI_API void kzsLog_private ( KzsLogLevel  level,
kzsError  errorCode,
kzString  message,
kzString  file,
kzUint  line 
)
See also
kzsLog
KANZI_API kzString kzsLogMessageFormat_private ( kzString  format,
  ... 
)

Formats and results log string.

KANZI_API kzsError kzsLogBasicLogger ( KzsLogLevel  level,
kzsError  errorCode,
kzString  message,
kzString  file,
kzUint  line,
void *  userData 
)

Basic logger handler.

KANZI_API kzsError kzsLogCreateDefaultLoggers ( void  )

Creates default loggers.

Variable Documentation

KZ_HEADER_BEGIN typedef kzUint KzsLogLevel

If defined, log functions can be safely called from multiple threads.

Log level type definition.