summaryrefslogtreecommitdiffstats
path: root/common/log.h
diff options
context:
space:
mode:
authorilsimo <ilsimo>2008-02-20 22:02:24 +0000
committerilsimo <ilsimo>2008-02-20 22:02:24 +0000
commit4c9d3862e55ab5d6fa734549478bb0a00be9f7ed (patch)
tree2efde9a8872ed90ea14521702614768aaf0b765b /common/log.h
parent8f0045c19b03d5c9a0baea6b72037ec226db8343 (diff)
downloadxrdp-proprietary-4c9d3862e55ab5d6fa734549478bb0a00be9f7ed.tar.gz
xrdp-proprietary-4c9d3862e55ab5d6fa734549478bb0a00be9f7ed.zip
updating logging subsystem
Diffstat (limited to 'common/log.h')
-rw-r--r--common/log.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/common/log.h b/common/log.h
index 93328044..18bdd623 100644
--- a/common/log.h
+++ b/common/log.h
@@ -20,6 +20,8 @@
#ifndef LOG_H
#define LOG_H
+#include <pthread.h>
+
#include "arch.h"
/* logging buffer size */
@@ -44,9 +46,9 @@
/*#define LOG_ENABLE_THREAD*/
#ifdef DEBUG
- #define LOG_DBG(s,args...) log_message(LOG_LEVEL_DEBUG,s,args);
+ #define LOG_DBG(lcfg,args...) log_message((lcfg), LOG_LEVEL_DEBUG, args);
#else
- #define LOG_DBG(s,args...)
+ #define LOG_DBG(lcfg,args...)
#endif
struct log_config
@@ -57,6 +59,8 @@ struct log_config
unsigned int log_level;
int enable_syslog;
unsigned int syslog_level;
+ pthread_mutex_t log_lock;
+ pthread_mutexattr_t log_lock_attr;
};
/**
@@ -68,30 +72,26 @@ struct log_config
*
*/
int DEFAULT_CC
-log_message(const unsigned int lvl, const char* msg, ...);
+log_message(struct log_config* l_cfg, const unsigned int lvl, const char* msg, ...);
/**
*
* @brief Starts the logging subsystem
- * @param progname string to prepend to syslog messages
- * @param logfile log file path
- * @param loglvl level of messages to log
- * @param syslog if set to 0, disables the use of syslog
- * @param syslvl level of messages to log to syslog
+ * @param l_cfg loggging system configuration
* @return
*
*/
int DEFAULT_CC
-log_start(const char* progname, const char* logfile, const unsigned int loglvl,
- const int syslog, const unsigned int syslvl);
+log_start(struct log_config* l_cfg);
/**
*
* @brief Shuts down the logging subsystem
+ * @param l_cfg pointer to the logging subsystem to stop
*
*/
void DEFAULT_CC
-log_end(void);
+log_end(struct log_config* l_cfg);
/**
*