version: "0.4.2" classes: - name: "StreamTarget" doc: > A target that will write log messages to a provided I/O stream. Events logged to a StreamTarget will be separated by a newline. Stream targets are equivalent to file targets, except that the associated stream must be opened and closed by the caller rather than the target itself. Stream targets also provide a quick way to log to stderr and stdout, which is not possible with a FileTarget. namespace: "stumpless" equivalent-struct: name: "stumpless_target" includes: "stumpless/target.h" constructors: - doc: > Opens a stream target for the given stream. wrapped-function: name: "stumpless_open_stream_target" includes: "stumpless/target/stream.h" params: - name: "name" doc: "The name of this target." type: "const char *" - name: "stream" doc: "The stream to log events to." type: name: "FILE *" includes: "stdio.h" return: type: "equivalent-struct-pointer" use-template: "pointer-return-error-check" destructor: doc: > Closes the target and releases all memory owned by it. Does NOT close the stream associated with the target. wrapped-function: name: "stumpless_close_stream_target" includes: "stumpless/target/stream.h" params: - value: "equivalent-struct-pointer" functions: - use-template: "common-target-functions" - name: "OpenStderr" doc: > Opens a stream target to stderr. This is equivalent to creating a new target with stderr provided as the stream. static: true params: - name: "name" doc: "The name of the newly created target." type: "const char *" return: doc: "The newly created target." type: "StreamTarget" wrapped-function: name: "stumpless_open_stderr_target" params: - value: "name" - name: "OpenStdout" doc: > Opens a stream target to stdout. This is equivalent to creating a new target with stdout provided as the stream. static: true params: - name: "name" doc: "The name of the newly created target." type: "const char *" return: doc: "The newly created target." type: "StreamTarget" wrapped-function: name: "stumpless_open_stderr_target" params: - value: "name"