Implementation of the console logger, along with the CreateConsoleLogger() and DestroyConsoleLogger() factory functions used in the Bridge Pattern. More...
#include <stdlib.h>#include <stdio.h>#include "Bridge_LogHelper.h"#include "Bridge_ConsoleLogger.h"
Go to the source code of this file.
Functions | |
| static void | _WriteLine (const char *loglevel, const char *message) |
| Send a formatted line to the console. | |
| static void | _Console_LogTrace (const char *message, void *data) |
| Write a trace message to the console. | |
| static void | _Console_LogInfo (const char *message, void *data) |
| Write an informational message to the console. | |
| static void | _Console_LogError (const char *message, void *data) |
| Write an error message to the console. | |
| ILogger * | CreateConsoleLogger (void) |
| Create an instance of an ILogger that outputs to a console. | |
| void | DestroyConsoleLogger (ILogger *logger) |
| Destroy the given instance of an ILogger for outputting to a console. | |
Implementation of the console logger, along with the CreateConsoleLogger() and DestroyConsoleLogger() factory functions used in the Bridge Pattern.
Definition in file Bridge_ConsoleLogger.c.
|
static |
Write an error message to the console.
| message | The message to log. |
| data | Unused. |
Definition at line 65 of file Bridge_ConsoleLogger.c.
References _WriteLine().
Referenced by CreateConsoleLogger().
|
static |
Write an informational message to the console.
| message | The message to log. |
| data | Unused. |
Definition at line 49 of file Bridge_ConsoleLogger.c.
References _WriteLine().
Referenced by CreateConsoleLogger().
|
static |
Write a trace message to the console.
| message | The message to log. |
| data | Unused. |
Definition at line 33 of file Bridge_ConsoleLogger.c.
References _WriteLine().
Referenced by CreateConsoleLogger().
|
static |
Send a formatted line to the console.
| loglevel | The level of the log detail. |
| message | The message to log. |
Definition at line 18 of file Bridge_ConsoleLogger.c.
References LogHelper_FormatLogLine().
Referenced by _Console_LogError(), _Console_LogInfo(), and _Console_LogTrace().
| ILogger * CreateConsoleLogger | ( | void | ) |
Create an instance of an ILogger that outputs to a console.
Definition at line 79 of file Bridge_ConsoleLogger.c.
References _Console_LogError(), _Console_LogInfo(), _Console_LogTrace(), ILogger::data, ILogger::LogError, ILogger::LogInfo, and ILogger::LogTrace.
Referenced by CreateLogger().
| void DestroyConsoleLogger | ( | ILogger * | logger | ) |
Destroy the given instance of an ILogger for outputting to a console.
| logger | The ILogger instance to destroy. |
Definition at line 96 of file Bridge_ConsoleLogger.c.
Referenced by DestroyLogger().