Implementation of the LogHelper_FormatLogLine() function, used in the Bridge Pattern. More...
#include "Bridge_LogHelper.h"
#include <stdlib.h>
#include <stdio.h>
#include "helpers/datetime.h"
#include "helpers/makelocaltime.h"
Go to the source code of this file.
Functions | |
static const char * | _GetTimeStamp (void) |
Return a regular time stamp of the current time in local time. | |
bool | LogHelper_FormatLogLine (const char *loglevel, const char *message, char *output, size_t maxOutputSize) |
Format a line for logging, including time stamp. | |
Implementation of the LogHelper_FormatLogLine() function, used in the Bridge Pattern.
Definition in file Bridge_LogHelper.c.
|
static |
Return a regular time stamp of the current time in local time.
Definition at line 19 of file Bridge_LogHelper.c.
References datetime_now(), and datetime_to_string().
Referenced by DesignPatternExamples_cpp::LoggerHelpers::FormatLogLine(), and LogHelper_FormatLogLine().
bool LogHelper_FormatLogLine | ( | const char * | loglevel, |
const char * | message, | ||
char * | output, | ||
size_t | maxOutputSize | ||
) |
Format a line for logging, including time stamp.
loglevel | Level of logging (TRACE, INFO, ERROR) |
message | Message to log |
output | Buffer to fill with the formatted log line. |
maxOutputSize | Maximum size of output buffer in characters. |
Definition at line 29 of file Bridge_LogHelper.c.
References _GetTimeStamp().
Referenced by _WriteLine().