| eRPC Generator (erpcgen) Rev. 1.8.1 NXP Semiconductors

- Main Page
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Static Protected Attributes | List of all members
Log Class Reference

Wraps a set of static functions for easy global logging access. More...

`#include <Logging.h>`

## Classes
class | SetOutputLevel
| Utility class to temporarily change the logging output level. More...

## Static Public Member Functions
Singleton logger access
static Logger * | getLogger ()
| Returns the current global logger singleton.
static void | setLogger (Logger *logger)
| Sets the global logger singleton instance.
Logging
static void | log (const char *fmt,...)
| Log with format.
static void | log (const std::string &msg)
| Log a string object.
static void | log (Logger::log_level_t level, const char *fmt,...)
| Log with format at a specific output level.
static void | log (Logger::log_level_t level, const std::string &msg)
| Log a string output at a specific output level.
Logging level helpers
These static methods log a message with an implicit log level.
static void | urgent (const char *fmt,...)
| Log a message with Logger::kUrgent level.
static void | error (const char *fmt,...)
| Log a message with Logger::kError level.
static void | warning (const char *fmt,...)
| Log a message with Logger::kWarning level.
static void | info (const char *fmt,...)
| Log a message with Logger::kInfo level.
static void | info2 (const char *fmt,...)
| Log a message with Logger::kInfo2 level.
static void | debug (const char *fmt,...)
| Log a message with Logger::kDebug level.
static void | debug2 (const char *fmt,...)
| Log a message with Logger::kDebug2 level.

## Static Protected Attributes
static Logger * | s_logger
| The single global logger instance.

## Detailed Description

Wraps a set of static functions for easy global logging access.

This class has a set of static methods that make it easy to access a global logger instance without having to worry about extern symbols. It does this by keeping a static member variable pointing at the singleton logger instance, which is set with the setLogger() static method.

There is also an inner utility class called SetOutputLevel that uses C++ scoping rules to temporarily change the output logging level. When the SetOutputLevel instance falls out of scope the output level is restored to the previous value.

The documentation for this class was generated from the following files:

- Logging.h
- Logging.cpp