diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2009-04-13 03:30:30 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2009-04-13 03:30:30 +0000 |
commit | b16cd4d28cdf9bf16fdbe892b82b88f467088509 (patch) | |
tree | d0dcb3e5e843f3ce8b2b39871094c3aaa777bce9 /error.h | |
parent | Allow "management-client" directive to be used (diff) | |
download | openvpn-b16cd4d28cdf9bf16fdbe892b82b88f467088509.tar.xz |
Added errors-to-stderr option. When enabled, fatal errors
that result in the termination of the daemon will be written
to stderr.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@4131 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to '')
-rw-r--r-- | error.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -42,7 +42,8 @@ struct gc_arena; * Where should messages be printed before syslog is opened? * Not used if OPENVPN_DEBUG_COMMAND_LINE is defined. */ -#define OPENVPN_MSG_FP stdout +#define OPENVPN_MSG_FP stdout +#define OPENVPN_ERROR_FP stderr /* * Exit status codes @@ -183,6 +184,10 @@ void x_msg (const unsigned int flags, const char *format, ...) */ void error_reset (void); + +/* route errors to stderr that would normally go to stdout */ +void errors_to_stderr (void); + void set_suppress_timestamps (bool suppressed); #define SDL_CONSTRAIN (1<<0) @@ -198,7 +203,7 @@ const char *msg_flags_string (const unsigned int flags, struct gc_arena *gc); /* * File to print messages to before syslog is opened. */ -FILE *msg_fp(void); +FILE *msg_fp(const unsigned int flags); /* Fatal logic errors */ #define ASSERT(x) do { if (!(x)) assert_failed(__FILE__, __LINE__); } while (false) |