63 #ifndef OPAL_OUTPUT_H_
64 #define OPAL_OUTPUT_H_
66 #include "opal_config.h"
95 OPAL_DECLSPEC
extern bool opal_output_redirected_to_syslog;
96 OPAL_DECLSPEC
extern int opal_output_redirected_syslog_pri;
146 #if !defined(__WINDOWS__)
148 #elif !defined(_MSC_VER)
343 OPAL_DECLSPEC
void opal_output_reopen_all(
void);
382 OPAL_DECLSPEC
void opal_output(
int output_id,
const char *format, ...) __opal_attribute_format__(__printf__, 2, 3);
413 const
char *format, ...) __opal_attribute_format__(__printf__, 3, 4);
419 const
char *format, va_list ap) __opal_attribute_format__(__printf__, 3, 0);
436 const
char *format, ...) __opal_attribute_format__(__printf__, 3, 4);
442 const
char *format, va_list ap) __opal_attribute_format__(__printf__, 3, 0);
508 #if OPAL_ENABLE_DEBUG
516 #define OPAL_OUTPUT(a) opal_output a
525 #define OPAL_OUTPUT_VERBOSE(a) opal_output_verbose a
534 #define OPAL_OUTPUT(a)
543 #define OPAL_OUTPUT_VERBOSE(a)
OPAL_DECLSPEC void opal_output_set_output_file_info(const char *dir, const char *prefix, char **olddir, char **oldprefix)
Set characteristics for output files.
Definition: output.c:469
opal_object_t super
Class parent.
Definition: output.h:114
OPAL_DECLSPEC int opal_output_open(opal_output_stream_t *lds)
Opens an output stream.
Definition: output.c:216
OPAL_DECLSPEC void opal_output_close(int output_id)
Close an output stream.
Definition: output.c:321
OPAL_DECLSPEC void OPAL_DECLSPEC void opal_output_verbose(int verbose_level, int output_id, const char *format,...) __opal_attribute_format__(__printf__
Send output to a stream only if the passed verbosity level is high enough.
Structure used to request the opening of a OPAL output stream.
Definition: output.h:112
bool lds_want_syslog
Indicates whether output of the stream should be sent to the syslog or not.
Definition: output.h:197
OPAL_DECLSPEC void OPAL_DECLSPEC void OPAL_DECLSPEC void OPAL_DECLSPEC char * opal_output_string(int verbose_level, int output_id, const char *format,...) __opal_attribute_format__(__printf__
Send output to a string if the verbosity level is high enough.
char * lds_file_suffix
When opal_output_stream_t::lds_want_file is true, this field indicates the string suffix to add to th...
Definition: output.h:243
int lds_verbose_level
Indicate the starting verbosity level of the stream.
Definition: output.h:128
char * lds_syslog_ident
When opal_output_stream_t::lds_want_syslog is true, this field is examined to see what ident value sh...
Definition: output.h:147
char * lds_suffix
String suffix added to all output on the stream.
Definition: output.h:172
OPAL_DECLSPEC int opal_output_reopen(int output_id, opal_output_stream_t *lds)
Re-opens / redirects an output stream.
Definition: output.c:225
OPAL_DECLSPEC void opal_output_finalize(void)
Shut down the output stream system.
Definition: output.c:495
int lds_syslog_priority
When opal_output_stream_t::lds_want_syslog is true, this field is examined to see what priority outpu...
Definition: output.h:139
OPAL_DECLSPEC void opal_output(int output_id, const char *format,...) __opal_attribute_format__(__printf__
Main function to send output to a stream.
OPAL_DECLSPEC OBJ_CLASS_DECLARATION(opal_output_stream_t)
Declare the class of this type.
OPAL_DECLSPEC int opal_output_get_verbosity(int output_id)
Get the verbosity level for a stream.
Definition: output.c:948
bool lds_is_debugging
Indicates whether the output of the stream is debugging/developer-only output or not.
Definition: output.h:182
OPAL_DECLSPEC bool opal_output_init(void)
Initializes the output stream system and opens a default "verbose" stream.
Definition: output.c:124
OPAL_DECLSPEC void OPAL_DECLSPEC void OPAL_DECLSPEC void OPAL_DECLSPEC char OPAL_DECLSPEC char OPAL_DECLSPEC void opal_output_set_verbosity(int output_id, int level)
Set the verbosity level for a stream.
Definition: output.c:458
Base object.
Definition: opal_object.h:182
bool lds_want_stdout
Whether to send stream output to stdout or not.
Definition: output.h:204
char * lds_prefix
String prefix added to all output on the stream.
Definition: output.h:162
bool lds_want_stderr
Whether to send stream output to stderr or not.
Definition: output.h:210
OPAL_DECLSPEC void OPAL_DECLSPEC void OPAL_DECLSPEC void OPAL_DECLSPEC char OPAL_DECLSPEC char * opal_output_vstring(int verbose_level, int output_id, const char *format, va_list ap) __opal_attribute_format__(__printf__
Same as opal_output_string, but accepts a va_list form of varargs.
A simple C-language object-oriented system with single inheritance and ownership-based memory managem...
bool lds_want_file_append
When opal_output_stream_t::lds_want_file is true, this field indicates whether to append the file (if...
Definition: output.h:229
OPAL_DECLSPEC bool opal_output_switch(int output_id, bool enable)
Enables and disables output streams.
Definition: output.c:234
bool lds_want_file
Whether to send stream output to a file or not.
Definition: output.h:221
OPAL_DECLSPEC void OPAL_DECLSPEC void OPAL_DECLSPEC void opal_output_vverbose(int verbose_level, int output_id, const char *format, va_list ap) __opal_attribute_format__(__printf__
Same as opal_output_verbose(), but takes a va_list form of varargs.