Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
Go to the documentation of this file.
41 #define STM_LEVEL_NONE (0)
49 #define STM_LEVEL_SEVERE (1024)
56 #define STM_LEVEL_WARNING (1025)
63 #define STM_LEVEL_INFO (1026)
70 #define STM_LEVEL_FINE (1027)
77 #define STM_LEVEL_FINER (1028)
84 #define STM_LEVEL_FINEST (1029)
92 #define STM_LEVEL_ALL (0xFFFFFFFF)
121 int (*
st_print_fn) (
struct OutputStream *stream_p,
const uint32 level,
const char *
const filename_s,
const int line_number,
const char *message_s, va_list args);
245 GRASSROOTS_UTIL_API int PrintLog (
const uint32 level,
const char *
const filename_s,
const int line_number,
const char *message_s, ...);
void SetDefaultErrorStream(OutputStream *stream_p)
Set the Server-side OutputStream for printing error messages to.
int PrintToOutputStream(OutputStream *stream_p, const char *const filename_s, const int line_number, const char *message_s,...)
Print to a given error OutputStream.
void FreeOutputStream(struct OutputStream *stream_p)
Free an OutputStream.
bool InitDefaultOutputStream(void)
Initialise the default OutputStreams ready for use.
void SetDefaultLogStream(OutputStream *stream_p)
Set the Server-side OutputStream for printing error messages to.
bool FlushOutputStream(OutputStream *stream_p)
Flush an OutputStream.
int PrintLog(const uint32 level, const char *const filename_s, const int line_number, const char *message_s,...)
Print to the log OutputStream.
int(* st_print_fn)(struct OutputStream *stream_p, const uint32 level, const char *const filename_s, const int line_number, const char *message_s, va_list args)
Print to an OutputStream.
Definition: streams.h:121
int PrintLogVarArgs(const uint32 level, const char *const filename_s, const int line_number, const char *message_s, va_list args)
Print to the log OutputStream.
OutputStream * GetLogOutput(void)
Get where logging messages will be sent.
int PrintErrorsVarArgs(const uint32 level, const char *const filename_s, const int line_number, const char *message_s, va_list args)
Print to the error OutputStream.
bool FlushErrors(void)
Flush the errors OutputStream.
void FreeDefaultOutputStream(void)
Free the default OutputStreams.
bool FlushLog(void)
Flush the logging OutputStream.
int PrintErrors(const uint32 level, const char *const filename_s, const int line_number, const char *message,...)
Print to the error OutputStream.
An datatype to abstract out the process of writing log and error messages to the appropriate processe...
Definition: streams.h:106
#define GRASSROOTS_UTIL_API
Definition: grassroots_util_library.h:47
bool(* st_flush_fn)(struct OutputStream *stream_p)
Flush any pending writes to an OutputStream.
Definition: streams.h:130
OutputStream * GetErrorsOutput(void)
Get where error messages will be sent.
void(* st_free_stream_fn)(struct OutputStream *stream_p)
Callback function to free the OutputStream if it needs any custom behaviour.
Definition: streams.h:137