summaryrefslogtreecommitdiff
path: root/src/common/log.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-10-25 07:05:03 +0000
committerNick Mathewson <nickm@torproject.org>2005-10-25 07:05:03 +0000
commit932106f54c35b815756d518b236448b9884d6bde (patch)
tree1cb7ab000289de706e5813dfe764a2b3644db797 /src/common/log.c
parent452f4cfa09dffc8f9235c9a9bb1bd3e30aee6aa2 (diff)
downloadtor-932106f54c35b815756d518b236448b9884d6bde.tar.gz
tor-932106f54c35b815756d518b236448b9884d6bde.zip
Efficiency hack: call tor_fix_source_file late, not early. Add "BUG" domain. Domains are now bitmasks... just in case. Make some err msgs non-general.
svn:r5309
Diffstat (limited to 'src/common/log.c')
-rw-r--r--src/common/log.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/common/log.c b/src/common/log.c
index 3bdd55a481..aa167ac57f 100644
--- a/src/common/log.c
+++ b/src/common/log.c
@@ -184,7 +184,7 @@ format_msg(char *buf, size_t buf_len,
* message. The actual message is derived as from tor_snprintf(format,ap).
*/
static void
-logv(int severity, int domain, const char *funcname, const char *format,
+logv(int severity, unsigned int domain, const char *funcname, const char *format,
va_list ap)
{
char buf[10024];
@@ -234,7 +234,7 @@ logv(int severity, int domain, const char *funcname, const char *format,
/** Output a message to the log. */
void
-_log(int severity, int domain, const char *format, ...)
+_log(int severity, unsigned int domain, const char *format, ...)
{
va_list ap;
va_start(ap,format);
@@ -245,7 +245,7 @@ _log(int severity, int domain, const char *format, ...)
/** Output a message to the log, prefixed with a function name <b>fn</b>. */
#ifdef __GNUC__
void
-_log_fn(int severity, int domain, const char *fn, const char *format, ...)
+_log_fn(int severity, unsigned int domain, const char *fn, const char *format, ...)
{
va_list ap;
va_start(ap,format);
@@ -255,7 +255,7 @@ _log_fn(int severity, int domain, const char *fn, const char *format, ...)
#else
const char *_log_fn_function_name=NULL;
void
-_log_fn(int severity, int domain, const char *format, ...)
+_log_fn(int severity, unsigned int domain, const char *format, ...)
{
va_list ap;
va_start(ap,format);
@@ -264,7 +264,7 @@ _log_fn(int severity, int domain, const char *format, ...)
_log_fn_function_name = NULL;
}
void
-_debug(int domain, const char *format, ...)
+_debug(unsigned int domain, const char *format, ...)
{
va_list ap;
va_start(ap,format);
@@ -273,7 +273,7 @@ _debug(int domain, const char *format, ...)
_log_fn_function_name = NULL;
}
void
-_info(int domain, const char *format, ...)
+_info(unsigned int domain, const char *format, ...)
{
va_list ap;
va_start(ap,format);
@@ -282,7 +282,7 @@ _info(int domain, const char *format, ...)
_log_fn_function_name = NULL;
}
void
-_notice(int domain, const char *format, ...)
+_notice(unsigned int domain, const char *format, ...)
{
va_list ap;
va_start(ap,format);
@@ -291,7 +291,7 @@ _notice(int domain, const char *format, ...)
_log_fn_function_name = NULL;
}
void
-_warn(int domain, const char *format, ...)
+_warn(unsigned int domain, const char *format, ...)
{
va_list ap;
va_start(ap,format);
@@ -300,11 +300,11 @@ _warn(int domain, const char *format, ...)
_log_fn_function_name = NULL;
}
void
-_err(const char *format, ...)
+_err(unsigned int domain, const char *format, ...)
{
va_list ap;
va_start(ap,format);
- logv(LOG_ERR, LD_GENERAL, _log_fn_function_name, format, ap);
+ logv(LOG_ERR, domain, _log_fn_function_name, format, ap);
va_end(ap);
_log_fn_function_name = NULL;
}