You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
659 B
31 lines
659 B
#include "webfused/log/manager.h"
|
|
#include "webfused/log/log.h"
|
|
#include "webfused/log/stderr_logger.h"
|
|
#include "webfused/log/syslog_logger.h"
|
|
|
|
#include <string.h>
|
|
|
|
bool
|
|
wfd_log_manager_set_logger(
|
|
char const * provider,
|
|
int level,
|
|
struct wfd_settings * settings)
|
|
{
|
|
bool result = false;
|
|
|
|
if (0 == strcmp("syslog", provider))
|
|
{
|
|
result = wfd_syslog_logger_init(level, settings);
|
|
}
|
|
else if (0 == strcmp("stderr", provider))
|
|
{
|
|
result = wfd_stderr_logger_init(level, settings);
|
|
}
|
|
else
|
|
{
|
|
WFD_ERROR("failed to init log: unknown provider \'%s\'", provider);
|
|
}
|
|
|
|
return result;
|
|
}
|