| OLD | NEW |
| 1 /* $OpenBSD: err.c,v 1.2 2002/06/25 15:50:15 mickey Exp $ */ | 1 /* $OpenBSD: err.c,v 1.2 2002/06/25 15:50:15 mickey Exp $ */ |
| 2 | 2 |
| 3 /* | 3 /* |
| 4 * log.c | 4 * log.c |
| 5 * | 5 * |
| 6 * Based on err.c, which was adapted from OpenBSD libc *err* *warn* code. | 6 * Based on err.c, which was adapted from OpenBSD libc *err* *warn* code. |
| 7 * | 7 * |
| 8 * Copyright (c) 2005 Nick Mathewson <nickm@freehaven.net> | 8 * Copyright (c) 2005 Nick Mathewson <nickm@freehaven.net> |
| 9 * | 9 * |
| 10 * Copyright (c) 2000 Dug Song <dugsong@monkey.org> | 10 * Copyright (c) 2000 Dug Song <dugsong@monkey.org> |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 #ifdef WIN32 | 44 #ifdef WIN32 |
| 45 #define WIN32_LEAN_AND_MEAN | 45 #define WIN32_LEAN_AND_MEAN |
| 46 #include <windows.h> | 46 #include <windows.h> |
| 47 #undef WIN32_LEAN_AND_MEAN | 47 #undef WIN32_LEAN_AND_MEAN |
| 48 #endif | 48 #endif |
| 49 #include <sys/types.h> | 49 #include <sys/types.h> |
| 50 #ifdef HAVE_SYS_TIME_H | 50 #ifdef HAVE_SYS_TIME_H |
| 51 #include <sys/time.h> | 51 #include <sys/time.h> |
| 52 #else | 52 #else |
| 53 #include <sys/_time.h> | 53 #include <sys/_libevent_time.h> |
| 54 #endif | 54 #endif |
| 55 #include <stdio.h> | 55 #include <stdio.h> |
| 56 #include <stdlib.h> | 56 #include <stdlib.h> |
| 57 #include <stdarg.h> | 57 #include <stdarg.h> |
| 58 #include <string.h> | 58 #include <string.h> |
| 59 #include <errno.h> | 59 #include <errno.h> |
| 60 #include "event.h" | 60 #include "event.h" |
| 61 | 61 |
| 62 #include "log.h" | 62 #include "log.h" |
| 63 #include "evutil.h" | 63 #include "evutil.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 case _EVENT_LOG_ERR: | 178 case _EVENT_LOG_ERR: |
| 179 severity_str = "err"; | 179 severity_str = "err"; |
| 180 break; | 180 break; |
| 181 default: | 181 default: |
| 182 severity_str = "???"; | 182 severity_str = "???"; |
| 183 break; | 183 break; |
| 184 } | 184 } |
| 185 (void)fprintf(stderr, "[%s] %s\n", severity_str, msg); | 185 (void)fprintf(stderr, "[%s] %s\n", severity_str, msg); |
| 186 } | 186 } |
| 187 } | 187 } |
| OLD | NEW |