diff --git a/src/alg_sec.cpp b/src/alg_sec.cpp index 15904f7c..81ef9e84 100644 --- a/src/alg_sec.cpp +++ b/src/alg_sec.cpp @@ -422,7 +422,7 @@ static void algsec_params_log(ctx_dev *cam) if (algmdl->method != "none") { for (indx = 0; indx < algmdl->algsec_params->params_count; indx++) { - motion_log(INF, TYPE_ALL, NO_ERRNO,0, "%-25s %s" + motpls_log(INF, TYPE_ALL, NO_ERRNO,0, "%-25s %s" ,algmdl->algsec_params->params_array[indx].param_name ,algmdl->algsec_params->params_array[indx].param_value); } diff --git a/src/conf.cpp b/src/conf.cpp index d6ec727f..fac051c4 100644 --- a/src/conf.cpp +++ b/src/conf.cpp @@ -3846,15 +3846,15 @@ void conf_parms_log_parm(std::string parm_nm, std::string parm_vl) (parm_nm == "database_user") || (parm_nm == "database_password")) { - motion_log(INF, TYPE_ALL, NO_ERRNO,0 + motpls_log(INF, TYPE_ALL, NO_ERRNO,0 ,_("%-25s "), parm_nm.c_str()); } else { if ((parm_nm.compare(0,4,"text") == 0) || (parm_vl.compare(0,1, " ") != 0)) { - motion_log(INF, TYPE_ALL, NO_ERRNO,0, "%-25s %s" + motpls_log(INF, TYPE_ALL, NO_ERRNO,0, "%-25s %s" , parm_nm.c_str(), parm_vl.c_str()); } else { - motion_log(INF, TYPE_ALL, NO_ERRNO,0, "%-25s \"%s\"" + motpls_log(INF, TYPE_ALL, NO_ERRNO,0, "%-25s \"%s\"" , parm_nm.c_str(), parm_vl.c_str()); } } @@ -3874,7 +3874,7 @@ void conf_parms_log(ctx_motapp *motapp) MOTION_LOG(INF, TYPE_ALL, NO_ERRNO ,_("Logging configuration parameters from all files")); - motion_log(INF, TYPE_ALL, NO_ERRNO,0, _("Config file: %s") + motpls_log(INF, TYPE_ALL, NO_ERRNO,0, _("Config file: %s") , motapp->conf->conf_filename.c_str()); i = 0; @@ -3899,7 +3899,7 @@ void conf_parms_log(ctx_motapp *motapp) } for (indx=0; indxcam_cnt; indx++) { - motion_log(INF, TYPE_ALL, NO_ERRNO, 0 + motpls_log(INF, TYPE_ALL, NO_ERRNO, 0 , _("Camera %d - Config file: %s") , motapp->cam_list[indx]->conf->device_id , motapp->cam_list[indx]->conf->conf_filename.c_str()); @@ -3926,7 +3926,7 @@ void conf_parms_log(ctx_motapp *motapp) } for (indx=0; indxsnd_cnt; indx++) { - motion_log(INF, TYPE_ALL, NO_ERRNO, 0 + motpls_log(INF, TYPE_ALL, NO_ERRNO, 0 , _("Sound %d - Config file: %s") , motapp->snd_list[indx]->conf->device_id , motapp->snd_list[indx]->conf->conf_filename.c_str()); diff --git a/src/logger.cpp b/src/logger.cpp index 5de3bd12..68ac74c1 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -121,7 +121,7 @@ static char *str_time(void) * This routine is used for printing all informational, debug or error * messages produced by any of the other motion functions. */ -void motion_log(int level, int type, int errno_flag,int fncname, const char *fmt, ...) +void motpls_log(int level, int type, int errno_flag,int fncname, const char *fmt, ...) { int errno_save, n, prefixlen, timelen; char buf[1024]= {0}; diff --git a/src/logger.hpp b/src/logger.hpp index ef5c2e23..4ec2b81c 100644 --- a/src/logger.hpp +++ b/src/logger.hpp @@ -53,9 +53,10 @@ #define TYPE_DEFAULT TYPE_ALL /* Default type */ #define TYPE_DEFAULT_STR "ALL" /* Default name logs */ - #define MOTION_LOG(x, y, z, format, args...) motion_log(x, y, z, 1, format, __FUNCTION__, ##args) + #define MOTION_LOG(x, y, z, format, args...) motpls_log(x, y, z, 1, format, __FUNCTION__, ##args) + #define MOTPLS_LOG(x, y, z, format, args...) motpls_log(x, y, z, 1, format, __FUNCTION__, ##args) - void motion_log(int loglevel, int logtype, int errno_flag,int fncname, const char *fmt, ...); + void motpls_log(int loglevel, int logtype, int errno_flag,int fncname, const char *fmt, ...); void log_init(ctx_motapp *motapp); void log_deinit(ctx_motapp *motapp); void log_set_level(int new_level);