docs
Loading...
Searching...
No Matches
CAPI_Logger.h

Overview

User-defined logging interface.

#include <Ultralight/CAPI/CAPI_Logger.h>

The library uses this to report failures, warnings, and status messages.

This is intended to be implemented by users and defined before creating the Renderer.

Each message starts with a tag in brackets for the part of the library it came from (eg, [net] Failed to load cacert.pem ...). The library doesn't send messages below the minimum log level (see ulConfigSetMinLogLevel()).

Note
The library invokes your callback from any of its threads, and more than one call can be in progress at the same time, so your implementation must serialize its writes.
See also
ulPlatformSetLogger()

Classes

struct  ULLogger
 User-defined logging interface. More...

Typedefs

typedef void(*) ULLoggerLogMessageCallback(ULLogLevel log_level, ULString message)
 The callback invoked when the library wants to print a message to the log.

Enumerations

enum  ULLogLevel {
  kLogLevel_Fatal = 0 , kLogLevel_Error , kLogLevel_Warning , kLogLevel_Info ,
  kLogLevel_Debug
}
 The severity of a log message, from most to least severe. More...

Typedef Documentation

◆ ULLoggerLogMessageCallback

typedef void(*) ULLoggerLogMessageCallback(ULLogLevel log_level, ULString message)

The callback invoked when the library wants to print a message to the log.

Parameters
log_levelThe severity level of the log message.
messageThe log message string. Valid only for the duration of this callback.

Enumeration Type Documentation

◆ ULLogLevel

enum ULLogLevel

The severity of a log message, from most to least severe.

See also
ulConfigSetMinLogLevel()
Enumerator
kLogLevel_Fatal 

The application can't continue (eg, a failed device or startup, missing ICU data, or a required platform interface that wasn't set).

kLogLevel_Error 

A failure the library recovers from (eg, a resource that failed to load).

kLogLevel_Warning 

A problem or diagnostic that isn't a failure (eg, a misused API call).

kLogLevel_Info 

Status information.

kLogLevel_Debug 

Verbose detail (not sent unless you lower the minimum log level to kLogLevel_Debug with ulConfigSetMinLogLevel()).

Go to the source code of this file.