Output functions


Detailed Description

Implements functions that send output to the current environment's console, error stream, and test result string using printf style args.

Debug, warning, errors, fatal messages should provide an indicate of the context in which the message is generated.


Functions

void output_both_stdout ()
 Sets stderr to stdout.
int output_debug (char *format,...)
 Output a debug message to the stdout stream using printf style argument processing.
int output_error (char *format,...)
 Output an error message to the stdout stream using printf style argument processing.
int output_error_raw (char *format,...)
 Output an error message to the stdout stream using printf style argument processing.
int output_fatal (char *format,...)
 Output a fatal error message.
int output_message (char *format,...)
 Output a message to the stdout stream using printf style argument processing.
int output_profile (char *format,...)
 Output a profiler message.
int output_progress ()
 Output a progress report.
int output_raw (char *format,...)
 Output a raw string to the stdout stream using printf style argument processing.
PRINTFUNCTION output_set_stderr (PRINTFUNCTION call)
 Set the stderr print function.
PRINTFUNCTION output_set_stdout (PRINTFUNCTION call)
 Set the stdout print function.
int output_test (char *format,...)
 Output an test message to the stdout stream using printf style argument processing.
int output_verbose (char *format,...)
 Output a verbose message to the stdout stream using printf style argument processing.
int output_warning (char *format,...)
 Output a warning message to the stdout stream using printf style argument processing.
int output_xsd (char *spec)
 Output the XSD snippet of a class.


Function Documentation

void output_both_stdout (  ) 

Sets stderr to stdout.

This was requested to keep all the output consistantly going to the same output for the Java GUI, since catching messages from both stderr and stdout was causing difficulties.

Definition at line 226 of file output.c.

Referenced by cmdarg_load().

int output_debug ( char *  format,
  ... 
)

Output a debug message to the stdout stream using printf style argument processing.

output_debug() will produce output to the standard output stream only when the global_debug_output variable is not 0. Debug messages are always preceded by the string "DEBUG: " and a newline is always appended to the message.

Definition at line 488 of file output.c.

Referenced by cmdarg_load(), exec_debug(), exec_debug_cmd(), exec_sighandler(), exec_start(), and schedule_create().

int output_error ( char *  format,
  ... 
)

int output_error_raw ( char *  format,
  ... 
)

Output an error message to the stdout stream using printf style argument processing.

output_error() will produce output to the standard output stream. Error messages are always preceded by the string "ERROR: " and a newline is always appended to the message.

Definition at line 359 of file output.c.

Referenced by loadall_glm(), and loadall_glm_roll().

int output_fatal ( char *  format,
  ... 
)

Output a fatal error message.

output_fatal() will produce output to the standard output stream. Error messages are always preceded by the string "FATAL: " and a newline is always appended to the message.

Definition at line 273 of file output.c.

Referenced by _object_sync(), class_register(), cmdarg_load(), create_exception_handler(), delete_exception_handler(), environment_start(), index_insert(), local_datetime(), main(), mkdatetime(), module_load(), and throw_exception().

int output_message ( char *  format,
  ... 
)

Output a message to the stdout stream using printf style argument processing.

output_message() will produce output to the standard output stream only when the global_quiet_mode variable is not 0. A newline is always appended to the message.

Definition at line 576 of file output.c.

Referenced by cmdarg_load(), cmex_getenv(), cmex_load(), cmex_module(), environment_start(), exec_debug_cmd(), exec_start(), legal_license(), legal_notice(), main(), output_progress(), and output_xsd().

int output_raw ( char *  format,
  ... 
)

Output a raw string to the stdout stream using printf style argument processing.

output_raw() will produce output to the standard output stream only when the global_quiet_mode variable is not 0.

Definition at line 663 of file output.c.

Referenced by exec_debug(), exec_start(), and output_progress().

PRINTFUNCTION output_set_stderr ( PRINTFUNCTION  call  ) 

Set the stderr print function.

The default function sends error message strings to the stderr stream. Applications that need a handle such messages differently can request they be sent to the function call.

Parameters:
call  The printf style function to call to send text to stderr

Definition at line 250 of file output.c.

PRINTFUNCTION output_set_stdout ( PRINTFUNCTION  call  ) 

Set the stdout print function.

The default function sends normal message strings to the stdout stream. Applications that need a handle such messages differently can request they be sent to the function call.

Parameters:
call  The printf style function to call to send text to stdout

Definition at line 237 of file output.c.

int output_test ( char *  format,
  ... 
)

Output an test message to the stdout stream using printf style argument processing.

output_test() will produce output to the test output file defined by the variable global_testoutputfile. A newline is always appended to the message.

Definition at line 404 of file output.c.

References global_getvar().

Referenced by cmdarg_load(), random_test(), timestamp_test(), and unit_test().

int output_verbose ( char *  format,
  ... 
)

Output a verbose message to the stdout stream using printf style argument processing.

output_verbose() will produce output to the standard output stream only when the global_verbose_mode variable is not 0. Verbose message always have leading spaces and an ellipsis printed before the string, and a newline is always appended to the message.

Definition at line 534 of file output.c.

Referenced by class_get_class_from_classname(), class_register(), cmex_module(), environment_start(), exec_debug(), exec_debug_cmd(), exec_start(), exec_test(), index_create(), index_insert(), index_shuffle(), load_tzspecs(), loadall_glm(), loadall_glm_roll(), main(), module_load(), random_test(), timestamp_test(), unit_init(), and unit_test().

int output_warning ( char *  format,
  ... 
)

Output a warning message to the stdout stream using printf style argument processing.

output_warning() will produce output to the standard output stream only when the global_warn_mode variable is not 0. Warning messages are always preceded by the string "WARNING: " and a newline is always appended to the message.

Definition at line 443 of file output.c.

Referenced by class_define_map(), class_find_property(), cmdarg_load(), convert_to_loadshape(), global_create(), loadall(), object_set_name(), random_bernoulli(), random_degenerate(), random_exponential(), random_normal(), random_pareto(), random_sampled(), random_uniform(), and randwarn().


GridLAB-DTM Version 2.0
An open-source project initiated by the US Department of Energy