uLib
Typedefs | Enumerations | Functions | Variables
ulog.h File Reference

Small footprint logging functionality. More...

#include "azure_macro_utils/macro_utils.h"
#include "ulib_config.h"
#include <stdio.h>

Go to the source code of this file.

Typedefs

typedef enum AZ_ULOG_TYPE_TAG AZ_ULOG_TYPE
 enum to select the log type
 

Enumerations

enum  AZ_ULOG_TYPE_TAG { AZ_ULOG_TYPE_ERROR = 0, AZ_ULOG_TYPE_INFO = 1 }
 enum to select the log type More...
 

Functions

void az_ulog_print (AZ_ULOG_TYPE type, const char *const format,...)
 log function for ulib_config More...
 

Variables

const char *const AZ_ULOG_REQUIRE_EQUALS_STRING
 
const char *const AZ_ULOG_REQUIRE_NOT_EQUALS_STRING
 
const char *const AZ_ULOG_REQUIRE_NOT_NULL_STRING
 
const char *const AZ_ULOG_REQUIRE_TYPE_OF_USTREAM_STRING
 
const char *const AZ_ULOG_OUT_OF_MEMORY_STRING
 
const char *const AZ_ULOG_REPORT_EXCEPTION_STRING
 
static const char *const AZ_ULOG_USTREAM_ILLEGAL_ARGUMENT_ERROR_STRING = "Passed ustream is not the correct type\r\n"
 
const char *const AZ_ULOG_TYPE_STRING []
 AZ_ULOG_TYPE string values.
 

Detailed Description

Small footprint logging functionality.

Using the az_ulog_print() api, you can pass enum types to differentiate logging purposes. When the api prints to the console, it uses constant strings which prevents duplicate strings from being saved in the bss.

Definition in file ulog.h.

Enumeration Type Documentation

◆ AZ_ULOG_TYPE_TAG

enum to select the log type

Enumerator
AZ_ULOG_TYPE_ERROR 

error log message

AZ_ULOG_TYPE_INFO 

info log message

Definition at line 38 of file ulog.h.

Function Documentation

◆ az_ulog_print()

void az_ulog_print ( AZ_ULOG_TYPE  type,
const char *const  format,
  ... 
)

log function for ulib_config

Parameters
typeAZ_ULOG_TYPE to signify error or info log
formatFormat prefix for the passed string in (...)
...Passed string (with any % formatting parameters) to print to the log