diff options
author | Nick Mathewson <nickm@torproject.org> | 2003-05-09 02:25:37 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2003-05-09 02:25:37 +0000 |
commit | 0957ffeb832ea62808fed314273823bd50ce06c3 (patch) | |
tree | 8ce989544a20c3783a2da0b9e4212bce223f6795 /src/common/log.h | |
parent | 9f38ba196c6d1bde5a460f7e5bfb90c9e127f235 (diff) | |
download | tor-0957ffeb832ea62808fed314273823bd50ce06c3.tar.gz tor-0957ffeb832ea62808fed314273823bd50ce06c3.zip |
work on versioning; new log_fn function
svn:r288
Diffstat (limited to 'src/common/log.h')
-rw-r--r-- | src/common/log.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/common/log.h b/src/common/log.h index e70aa2f5bd..7e24ae0a15 100644 --- a/src/common/log.h +++ b/src/common/log.h @@ -8,8 +8,11 @@ /* * Changes : * $Log$ - * Revision 1.1 2002/06/26 22:45:50 arma - * Initial revision + * Revision 1.2 2003/05/09 02:25:37 nickm + * work on versioning; new log_fn function + * + * Revision 1.1.1.1 2002/06/26 22:45:50 arma + * initial commit: current code * * Revision 1.5 2002/01/26 18:52:00 mp292 * Reviewed according to Secure-Programs-HOWTO. @@ -36,5 +39,12 @@ /* Outputs a message to stdout and also logs the same message using syslog. */ void log(int severity, const char *format, ...); +#ifdef __GNUCC__ +#define log_fn(severity, format, args...) \ + log((severity), __PRETTY_FUNCTION__ # "(): " # format, ##args) +#else +#define log_fn log +#endif + # define __LOG_H #endif |