Solaris Software
Loading...
Searching...
No Matches
log.c File Reference

SPP logging service implementation. More...

#include "spp/services/log/log.h"
#include <stdio.h>
#include <stdarg.h>
Include dependency graph for log.c:

Go to the source code of this file.

Macros

#define K_LOG_BUF_SIZE   (256U)

Functions

SPP_RetVal_t SPP_SERVICES_LOG_init (void)
void SPP_SERVICES_LOG_setLevel (SPP_LogLevel_t level)
SPP_LogLevel_t SPP_SERVICES_LOG_getLevel (void)
void SPP_SERVICES_LOG_setOutput (SPP_LogOutputFn_t p_fn)
void SPP_SERVICES_LOG_emit (const char *p_tag, SPP_LogLevel_t level, const char *p_fmt,...)

Variables

static SPP_LogLevel_t s_level = K_SPP_LOG_VERBOSE
static SPP_LogOutputFn_t s_outFn = NULL

Detailed Description

SPP logging service implementation.

Definition in file log.c.

Macro Definition Documentation

◆ K_LOG_BUF_SIZE

#define K_LOG_BUF_SIZE   (256U)

Definition at line 11 of file log.c.

Referenced by SPP_SERVICES_LOG_emit().

Function Documentation

◆ SPP_SERVICES_LOG_init()

SPP_RetVal_t SPP_SERVICES_LOG_init ( void )

Definition at line 20 of file log.c.

References K_SPP_LOG_VERBOSE, K_SPP_OK, s_level, s_outFn, and SPP_SERVICES_LOG_init().

Referenced by SPP_CORE_init(), and SPP_SERVICES_LOG_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SPP_SERVICES_LOG_setLevel()

void SPP_SERVICES_LOG_setLevel ( SPP_LogLevel_t level)

Definition at line 27 of file log.c.

References s_level, and SPP_SERVICES_LOG_setLevel().

Referenced by SPP_SERVICES_LOG_setLevel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SPP_SERVICES_LOG_getLevel()

SPP_LogLevel_t SPP_SERVICES_LOG_getLevel ( void )

Definition at line 32 of file log.c.

References s_level, and SPP_SERVICES_LOG_getLevel().

Referenced by SPP_SERVICES_LOG_getLevel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SPP_SERVICES_LOG_setOutput()

void SPP_SERVICES_LOG_setOutput ( SPP_LogOutputFn_t p_fn)

Definition at line 37 of file log.c.

References s_outFn, and SPP_SERVICES_LOG_setOutput().

Referenced by SPP_SERVICES_LOG_setOutput().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SPP_SERVICES_LOG_emit()

void SPP_SERVICES_LOG_emit ( const char * p_tag,
SPP_LogLevel_t level,
const char * p_fmt,
... )

Definition at line 42 of file log.c.

References K_LOG_BUF_SIZE, s_level, s_outFn, and SPP_SERVICES_LOG_emit().

Referenced by SPP_SERVICES_LOG_emit().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ s_level

◆ s_outFn

SPP_LogOutputFn_t s_outFn = NULL
static

Definition at line 14 of file log.c.

Referenced by SPP_SERVICES_LOG_emit(), SPP_SERVICES_LOG_init(), and SPP_SERVICES_LOG_setOutput().