Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
stdio_logging.h
1
2
3#include <stdio.h>
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9#if defined(__linux__) || defined(__MACH__) || defined(__EMSCRIPTEN__) || \
10 defined(ESP_PLATFORM)
11#define LOGWEAK __attribute__((weak))
12#else
13#define LOGWEAK
14#endif
15
16LOGWEAK void log_output(char* buf, int size) {
17 if (size <= 0) return;
18 fwrite(buf, size, 1, stderr);
19 fwrite("\n", 1, 1, stderr);
20}
21
22#ifdef __cplusplus
23}
24#endif
void log_output(char *buf, int size)
Prints a line of log to the log output destination.
Definition logging.cxx:73