OSSIA
Open Scenario System for Interactive Application
Logging

Log various messages in JSON to a websocket server, and send heartbeats. More...

Detailed Description

Log various messages in JSON to a websocket server, and send heartbeats.

Enumerations

enum  log_level {
  trace , debug , info , warn ,
  error , critical , off
}
 

Functions

OSSIA_EXPORT ossia_logger_t ossia_logger_create (const char *host, const char *app)
 Create a logger instance. More...
 
OSSIA_EXPORT void ossia_logger_init_heartbeat (ossia_logger_t log, int pid, const char *cmdline)
 Start sending logger heartbeats. More...
 
OSSIA_EXPORT void ossia_logger_set_level (ossia_logger_t log, enum log_level lvl)
 Change the current log level. More...
 
OSSIA_EXPORT void ossia_log (ossia_logger_t log, enum log_level lvl, const char *message)
 Log a message. More...
 
OSSIA_EXPORT void ossia_logger_free (ossia_logger_t log)
 Free a logger instance. More...
 

Enumeration Type Documentation

◆ log_level

enum log_level

Log levels available

Function Documentation

◆ ossia_logger_create()

OSSIA_EXPORT ossia_logger_t ossia_logger_create ( const char *  host,
const char *  app 
)

Create a logger instance.

Parameters
websockethost: ws://127.0.0.1:1337
appname of the local app
Note
Multithread guarantees: MT-Safe.

◆ ossia_logger_init_heartbeat()

OSSIA_EXPORT void ossia_logger_init_heartbeat ( ossia_logger_t  log,
int  pid,
const char *  cmdline 
)

Start sending logger heartbeats.

Note
Multithread guarantees: MT-Safe.

◆ ossia_logger_set_level()

OSSIA_EXPORT void ossia_logger_set_level ( ossia_logger_t  log,
enum log_level  lvl 
)

Change the current log level.

Note
Multithread guarantees: Data-Safe.

◆ ossia_log()

OSSIA_EXPORT void ossia_log ( ossia_logger_t  log,
enum log_level  lvl,
const char *  message 
)

Log a message.

Note
Multithread guarantees: Data-Safe.

◆ ossia_logger_free()

OSSIA_EXPORT void ossia_logger_free ( ossia_logger_t  log)

Free a logger instance.

Note
Multithread guarantees: MT-Safe.