aboutsummaryrefslogtreecommitdiff
path: root/error.h
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2009-04-13 03:30:30 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2009-04-13 03:30:30 +0000
commitb16cd4d28cdf9bf16fdbe892b82b88f467088509 (patch)
treed0dcb3e5e843f3ce8b2b39871094c3aaa777bce9 /error.h
parentAllow "management-client" directive to be used (diff)
downloadopenvpn-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.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/error.h b/error.h
index b949efc..143b73a 100644
--- a/error.h
+++ b/error.h
@@ -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)