mirror of
https://git.telodendria.io/Telodendria/Cytoplasm.git
synced 2025-04-26 02:46:02 +00:00
redesign logging
This commit is contained in:
parent
39c25e5a17
commit
36575b947f
2 changed files with 62 additions and 63 deletions
|
@ -46,6 +46,7 @@
|
|||
|
||||
#define LOG_FLAG_COLOR (1 << 0)
|
||||
#define LOG_FLAG_SYSLOG (1 << 1)
|
||||
#define LOG_FLAG_STDOUT (1 << 2)
|
||||
|
||||
/**
|
||||
* A log is defined as a configuration that describes the properties
|
||||
|
@ -110,15 +111,9 @@ extern void LogConfigUnindent(LogConfig *);
|
|||
extern void LogConfigIndentSet(LogConfig *, size_t);
|
||||
|
||||
/**
|
||||
* Set the file stream that logging output should be written to. This
|
||||
* defaults to standard output, but it can be set to standard error,
|
||||
* or any other arbitrary stream. Passing a NULL value for the stream
|
||||
* pointer sets the log output to the standard output. Note that the
|
||||
* output stream is only used if
|
||||
* .Va LOG_FLAG_SYSLOG
|
||||
* is not set.
|
||||
* Set the file stream that logging output should be written to.
|
||||
*/
|
||||
extern void LogConfigOutputSet(LogConfig *, Stream *);
|
||||
extern void LogConfigFileSet(LogConfig *, Stream *);
|
||||
|
||||
/**
|
||||
* Set a number of boolean options on a log configuration. This
|
||||
|
@ -135,12 +130,7 @@ extern void LogConfigOutputSet(LogConfig *, Stream *);
|
|||
* is checked before writing any terminal sequences.
|
||||
* .It LOG_FLAG_SYSLOG
|
||||
* When set, log output to the syslog using
|
||||
* .Xr syslog 3 ,
|
||||
* instead of logging to the file set by
|
||||
* .Fn LogConfigOutputSet .
|
||||
* This flag always overrides the stream set by that function,
|
||||
* regardless of when it was set, even if it was set after this flag
|
||||
* was set.
|
||||
* .Xr syslog 3
|
||||
* .El
|
||||
*/
|
||||
extern void LogConfigFlagSet(LogConfig *, int);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue