summaryrefslogtreecommitdiffstats
path: root/common/log.h
diff options
context:
space:
mode:
authorilsimo <ilsimo>2006-06-04 12:10:02 +0000
committerilsimo <ilsimo>2006-06-04 12:10:02 +0000
commit9e2235ceaa574e8c9dc1d6f3fff32138989b4242 (patch)
tree5157243189fdb2b6898ac21a5707e88ff33d4871 /common/log.h
parente9400d44e908991c6b6cd945934ac1a3d2bd4276 (diff)
downloadxrdp-proprietary-9e2235ceaa574e8c9dc1d6f3fff32138989b4242.tar.gz
xrdp-proprietary-9e2235ceaa574e8c9dc1d6f3fff32138989b4242.zip
making (hopefully) the logging system thread-safe
Diffstat (limited to 'common/log.h')
-rw-r--r--common/log.h34
1 files changed, 10 insertions, 24 deletions
diff --git a/common/log.h b/common/log.h
index 5735583b..b5d79f37 100644
--- a/common/log.h
+++ b/common/log.h
@@ -15,12 +15,6 @@
xrdp: A Remote Desktop Protocol server.
Copyright (C) Jay Sorg 2005-2006
-
- session manager
- linux only
-
- log.h: logging code declarations
-
*/
#ifndef LOG_H
@@ -29,7 +23,7 @@
#include "arch.h"
/* logging buffer size */
-#define LOG_BUFFER_SIZE 8192
+#define LOG_BUFFER_SIZE 1024
/* logging levels */
#define LOG_LEVEL_ALWAYS 0
@@ -46,6 +40,9 @@
#define LOG_ERROR_NO_CFG 4
#define LOG_ERROR_FILE_NOT_OPEN 5
+/* enable threading */
+/*#define LOG_ENABLE_THREAD*/
+
#ifdef DEBUG
#define LOG_DBG(s,args...) log_message(LOG_LEVEL_DEBUG,s,args);
#else
@@ -64,12 +61,9 @@ struct log_config
/**
*
- * Logs a message. Optionally logs the same message on syslog
- *
+ * @brief Logs a message. Optionally logs the same message on syslog
* @param lvl The level of the logged message
- *
* @param msg The message to be logged
- *
* @return
*
*/
@@ -78,18 +72,12 @@ log_message(const unsigned int lvl, const char* msg, ...);
/**
*
- * Starts the logging subsystem
- *
+ * @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
- *
* @return
*
*/
@@ -99,7 +87,7 @@ log_start(const char* progname, const char* logfile, const unsigned int loglvl,
/**
*
- * Shuts down the logging subsystem
+ * @brief Shuts down the logging subsystem
*
*/
void DEFAULT_CC
@@ -107,11 +95,9 @@ log_end();
/**
*
- * Converts a string to a log level
- *
- * @s The string to convert
- *
- * @return The corresponding level od LOG_LEVEL_DEBUG if error
+ * @brief Converts a string to a log level
+ * @param s The string to convert
+ * @return The corresponding level or LOG_LEVEL_DEBUG if error
*
*/
int DEFAULT_CC