17 lines
307 B
C
17 lines
307 B
C
#include "log.h"
|
|
#include <stdio.h>
|
|
|
|
static LogError* s_logError = NULL;
|
|
|
|
void log_set_output(LogError* destination) {
|
|
s_logError = destination;
|
|
}
|
|
|
|
void log_error(const char* msg) {
|
|
if (s_logError != NULL) {
|
|
s_logError(msg);
|
|
} else {
|
|
fprintf(stderr, "Error: %s\n", msg);
|
|
}
|
|
}
|