Add aaa-12 add log cmd remote

RCA:
SOL:
修改人:zhangtao
检视人:
This commit is contained in:
zhangtaohz 2019-08-14 18:21:06 +08:00
parent 972542a891
commit 24fe0ad302
6 changed files with 8 additions and 5 deletions

View File

@ -1,6 +1,7 @@
#ifndef _ULOG_IN_H #ifndef _ULOG_IN_H
#define _ULOG_IN_H #define _ULOG_IN_H
#include <string.h>
#include <syslog.h> #include <syslog.h>
#include "common_types.h" #include "common_types.h"

View File

@ -1,5 +1,6 @@
#include "log_config_cm.h" #include "log_config_cm.h"
#include "rpc_server.h" #include "rpc_server.h"
#include "rpc_client.h"
ret_code log_rpc_exec(char* service_name, char* method_name, pointer input, int input_len, int last_lenth) ret_code log_rpc_exec(char* service_name, char* method_name, pointer input, int input_len, int last_lenth)
{ {

View File

@ -24,7 +24,7 @@
cJSON *json_obj = cJSON_Parse(input); \ cJSON *json_obj = cJSON_Parse(input); \
if(!json_obj) { \ if(!json_obj) { \
ULOG_ERR(g_log_h, "Error log %s format", str_conf); \ ULOG_ERR(g_log_h, "Error log %s format", str_conf); \
return RET_INPUTERR; \ return RET_INPUTERR; \
} \ } \
\ \
ULOG_DEBUG(g_log_h, "json input: %s", cJSON_Print(json_obj)); \ ULOG_DEBUG(g_log_h, "json input: %s", cJSON_Print(json_obj)); \

View File

@ -1,9 +1,9 @@
#include "log_config.h" #include "log_config.h"
#include "log_config_cm.h" #include "log_config_cm.h"
#define FILE_JSON(s, o) { \ #define FILE_JSON(s, o) { \
s2j_struct_get_basic_element(s, o, int, level); \ s2j_struct_get_basic_element(s, o, int, level); \
S2J_STRUCT_GET_STRING_ELEMENT_N(s, o, path, MAX_PATH_SZ); \ S2J_STRUCT_GET_STRING_ELEMENT_N(s, o, path, MAX_PATH_SZ); \
s2j_struct_get_basic_element(s, o, int, is_compress); \ s2j_struct_get_basic_element(s, o, int, is_compress); \
s2j_struct_get_basic_element(s, o, int, del_over_days); \ s2j_struct_get_basic_element(s, o, int, del_over_days); \
s2j_struct_get_basic_element(s, o, int, del_over_size); \ s2j_struct_get_basic_element(s, o, int, del_over_size); \

View File

@ -4,6 +4,7 @@
#include "log_file.h" #include "log_file.h"
#include "log_common.h" #include "log_common.h"
#include "ulog_in.h" #include "ulog_in.h"
#include "rpc_conn.h"
#define LOG_CONF_FILE_NAME "log-file.conf" #define LOG_CONF_FILE_NAME "log-file.conf"

View File

@ -1,14 +1,14 @@
#include <string.h> #include <string.h>
#include <unistd.h>
#include <sys/types.h> #include <sys/types.h>
#include <dirent.h> #include <dirent.h>
#include <errno.h> #include <errno.h>
#include <syslog.h> #include <syslog.h>
#include "log_remote.h" #include "log_remote.h"
#include "log_common.h" #include "log_common.h"
#include "ulog_in.h" #include "ulog_in.h"
#include "rpc_conn.h"
#define LOG_CONF_REMOTE_FILE_NAME "log-remote.conf" #define LOG_CONF_REMOTE_FILE_NAME "log-remote.conf"