Fawkes API
Fawkes Development Version
|
23 #include "fawkes_logger.h"
25 #include <core/exception.h>
26 #include <logging/logger.h>
27 #include <plugins/eclipse-clp/eclipse_thread.h>
46 if (EC_succeed != EC_arg(1).is_atom(&log_level)) {
47 printf(
"Could not obtain log level\n");
52 if (0 == strcmp(
"ll_debug", log_level.name())) {
54 }
else if (0 == strcmp(
"ll_info", log_level.name())) {
56 }
else if (0 == strcmp(
"ll_warn", log_level.name())) {
58 }
else if (0 == strcmp(
"ll_error", log_level.name())) {
61 printf(
"Unknown log level %s\n", log_level.name());
66 if (EC_succeed != EC_arg(2).is_string(&log_string)) {
67 printf(
"Could not get 2nd argument of log/2\n");
71 logger->
log(ll,
"ECLiPSe CLP", log_string);
static EclipseAgentThread * instance()
Get the EclipseAgentThread instance.
fawkes::Logger * get_logger()
Get the logger.
@ LL_DEBUG
debug output, relevant only when tracking down problems
virtual void log(LogLevel level, const char *component, const char *format,...)
Log message of given log level.
@ LL_INFO
informational output about normal procedures
@ LL_ERROR
error, may be recoverable (software still running) or not (software has to terminate).
void print_trace()
Prints trace to stderr.
@ LL_WARN
warning, should be investigated but software still functions, an example is that something was reques...