2019-07-26 03:53:33 +00:00
|
|
|
#ifndef _LOG_COMMON_H
|
|
|
|
#define _LOG_COMMON_H
|
|
|
|
|
|
|
|
#include "ulog_api.h"
|
|
|
|
|
|
|
|
#define MAX_LINE_SIZE 1024
|
|
|
|
|
|
|
|
#define LOG_CONF_PATH "/etc/rsyslog.d/"
|
|
|
|
|
|
|
|
typedef struct _level_str {
|
|
|
|
u32 level;
|
|
|
|
char str[10];
|
|
|
|
} level_str_t;
|
|
|
|
|
|
|
|
extern ulog_t *g_log;
|
|
|
|
|
|
|
|
static level_str_t g_level_array[] = {
|
|
|
|
{LOG_EMERG, "emerg"},
|
|
|
|
{LOG_ALERT, "alert"},
|
|
|
|
{LOG_CRIT, "crit"},
|
|
|
|
{LOG_ERR, "err"},
|
|
|
|
{LOG_WARNING, "warn"},
|
|
|
|
{LOG_NOTICE, "notice"},
|
|
|
|
{LOG_INFO, "info"},
|
|
|
|
{LOG_DEBUG, "debug"}
|
|
|
|
};
|
|
|
|
|
|
|
|
int write_log_conf(const u8 level, const char *conf_path, const char *conf_file,
|
|
|
|
const char *rediect_path, const char *filter_mod);
|
2019-07-26 10:26:19 +00:00
|
|
|
int modify_authorizing(const char *redirect_path);
|
|
|
|
|
2019-07-26 10:22:43 +00:00
|
|
|
|
2019-07-26 03:53:33 +00:00
|
|
|
|
|
|
|
#endif
|