From 99b813b963f029528ad6e6bdb2095165d1541a9b Mon Sep 17 00:00:00 2001
From: "Jeffrey H. Johnson" Defines the abstract interface for an adapter, which ultimately becomes a public base class of logger (there can be more than one).
- More... Adapter for boost::format (when available).
- More... The default adapter implementation.
- More... In the event that no custom configuration or behavior is desired, provides defaults for everything.
- More... The exception type thrown by libsir.
- More... Inherits std::runtime_error. Adapter for {fmt} (when available).
- More... The primary C++ interface to libsir.
- More... Inherits TAdapters< TPolicy >. The primary C++ interface to libsir. Instantiate this class in order to access libsir with all the benefits of C++, including RAII initialization/cleanup, custom adapters, and more. Defines the partially abstract interface for a policy which controls the behavior of logger at runtime.
- More... Adapter for std::format (when available).
- More... Provides a std::iostream interface to libsir's logging functions.
- More... Compile-time configuration of libsir. Compile-time configuration of libsir. The variables in the following table are applied at compile-time when executing Example: The string included in SIR_FHFORMAT when a logging session begins. The string included in SIR_FHFORMAT when a logging session begins. The string included in SIR_FHFORMAT when a file is rolled/archived due to becoming larger than SIR_FROLLSIZE bytes in size. The string included in SIR_FHFORMAT when a file is rolled/archived due to becoming larger than SIR_FROLLSIZE bytes in size. The The time format string used in file headers (see SIR_FHFORMAT). The time format string used in file headers (see SIR_FHFORMAT). Example Example The sequence number format string for rolled/archived log files (see SIR_FNAMEFORMAT). The sequence number format string for rolled/archived log files (see SIR_FNAMEFORMAT). Example The time format string for rolled/archived log files (see SIR_FNAMEFORMAT). The time format string for rolled/archived log files (see SIR_FNAMEFORMAT). Example The maximum number of characters allowable in one log message. This does not include accompanying formatted output (see SIR_MAXOUTPUT). This does not include accompanying formatted output (see SIR_MAXOUTPUT). Default sir_option bitmasks, sir_level registrations, and sir_textstyle bitmasks.
-More... Default sir_option bitmasks, sir_level registrations, and sir_textstyle bitmasks. Default sir_option bitmasks, sir_level registrations, and sir_textstyle bitmasks. Called by libsir when a message is dispatched on any level whose bit was set in the Called by libsir when a message is dispatched on any level whose bit was set in the The Functions and types that comprise the public interface to libsir.
-More... Dispatches a SIRL_ALERT level message. The message will be delivered to all destinations registered to receive alert-level messages, each with their own formatting and styling options. Tears down and cleans up libsir after use. Deallocates resources such as memory buffers, file descriptors, etc. and resets the internal state. No calls into libsir will succeed after calling sir_cleanup (with the exception of sir_makeinit, sir_init, sir_isinitialized,sir_geterror, and sir_geterrorinfo). May be called from any thread. If you wish to utilize libsir again during the same process' lifetime, simply call sir_init again. Deallocates resources such as memory buffers, file descriptors, etc. and resets the internal state. No calls into libsir will succeed after calling sir_cleanup (with the exception of sir_makeinit, sir_init, sir_isinitialized,sir_geterror, and sir_geterrorinfo). May be called from any thread. If you wish to utilize libsir again during the same process' lifetime, simply call sir_init again. Dispatches a SIRL_CRIT level message. The message will be delivered to all destinations registered to receive critical-level messages, each with their own formatting and styling options. Dispatches a SIRL_DEBUG level message. The message will be delivered to all destinations registered to receive debug-level messages, each with their own formatting and styling options. Dispatches a SIRL_EMERG level message. The message will be delivered to all destinations registered to receive emergency-level messages, each with their own formatting and styling options. Dispatches a SIRL_ERROR level message. The message will be delivered to all destinations registered to receive error-level messages, each with their own formatting and styling options. Retrieves a formatted message for the last error that occurred on the calling thread and returns the associated error code. To retrieve more granular information about an error, or to customize the error message format, use sir_geterrorinfo. To retrieve more granular information about an error, or to customize the error message format, use sir_geterrorinfo. Retrieves granular information about the last error that occurred on the calling thread. To retrieve just an error code and a formatted message, use sir_geterror. To retrieve just an error code and a formatted message, use sir_geterror. Dispatches a SIRL_INFO level message. The message will be delivered to all destinations registered to receive information-level messages, each with their own formatting and styling options. Initializes libsir for use. Must be called before making any other calls into libsir (with the exception of sir_makeinit). For every call to sir_init, there must be a corresponding call to sir_cleanup. All exported libsir functions are thread-safe, so you may initialize and cleanup on whichever thread you wish. Must be called before making any other calls into libsir (with the exception of sir_makeinit). For every call to sir_init, there must be a corresponding call to sir_cleanup. All exported libsir functions are thread-safe, so you may initialize and cleanup on whichever thread you wish. Creates a sir_textcolor from red, green, and blue components. Dispatches a SIRL_NOTICE level message. The message will be delivered to all destinations registered to receive notice-level messages, each with their own formatting and styling options. Removes a file previously added to libsir. Immediately causes the file represented by Immediately causes the file represented by Its contents will remain intact, and any pending writes will be flushed to the file before it is closed. Reset text styling for stdio (stdout/stderr) destinations to their default values. Set new text styling for stdio (stdout/stderr) destinations on a per-level basis. To modify formatting options for To modify level registrations for To modify level registrations for
(glibc ≳2.4, musl ≳1.2.3, uClibc‑ng ≳1.0.43) | **GCC** (4.8.4 ‑ 14.0.1), **Clang** (3.8 ‑ 18.1.5), **Oracle Studio C/C++** (≳12.6), **Circle** (1.0.0‑200), **IBM Advance Toolchain** (14 ‑ 17), **IBM XL C/C++** (16.1.1.2 ‑ 16.1.1.15), **IBM Open XL C/C++** (17.1.1.0 ‑ 17.1.1.2), **NVIDIA HPC SDK C/C++** (23.5 ‑ 24.3), **Arm HPC C/C++** (22.1 ‑ 23.10), **DMD ImportC** (2.104.2 ‑ 2.108.1), **AMD Optimizing C/C++** (4.0.0 ‑ 4.2.0), **Intel oneAPI DPC++/C++** (2023.1 ‑ 2024.1.0), **Open64** (5, AMD 4.5.2.1), **Intel C++ Compiler Classic** (2021.9.0 ‑ 2021.10.0), **Portable C Compiler** (1.2.0.DEVEL‑20230730), **Kefir** (≳0.3.0), **Chibicc** (2020.12.6), **CompCert C** (3.11 ‑ 3.14, no‑TLS), **Chamois‑CompCert C** (3.14‑20231130, TLS) |
+| **Linux** ≳2.6.32
(glibc ≳2.4, musl ≳1.2.3, uClibc‑ng ≳1.0.43) | **GCC** (4.8.4 ‑ 14.1.1), **Clang** (3.8 ‑ 18.1.5), **Oracle Studio C/C++** (≳12.6), **Circle** (1.0.0‑200), **IBM Advance Toolchain** (14 ‑ 17), **IBM XL C/C++** (16.1.1.2 ‑ 16.1.1.15), **IBM Open XL C/C++** (17.1.1.0 ‑ 17.1.1.2), **NVIDIA HPC SDK C/C++** (23.5 ‑ 24.3), **Arm HPC C/C++** (22.1 ‑ 23.10), **DMD ImportC** (2.104.2 ‑ 2.109.0), **AMD Optimizing C/C++** (4.0.0 ‑ 4.2.0), **Intel oneAPI DPC++/C++** (2023.1 ‑ 2024.1.0), **Open64** (5, AMD 4.5.2.1), **Intel C++ Compiler Classic** (2021.9.0 ‑ 2021.10.0), **Portable C Compiler** (1.2.0.DEVEL‑20230730), **Kefir** (≳0.3.0), **Chibicc** (2020.12.6), **CompCert C** (3.11 ‑ 3.14, no‑TLS), **Chamois‑CompCert C** (3.14‑20231130, TLS) |
| **Android** ≳5 | **Android NDK** (r25c ‑ r26d) |
| **IBM AIX** 7.2, 7.3 | **GCC** (8.3 ‑ 12.3), **Clang** (18.1.2 ‑ 18.1.5), **IBM XL C/C++** (16.1.0.3 ‑ 16.1.0.17), **IBM Open XL C/C++** (17.1.1.1 ‑ 17.1.2.5) |
| **IBM i** (**PASE**) 7.5 | **GCC** (10.3.0 ‑ 10.5.0), **IBM XL C/C++** (16.1.0.15 ‑ 16.1.0.17) |
-| **macOS** ≳10.15 | **Xcode** (11.7 ‑ 15.3), **GCC** (10.4 ‑ 13.2.1), **Clang** (11.0.3 ‑ 17.0.6), **DMD ImportC** (2.105.0 ‑ 2.108.1), **Intel C++ Compiler Classic** (2021.9.0 ‑ 2021.10.0) |
+| **macOS** ≳10.15 | **Xcode** (11.7 ‑ 15.3), **GCC** (10.4 ‑ 13.2.1), **Clang** (11.0.3 ‑ 17.0.6), **DMD ImportC** (2.105.0 ‑ 2.109.0), **Intel C++ Compiler Classic** (2021.9.0 ‑ 2021.10.0) |
| **Windows** ≳10, 11 | **Microsoft Visual C/C++** (17.6 ‑ 17.9.6), **Clang‑CL** (16.0.6 ‑ 18.1.5), **GCC‑MinGW** (12.2.1 ‑ 14.0.1), **LLVM‑MinGW** (15.0 ‑ 18.1.5), **Embarcadero C++** (7.20 ‑ 7.70), **OrangeC** (≳6.71.10) |
| **Cygwin** 3.4 | **GCC** (11.2 ‑ 13.2.1) |
-| **FreeBSD** ≳11.3 | **GCC** (11.4 ‑ 13.2.1), **Clang** (10 ‑ 17.0.6), **DMD ImportC** (2.105.0 ‑ 2.108.1) |
+| **FreeBSD** ≳11.3 | **GCC** (11.4 ‑ 13.2.1), **Clang** (10 ‑ 17.0.6), **DMD ImportC** (2.105.0 ‑ 2.109.0) |
| **NetBSD** 9.2 | **GCC** (7.5 ‑ 13.2), **Clang** (15.0.7 ‑ 17.0.6) |
| **OpenBSD** 7.3 | **GCC** (11.2), **Clang** (13 ‑ 17.0.6), **DMD ImportC** (2.106.0) |
| **DragonFly** **BSD** 6.4 | **GCC** (8.3 ‑ 13), **Clang** (10.0.1 ‑ 17.0.6) |
diff --git a/bindings/ch/_sir_strredact.chf b/bindings/ch/_sir_strredact.chf
index 978b3a772..4f4e05b81 100644
--- a/bindings/ch/_sir_strredact.chf
+++ b/bindings/ch/_sir_strredact.chf
@@ -33,7 +33,7 @@
char*
_sir_strredact(char *str, const char *sub, const char c) {
- void* fptr;
+ void* fptr;
char* retval;
fptr = dlsym(_Chsir_handle, "_sir_strredact_chdl");
diff --git a/docs/annotated.html b/docs/annotated.html
index 026cfbb02..ac99fdd3d 100644
--- a/docs/annotated.html
+++ b/docs/annotated.html
@@ -4,7 +4,7 @@
-
+
@@ -32,6 +32,7 @@
+
@@ -54,7 +55,7 @@
-
+
@@ -84,7 +85,7 @@
-
@@ -323,31 +324,22 @@
+ ▼Nsir Libsir C++ wrapper implementation
+
-
+
@@ -84,7 +85,7 @@
▼Nsir Libsir C++ wrapper implementation Cadapter Defines the abstract interface for an adapter, which ultimately becomes a public base class of logger (there can be more than one) Cboost_format_adapter Adapter for boost::format (when available)
@@ -164,7 +165,7 @@
diff --git a/docs/ansimacros_8h.html b/docs/ansimacros_8h.html
index 07fed7cc2..c70de51bc 100644
--- a/docs/ansimacros_8h.html
+++ b/docs/ansimacros_8h.html
@@ -4,7 +4,7 @@
-
+
@@ -32,6 +32,7 @@
+
@@ -54,7 +55,7 @@
Cdefault_adapter The default adapter implementation SIR_R_ARROW "\xe2\x86\x92"
A few fun characters.
-
+#define SIR_COLOR(attr, fg, bg, s) SIR_ESC_SEQ(#attr ";" #fg ";" #bg, s) SIR_ESC_SEQE("0;39;49") #define SIR_COLOR(attr, fg, bg, s) SIR_ESC_SEQ(#attr ";" #fg ";" #bg, s) SIR_ESC_SEQE("0;39;49") Creates a sequence of colored characters 's' with foreground color 'fg', background color 'bg', and attributes 'attr' ( 0=normal, 1=bold, 2=dim, 3=italic, 4=underlined, 5=blinking, 7=inverted, 9=strikethrough
).
@@ -172,131 +173,131 @@
Blinking text.
+#define
-#define SIR_BLACK(s) SIR_COLOR(0, 30, 49, s) SIR_BLACK(s) SIR_COLOR(0, 30, 49, s)
Black foreground text.
+#define
-#define SIR_BLACKB(s) SIR_COLOR(1, 30, 49, s) SIR_BLACKB(s) SIR_COLOR(1, 30, 49, s)
Bold black foreground text.
+#define
-#define SIR_RED(s) SIR_COLOR(0, 31, 49, s) SIR_RED(s) SIR_COLOR(0, 31, 49, s)
Red foreground text.
+#define
-#define SIR_REDB(s) SIR_COLOR(1, 31, 49, s) SIR_REDB(s) SIR_COLOR(1, 31, 49, s)
Bold red foreground text.
+#define
-#define SIR_BRED(s) SIR_COLOR(0, 91, 49, s) SIR_BRED(s) SIR_COLOR(0, 91, 49, s)
Bright red foreground text.
+#define
-#define SIR_BREDB(s) SIR_COLOR(1, 91, 49, s) SIR_BREDB(s) SIR_COLOR(1, 91, 49, s)
Bold bright red foreground text.
+#define
-#define SIR_GREEN(s) SIR_COLOR(0, 32, 49, s) SIR_GREEN(s) SIR_COLOR(0, 32, 49, s)
Green foreground text.
+#define
-#define SIR_GREENB(s) SIR_COLOR(1, 32, 49, s) SIR_GREENB(s) SIR_COLOR(1, 32, 49, s)
Bold green foreground text.
+#define
-#define SIR_BGREEN(s) SIR_COLOR(0, 92, 49, s) SIR_BGREEN(s) SIR_COLOR(0, 92, 49, s)
Bright green foreground text.
+#define
-#define SIR_BGREENB(s) SIR_COLOR(1, 92, 49, s) SIR_BGREENB(s) SIR_COLOR(1, 92, 49, s)
Bold bright green foreground text.
+#define
-#define SIR_YELLOW(s) SIR_COLOR(0, 33, 49, s) SIR_YELLOW(s) SIR_COLOR(0, 33, 49, s)
Yellow foreground text.
+#define
-#define SIR_YELLOWB(s) SIR_COLOR(1, 33, 49, s) SIR_YELLOWB(s) SIR_COLOR(1, 33, 49, s)
Bold yellow foreground text.
+#define
-#define SIR_BYELLOW(s) SIR_COLOR(0, 93, 49, s) SIR_BYELLOW(s) SIR_COLOR(0, 93, 49, s)
Bright yellow foreground text.
+#define
-#define SIR_BYELLOWB(s) SIR_COLOR(1, 93, 49, s) SIR_BYELLOWB(s) SIR_COLOR(1, 93, 49, s)
Bold bright yellow foreground text.
+#define
-#define SIR_BLUE(s) SIR_COLOR(0, 34, 49, s) SIR_BLUE(s) SIR_COLOR(0, 34, 49, s)
Blue foreground text.
+#define
-#define SIR_BLUEB(s) SIR_COLOR(1, 34, 49, s) SIR_BLUEB(s) SIR_COLOR(1, 34, 49, s)
Bold blue foreground text.
+#define
-#define SIR_BBLUE(s) SIR_COLOR(0, 94, 49, s) SIR_BBLUE(s) SIR_COLOR(0, 94, 49, s)
Bright blue foreground text.
+#define
-#define SIR_BBLUEB(s) SIR_COLOR(1, 94, 49, s) SIR_BBLUEB(s) SIR_COLOR(1, 94, 49, s)
Bold bright blue foreground text.
+#define
-#define SIR_MAGENTA(s) SIR_COLOR(0, 35, 49, s) SIR_MAGENTA(s) SIR_COLOR(0, 35, 49, s)
Magenta foreground text.
+#define
-#define SIR_MAGENTAB(s) SIR_COLOR(1, 35, 49, s) SIR_MAGENTAB(s) SIR_COLOR(1, 35, 49, s)
Bold magenta foreground text.
+#define
-#define SIR_BMAGENTA(s) SIR_COLOR(0, 95, 49, s) SIR_BMAGENTA(s) SIR_COLOR(0, 95, 49, s)
Bright magenta foreground text.
+#define
-#define SIR_BMAGENTAB(s) SIR_COLOR(1, 95, 49, s) SIR_BMAGENTAB(s) SIR_COLOR(1, 95, 49, s)
Bold bright magenta foreground text.
+#define
-#define SIR_CYAN(s) SIR_COLOR(0, 36, 49, s) SIR_CYAN(s) SIR_COLOR(0, 36, 49, s)
Cyan foreground text.
+#define
-#define SIR_CYANB(s) SIR_COLOR(1, 36, 49, s) SIR_CYANB(s) SIR_COLOR(1, 36, 49, s)
Bold cyan foreground text.
+#define
-#define SIR_BCYAN(s) SIR_COLOR(0, 96, 49, s) SIR_BCYAN(s) SIR_COLOR(0, 96, 49, s)
Bright cyan foreground text.
+#define
-#define SIR_BCYANB(s) SIR_COLOR(1, 96, 49, s) SIR_BCYANB(s) SIR_COLOR(1, 96, 49, s)
Bold bright cyan foreground text.
+#define
-#define SIR_BGRAY(s) SIR_COLOR(0, 37, 49, s) SIR_BGRAY(s) SIR_COLOR(0, 37, 49, s)
Bright gray foreground text.
+#define
-#define SIR_BGRAYB(s) SIR_COLOR(1, 37, 49, s) SIR_BGRAYB(s) SIR_COLOR(1, 37, 49, s)
Bold bright gray foreground text.
+#define
-#define SIR_DGRAY(s) SIR_COLOR(0, 90, 49, s) SIR_DGRAY(s) SIR_COLOR(0, 90, 49, s)
Dark gray foreground text.
+#define
-#define SIR_DGRAYB(s) SIR_COLOR(1, 90, 49, s) SIR_DGRAYB(s) SIR_COLOR(1, 90, 49, s)
Bold dark gray foreground text.
+#define
-#define SIR_WHITE(s) SIR_COLOR(0, 97, 49, s) SIR_WHITE(s) SIR_COLOR(0, 97, 49, s)
White foreground text.
+#define
-#define SIR_WHITEB(s) SIR_COLOR(1, 97, 49, s) SIR_WHITEB(s) SIR_COLOR(1, 97, 49, s)
Bold white foreground text. #define SIR_COLOR
(
-
- attr,
+ attr,
-
- fg,
+ fg,
-
- bg,
+ bg,
-
-
- s
-
-
- )
- SIR_ESC_SEQ(#attr ";" #fg ";" #bg, s) SIR_ESC_SEQE("0;39;49")
+ s ) SIR_ESC_SEQ(#attr ";" #fg ";" #bg, s) SIR_ESC_SEQE("0;39;49")
-
+
+
@@ -149,7 +150,7 @@
diff --git a/docs/classsir_1_1default__adapter.html b/docs/classsir_1_1default__adapter.html
index c0ffccab3..5f6f2546a 100644
--- a/docs/classsir_1_1default__adapter.html
+++ b/docs/classsir_1_1default__adapter.html
@@ -4,7 +4,7 @@
-
+
@@ -32,6 +32,7 @@
+
@@ -54,7 +55,7 @@
TPolicy A derived class of policy which controls the behavior of logger and by association, its adapters.
-
Public Member Functions
+bool get_init_data (sirinit &data) const noexcept final bool get_init_data (sirinit &data) const noexcept final Called by logger before initializing libsir.
-
+constexpr bool on_init_complete () const noexcept final constexpr bool on_init_complete () const noexcept final Called by logger immediately after libsir has been initialized.
@@ -204,7 +204,7 @@
-
Additional Inherited Members
+ Static Public Member Functions inherited from sir::policy Static Public Member Functions inherited from sir::policy static constexpr bool throw_on_error () noexcept Determines whether or not exceptions are thrown in the event that an unercoverable error is encountered by logger or its associated adapter(s).
@@ -160,8 +161,7 @@ bool sir::default_policy::get_init_data
(
- sirinit &
- data )
+ sirinit & data )
const
constexpr bool sir::default_policy::on_init_complete
(
- )
+ )
const
@@ -239,7 +239,7 @@
-
+
Detailed Description
@@ -133,7 +134,7 @@
diff --git a/docs/classsir_1_1fmt__format__adapter.html b/docs/classsir_1_1fmt__format__adapter.html
index 2a3333d45..b191fc20c 100644
--- a/docs/classsir_1_1fmt__format__adapter.html
+++ b/docs/classsir_1_1fmt__format__adapter.html
@@ -4,7 +4,7 @@
-
+
@@ -32,6 +32,7 @@
+
@@ -54,7 +55,7 @@
+
@@ -149,7 +150,7 @@
diff --git a/docs/classsir_1_1logger.html b/docs/classsir_1_1logger.html
index 318733c51..8bd44b2b3 100644
--- a/docs/classsir_1_1logger.html
+++ b/docs/classsir_1_1logger.html
@@ -4,7 +4,7 @@
-
+
@@ -32,6 +32,7 @@
+
@@ -54,7 +55,7 @@
TPolicy A derived class of policy which controls the behavior of logger and by association, its adapters. Detailed Description
@@ -123,7 +124,7 @@
requires DerivedFromT<adapter, TAdapters<TPolicy>...>
class sir::logger< RAII, TPolicy, TAdapters >
+
@@ -142,7 +143,7 @@
diff --git a/docs/classsir_1_1policy.html b/docs/classsir_1_1policy.html
index ac2d4e34d..9d7958479 100644
--- a/docs/classsir_1_1policy.html
+++ b/docs/classsir_1_1policy.html
@@ -4,7 +4,7 @@
-
+
@@ -32,6 +32,7 @@
+
@@ -54,7 +55,7 @@
RAII Set to true to enable 'resource acquisition is initialization' behavior (i.e., libsir is initialized by the ctor, and cleaned up by the dtor). Set to false for manual management of initialization/cleanup.
-
Public Member Functions
+virtual bool get_init_data (sirinit &data) const noexcept=0 virtual bool get_init_data (sirinit &data) const noexcept=0 Called by logger before initializing libsir.
-
+virtual bool on_init_complete () const noexcept=0 virtual bool on_init_complete () const noexcept=0 Called by logger immediately after libsir has been initialized.
@@ -156,8 +157,7 @@
-
Static Public Member Functions
+static constexpr bool throw_on_error () noexcept static constexpr bool throw_on_error () noexcept Determines whether or not exceptions are thrown in the event that an unercoverable error is encountered by logger or its associated adapter(s). virtual bool sir::policy::get_init_data
(
- sirinit &
- data )
+ sirinit & data )
const
@@ -200,7 +200,7 @@ virtual bool sir::policy::on_init_complete
(
- )
+ )
const
@@ -237,7 +237,7 @@ static constexpr bool sir::policy::throw_on_error
(
- )
+ )
@@ -264,7 +264,7 @@
-
+
+
@@ -149,7 +150,7 @@
diff --git a/docs/classsir_1_1std__iostream__adapter.html b/docs/classsir_1_1std__iostream__adapter.html
index 641605925..8a3379898 100644
--- a/docs/classsir_1_1std__iostream__adapter.html
+++ b/docs/classsir_1_1std__iostream__adapter.html
@@ -4,7 +4,7 @@
-
+
@@ -32,6 +32,7 @@
+
@@ -54,7 +55,7 @@
TPolicy A derived class of policy which controls the behavior of logger and by association, its adapters.
-
+ ▼Nsir Libsir C++ wrapper implementation
+
-
+
@@ -84,7 +85,7 @@
▼Nsir Libsir C++ wrapper implementation RDerivedFromPolicy Ensures that T derives from policy RDerivedFromStreamBuf Ensures that T derives from std::streambuf
@@ -127,7 +128,7 @@
diff --git a/docs/conceptsir_1_1_derived_from_policy.html b/docs/conceptsir_1_1_derived_from_policy.html
index c5c6a47ff..00c6779b7 100644
--- a/docs/conceptsir_1_1_derived_from_policy.html
+++ b/docs/conceptsir_1_1_derived_from_policy.html
@@ -4,7 +4,7 @@
-
+
@@ -32,6 +32,7 @@
+
@@ -54,7 +55,7 @@
RDerivedFromT True if all Ts are derived classes of TBase, otherwise false
@@ -157,8 +158,7 @@
-
Functions
+bool _sir_condcreate (sir_condition *cond) bool _sir_condcreate (sir_condition *cond) Creates/initializes a new condition variable.
-
+bool _sir_condbroadcast (sir_condition *cond) bool _sir_condbroadcast (sir_condition *cond) Broadcast signals a condition variable.
-
+bool _sir_conddestroy (sir_condition *cond) bool _sir_conddestroy (sir_condition *cond) Destroys a condition variable.
-
+bool _sir_condwait_timeout (sir_condition *cond, sir_mutex *mutex, const sir_wait *howlong) bool _sir_condwait_timeout (sir_condition *cond, sir_mutex *mutex, const sir_wait *howlong) Waits a given amount of time for a condition variable to become signaled. bool _sir_condbroadcast
(
- sir_condition *
- cond )
+ sir_condition * cond )
@@ -184,8 +184,7 @@ bool _sir_condcreate
(
- sir_condition *
- cond )
+ sir_condition * cond )
@@ -211,8 +210,7 @@ bool _sir_conddestroy
(
- sir_condition *
- cond )
+ sir_condition * cond )
@@ -238,25 +236,17 @@ bool _sir_condwait_timeout
(
- sir_condition *
- cond,
+ sir_condition * cond,
- sir_mutex *
- mutex,
+ sir_mutex * mutex,
-
- const sir_wait *
- howlong
-
-
- )
-
+ const sir_wait * howlong )
-
+
Environment variables
make
.sirconfig.h
diff --git a/docs/config_8h.html b/docs/config_8h.html
index c73efe07c..5a00325d6 100644
--- a/docs/config_8h.html
+++ b/docs/config_8h.html
@@ -4,7 +4,7 @@
-
+
@@ -32,6 +32,7 @@
+
@@ -54,7 +55,7 @@
-
Macros
+#define SIR_TIMEFORMAT "%H:%M:%S" #define SIR_TIMEFORMAT "%H:%M:%S" The time stamp format string at the start of log messages-not including milliseconds (as::SIR_MSECFORMAT), which is added separately.
-
+#define SIR_MSECFORMAT ".%03ld" #define SIR_MSECFORMAT ".%03ld" The format for milliseconds (1000ths of a second) in time stamps.
@@ -142,56 +143,56 @@
#define SIR_EOL_LF "\n" The line feed (LF) character to use in the end of line sequence.
-
+#define SIR_EOL SIR_EOL_LF #define SIR_EOL SIR_EOL_LF The end of line sequence.
-
+#define SIR_LEVELPREFIX "[" #define SIR_LEVELPREFIX "[" The string placed directly before the human-readable logging level.
-
+#define SIR_LEVELSUFFIX "]" #define SIR_LEVELSUFFIX "]" The string placed directly after the human-readable logging level.
-
+#define SIR_PIDPREFIX "(" #define SIR_PIDPREFIX "(" The string placed directly before process and thread IDs.
-
+#define SIR_PIDSUFFIX ")" #define SIR_PIDSUFFIX ")" The character placed directly after process and thread IDs.
-
+#define SIR_PIDFORMAT "%d" #define SIR_PIDFORMAT "%d" The format for the current process ID.
-
+#define SIR_TIDFORMAT "%d" #define SIR_TIDFORMAT "%d" The format for the current thread ID.
-
+#define SIR_PIDSEPARATOR "." #define SIR_PIDSEPARATOR "." The string to place between process and thread IDs.
#define SIR_FOPENMODE "a" The string passed to fopen/fopen_s for log files.
-
+#define SIR_FROLLSIZE (1024 * 1024 * 5) #define SIR_FROLLSIZE (1024 * 1024 * 5) The size, in bytes, at which a log file will be rolled/archived.
-
-#define SIR_FHTIMEFORMAT "%H:%M:%S %a %d %b %Y (%z)"
+ The time format string used in file headers (see SIR_FHFORMAT).
+#define SIR_FHTIMEFORMAT "%H:%M:%S %a %d %b %Y (%z)" The time format string used in file headers (see SIR_FHFORMAT).
-
+#define SIR_FHFORMAT SIR_EOL SIR_EOL "----- %s %s -----" SIR_EOL SIR_EOL #define SIR_FHFORMAT SIR_EOL SIR_EOL "----- %s %s -----" SIR_EOL SIR_EOL The format string written to a log file when logging begins or the file is rolled/archived.
-
-#define SIR_FHBEGIN "session begin @"
+ The string included in SIR_FHFORMAT when a logging session begins.
+#define SIR_FHBEGIN "session begin @" The string included in SIR_FHFORMAT when a logging session begins.
-
-#define SIR_FHROLLED "archived as %s due to size @"
+ The string included in SIR_FHFORMAT when a file is rolled/archived due to becoming larger than SIR_FROLLSIZE bytes in size.
+#define SIR_FHROLLED "archived as %s due to size @" The string included in SIR_FHFORMAT when a file is rolled/archived due to becoming larger than SIR_FROLLSIZE bytes in size.
-
-#define SIR_FNAMETIMEFORMAT "%Y-%m-%d-%H%M%S"
+ The time format string for rolled/archived log files (see SIR_FNAMEFORMAT).
+#define SIR_FNAMETIMEFORMAT "%Y-%m-%d-%H%M%S" The time format string for rolled/archived log files (see SIR_FNAMEFORMAT).
-
-#define SIR_FNAMESEQFORMAT "-%hu"
+ The sequence number format string for rolled/archived log files (see SIR_FNAMEFORMAT).
+#define SIR_FNAMESEQFORMAT "-%hu" The sequence number format string for rolled/archived log files (see SIR_FNAMEFORMAT).
-
+#define SIR_FNAMEFORMAT "%s-%s%s%s" #define SIR_FNAMEFORMAT "%s-%s%s%s" The format string for rolled/archived log file names.
@@ -238,7 +239,7 @@
#define SIR_MAXFHEADER 128 The size, in characters, of the buffer used to hold file header format strings.
-
+#define SIR_MAXMESSAGE 4096 #define SIR_MAXMESSAGE 4096 The maximum number of characters allowable in one log message.
@@ -281,7 +282,7 @@
#define SIR_MAXERROR 256 The maximum size, in characters, of an error message.
-
+#define SIR_ERRORFORMAT "Error in %s (%s:%u): '%s'" #define SIR_ERRORFORMAT "Error in %s (%s:%u): '%s'" The format string for error messages returned by sir_geterror.
@@ -316,7 +317,7 @@
#define SIR_NUMOPTIONS 8 The number of actual options; SIRO_ALL, SIRO_DEFAULT, and SIRO_MSGONLY are pseudo options that end up being mapped (or not) to the others.
-
+#define SIR_HNAME_CHK_INTERVAL 60 #define SIR_HNAME_CHK_INTERVAL 60 The number of seconds to let elapse before checking if the hostname needs refreshing.
@@ -329,15 +330,15 @@
-
#define SIR_SQUELCH_THRESHOLD 5
+ The number of consecutive duplicate messages that will cause libsir to squelch further identical messages, and instead log the message SIR_SQUELCH_MSG_FORMAT. The number of consecutive duplicate messages that will cause libsir to squelch further identical messages, and instead log the message SIR_SQUELCH_MSG_FORMAT.
-
#define SIR_SQUELCH_BACKOFF_FACTOR 2
+ If duplicate messages continue to be logged after the threshold is met, the threshold will be multiplied by this number, resulting in longer intervals between SIR_SQUELCH_MSG_FORMAT messages. If duplicate messages continue to be logged after the threshold is met, the threshold will be multiplied by this number, resulting in longer intervals between SIR_SQUELCH_MSG_FORMAT messages.
-
#define SIR_SQUELCH_MSG_FORMAT "previous message repeated %zu times"
+ The message to be logged when SIR_SQUELCH_THRESHOLD (or a multiple thereof) consecutive duplicate messages are logged. The message to be logged when SIR_SQUELCH_THRESHOLD (or a multiple thereof) consecutive duplicate messages are logged. Detailed Description
@@ -359,7 +360,7 @@
-
#define SIR_EOL SIR_EOL_LF
+ #define SIR_EOL SIR_EOL_LF
-
-
#define SIR_FHFORMAT SIR_EOL SIR_EOL "----- %s %s -----" SIR_EOL SIR_EOL
+ #define SIR_FHFORMAT SIR_EOL SIR_EOL "----- %s %s -----" SIR_EOL SIR_EOL
%s
format specifier is the message:
%s
is the current date/time in the format specified by SIR_FHTIMEFORMAT. %s
is the current date/time in the format specified by SIR_FHTIMEFORMAT.
-
%s
format specifier is the path of the archived file.
-
SIR_FNAMETIMEFORMAT.
-
-
-
diff --git a/docs/config_8h_source.html b/docs/config_8h_source.html
index 8874a52f2..c956c4622 100644
--- a/docs/config_8h_source.html
+++ b/docs/config_8h_source.html
@@ -4,7 +4,7 @@
-
+
@@ -32,6 +32,7 @@
+
@@ -54,7 +55,7 @@
-
+
@@ -89,7 +90,7 @@
-
+
@@ -151,8 +152,7 @@
-
Functions
+int report_error (void) int report_error (void) Prints the last libsir error to stderr.
-
+void report_warning (const char *warning) void report_warning (const char *warning) Prints a warning message along with the last libsir error to stderr.
-
+int main (void) int main (void) This is a basic example of initializing and configuring libsir for use. int main
(
- void
- )
+ void )
@@ -174,8 +174,7 @@ int report_error
(
- void
- )
+ void )
@@ -195,8 +194,7 @@ void report_warning
(
- const char *
- warning )
+ const char * warning )
@@ -219,7 +217,7 @@
-
+
-
+ ▼ example
+
-
+
@@ -89,7 +90,7 @@
▼ example
- example.c A simple demonstration of initialization, configuration, and basic usage of libsir
- ▼ include
+ ▼ sir
+ ▼ include ▼ sir ansimacros.h ANSI escape sequence macros condition.h
@@ -145,13 +146,13 @@
config.h Compile-time configuration wineventlog.h sir.h Public interface to libsir
- sir.hh C++ interface to libsir
- ▼ plugins
+ ▼ sample
+ ▼ plugins ▼ sample
- plugin_sample.h
+ ▼ src ▼ src sir.c Public interface to libsir
- sircondition.c
+ ▼ tests ▼ tests tests++.hh tests.h
@@ -164,7 +165,7 @@
diff --git a/docs/filesystem_8h_source.html b/docs/filesystem_8h_source.html
index 4871d831d..d6d3509b6 100644
--- a/docs/filesystem_8h_source.html
+++ b/docs/filesystem_8h_source.html
@@ -4,7 +4,7 @@
-
+
@@ -32,6 +32,7 @@
+
@@ -54,7 +55,7 @@
tests_malloc.h - w -
diff --git a/docs/functions_func.html b/docs/functions_func.html
index cb77c0ae0..21b125620 100644
--- a/docs/functions_func.html
+++ b/docs/functions_func.html
@@ -4,7 +4,7 @@
-
+
@@ -32,6 +32,7 @@
+
@@ -54,7 +55,7 @@
- w -
diff --git a/docs/globals.html b/docs/globals.html
index bf2f8e7d8..18a27c580 100644
--- a/docs/globals.html
+++ b/docs/globals.html
@@ -4,7 +4,7 @@
-
+
@@ -32,6 +32,7 @@
+
@@ -54,7 +55,7 @@
- s -
diff --git a/docs/globals_defs.html b/docs/globals_defs.html
index a1c9362ec..d6497fbfd 100644
--- a/docs/globals_defs.html
+++ b/docs/globals_defs.html
@@ -4,7 +4,7 @@
-
+
@@ -32,6 +32,7 @@
+
@@ -54,7 +55,7 @@
- s -
diff --git a/docs/globals_func.html b/docs/globals_func.html
index 50e58d8d7..ec8bf8e66 100644
--- a/docs/globals_func.html
+++ b/docs/globals_func.html
@@ -4,7 +4,7 @@
-
+
@@ -32,6 +32,7 @@
+
@@ -54,7 +55,7 @@
- s -
diff --git a/docs/globals_vars.html b/docs/globals_vars.html
index 05f07ec1f..090fcb904 100644
--- a/docs/globals_vars.html
+++ b/docs/globals_vars.html
@@ -4,7 +4,7 @@
-
+
@@ -32,6 +32,7 @@
+
@@ -54,7 +55,7 @@
Detailed Description
-
@@ -660,7 +658,7 @@
-
+
@@ -199,7 +200,7 @@
-
Functions
+PLUGIN_EXPORT bool sir_plugin_query (sir_plugininfo *info) PLUGIN_EXPORT bool sir_plugin_query (sir_plugininfo *info) Called by libsir after the plugin library object is loaded, but before any other functions are probed or called.
-
+PLUGIN_EXPORT bool sir_plugin_init (void) PLUGIN_EXPORT bool sir_plugin_init (void) Called by libsir after the plugin is queried and successfully validated.
-
-PLUGIN_EXPORT bool sir_plugin_write (sir_level level, const char *message)
+ Called by libsir when a message is dispatched on any level whose bit was set in the levels
bitmask of the sir_plugininfo structure when sir_plugin_query was called.
+PLUGIN_EXPORT bool sir_plugin_write (sir_level level, const char *message) Called by libsir when a message is dispatched on any level whose bit was set in the levels
bitmask of the sir_plugininfo structure when sir_plugin_query was called.
-
+PLUGIN_EXPORT bool sir_plugin_cleanup (void) PLUGIN_EXPORT bool sir_plugin_cleanup (void) Called by libsir when the plugin is about to be unloaded. Creating your own plugin
Creating your own plugin
PLUGIN_EXPORT bool sir_plugin_cleanup
(
- void
- )
+ void )
@@ -290,8 +290,7 @@ PLUGIN_EXPORT bool sir_plugin_init
(
- void
- )
+ void )
@@ -312,8 +311,7 @@ PLUGIN_EXPORT bool sir_plugin_query
(
- sir_plugininfo *
- info )
+ sir_plugininfo * info )
@@ -333,7 +331,7 @@ sir_option
@@ -353,24 +351,17 @@ info Pointer to a sir_plugininfo structure to be initialized by the plugin. PLUGIN_EXPORT bool sir_plugin_write
(
- sir_level
- level,
+ sir_level level,
-
- const char *
- message
-
-
- )
-
+ const char * message )
levels
bitmask of the sir_plugininfo structure when sir_plugin_query was called. levels
bitmask of the sir_plugininfo structure when sir_plugin_query was called. message
string will be pre-formatted according to the sir_option set in the opts
bitmask of the sir_plugininfo structure.
+Topics
-Modules
+ Functions
+ Types
+ C++ Wrapper Detailed Description
@@ -141,7 +142,7 @@
diff --git a/docs/group__public.map b/docs/group__public.map
index ebdfeaff4..64aee1563 100644
--- a/docs/group__public.map
+++ b/docs/group__public.map
@@ -1,6 +1,6 @@
diff --git a/docs/group__public.md5 b/docs/group__public.md5
index ed48908b4..7a1ce9965 100644
--- a/docs/group__public.md5
+++ b/docs/group__public.md5
@@ -1 +1 @@
-f1c3db5e4bd882209737e22a617d9779
\ No newline at end of file
+39105cf86342456b103521902c43f5ea
\ No newline at end of file
diff --git a/docs/group__public.svg b/docs/group__public.svg
index fc21fb067..f5a782426 100644
--- a/docs/group__public.svg
+++ b/docs/group__public.svg
@@ -1,7 +1,7 @@
-
diff --git a/docs/group__public_org.svg b/docs/group__public_org.svg
index d07be5f40..c15a4d330 100644
--- a/docs/group__public_org.svg
+++ b/docs/group__public_org.svg
@@ -1,7 +1,7 @@
-
diff --git a/docs/group__publicfuncs.html b/docs/group__publicfuncs.html
index ff96dc7ea..d8d2ed1c0 100644
--- a/docs/group__publicfuncs.html
+++ b/docs/group__publicfuncs.html
@@ -4,7 +4,7 @@
-
+
@@ -32,6 +32,7 @@
+
@@ -54,7 +55,7 @@
@@ -240,25 +241,17 @@
-
Functions
+bool sir_makeinit (sirinit *si) bool sir_makeinit (sirinit *si) Fills out a sirinit structure with default values.
-
+bool sir_init (sirinit *si) bool sir_init (sirinit *si) Initializes libsir for use.
-
+bool sir_cleanup (void) bool sir_cleanup (void) Tears down and cleans up libsir after use.
-
+bool sir_isinitialized (void) bool sir_isinitialized (void) Determines whether or not libsir is in the initialized state.
-
+uint16_t sir_geterror (char message[SIR_MAXERROR]) uint16_t sir_geterror (char message[SIR_MAXERROR]) Retrieves a formatted message for the last error that occurred on the calling thread and returns the associated error code.
-
+void sir_geterrorinfo (sir_errorinfo *err) void sir_geterrorinfo (sir_errorinfo *err) Retrieves granular information about the last error that occurred on the calling thread.
-
+bool sir_debug (PRINTF_FORMAT const char *format,...) bool sir_debug (PRINTF_FORMAT const char *format,...) Dispatches a SIRL_DEBUG level message.
-
+bool sir_info (PRINTF_FORMAT const char *format,...) bool sir_info (PRINTF_FORMAT const char *format,...) Dispatches a SIRL_INFO level message.
-
+bool sir_notice (PRINTF_FORMAT const char *format,...) bool sir_notice (PRINTF_FORMAT const char *format,...) Dispatches a SIRL_NOTICE level message.
-
+bool sir_warn (PRINTF_FORMAT const char *format,...) bool sir_warn (PRINTF_FORMAT const char *format,...) Dispatches a SIRL_WARN level message.
-
+bool sir_error (PRINTF_FORMAT const char *format,...) bool sir_error (PRINTF_FORMAT const char *format,...) Dispatches a SIRL_ERROR level message.
-
+bool sir_crit (PRINTF_FORMAT const char *format,...) bool sir_crit (PRINTF_FORMAT const char *format,...) Dispatches a SIRL_CRIT level message.
-
+bool sir_alert (PRINTF_FORMAT const char *format,...) bool sir_alert (PRINTF_FORMAT const char *format,...) Dispatches a SIRL_ALERT level message.
-
+bool sir_emerg (PRINTF_FORMAT const char *format,...) bool sir_emerg (PRINTF_FORMAT const char *format,...) Dispatches a SIRL_EMERG level message.
-
+sirfileid sir_addfile (const char *path, sir_levels levels, sir_options opts) sirfileid sir_addfile (const char *path, sir_levels levels, sir_options opts) Adds a log file and registers it to receive log output.
-
+bool sir_remfile (sirfileid id) bool sir_remfile (sirfileid id) Removes a file previously added to libsir.
-
+sirpluginid sir_loadplugin (const char *path) sirpluginid sir_loadplugin (const char *path) Loads a plugin module from disk.
-
+bool sir_unloadplugin (sirpluginid id) bool sir_unloadplugin (sirpluginid id) Unloads a previously registered plugin module.
-
+bool sir_filelevels (sirfileid id, sir_levels levels) bool sir_filelevels (sirfileid id, sir_levels levels) Set new level registrations for a log file already managed by libsir.
-
+bool sir_fileopts (sirfileid id, sir_options opts) bool sir_fileopts (sirfileid id, sir_options opts) Set new formatting options for a log file already managed by libsir.
-
+bool sir_settextstyle (sir_level level, sir_textattr attr, sir_textcolor fg, sir_textcolor bg) bool sir_settextstyle (sir_level level, sir_textattr attr, sir_textcolor fg, sir_textcolor bg) Set new text styling for stdio (stdout/stderr) destinations on a per-level basis.
-
+bool sir_resettextstyles (void) bool sir_resettextstyles (void) Reset text styling for stdio (stdout/stderr) destinations to their default values.
-
+sir_textcolor sir_makergb (sir_textcolor r, sir_textcolor g, sir_textcolor b) sir_textcolor sir_makergb (sir_textcolor r, sir_textcolor g, sir_textcolor b) Creates a sir_textcolor from red, green, and blue components.
-
+bool sir_setcolormode (sir_colormode mode) bool sir_setcolormode (sir_colormode mode) Sets the ANSI color mode for stdio destinations.
-
+bool sir_stdoutlevels (sir_levels levels) bool sir_stdoutlevels (sir_levels levels) Set new level registrations for stdout
.
-
+bool sir_stdoutopts (sir_options opts) bool sir_stdoutopts (sir_options opts) Set new formatting options for stdout
.
-
+bool sir_stderrlevels (sir_levels levels) bool sir_stderrlevels (sir_levels levels) Set new level registrations for stderr
.
-
+bool sir_stderropts (sir_options opts) bool sir_stderropts (sir_options opts) Set new formatting options for stderr
.
-
+bool sir_sysloglevels (sir_levels levels) bool sir_sysloglevels (sir_levels levels) Set new level registrations for the system logger destination.
-
+bool sir_syslogopts (sir_options opts) bool sir_syslogopts (sir_options opts) Set new formatting options for the system logger destination.
-
+bool sir_syslogid (const char *identity) bool sir_syslogid (const char *identity) Set new system logger identity.
-
+bool sir_syslogcat (const char *category) bool sir_syslogcat (const char *category) Set new system logger category.
-
+const char * sir_getversionstring (void) const char * sir_getversionstring (void) Returns the current libsir version as a string.
-
+uint32_t sir_getversionhex (void) uint32_t sir_getversionhex (void) Returns the current libsir version as a number.
-
+bool sir_isprerelease (void) bool sir_isprerelease (void) Whether or not this is a pre-release version of libsir. sirfileid sir_addfile
(
- const char *
- path,
+ const char * path,
- sir_levels
- levels,
+ sir_levels levels,
-
- sir_options
- opts
-
-
- )
-
+ sir_options opts )
sir_filelevels and sir_fileopts, respectively.
-
+To change the file's level registrations or options after adding it, call sir_filelevels and sir_fileopts, respectively.
+
+stdout
/stderr
, call sir_stdoutopts/sir_stdoutlevels and sir_stderropts/sir_stderrlevels, respectively. To change the text styling on a per-level basis, call sir_settextstyle.stdout
/stderr
, call sir_stdoutopts/sir_stdoutlevels and sir_stderropts/sir_stderrlevels, respectively. To change the text styling on a per-level basis, call sir_settextstyle.
+Defaults
+true
if cleanup was successful, false otherwise
. Call sir_geterror to obtain information about any error that may have occurred. true
if cleanup was successful, false otherwise
. Call sir_geterror to obtain information about any error that may have occurred. bool sir_crit
(
- PRINTF_FORMAT const char *
- format,
+ PRINTF_FORMAT const char * format,
-
-
- ...
-
-
- )
-
+ ... )
+stdout
/stderr
, call sir_stdoutopts/sir_stdoutlevels and sir_stderropts/sir_stderrlevels, respectively. To change the text styling on a per-level basis, call sir_settextstyle.stdout
/stderr
, call sir_stdoutopts/sir_stdoutlevels and sir_stderropts/sir_stderrlevels, respectively. To change the text styling on a per-level basis, call sir_settextstyle.
+Defaults
+stdout
/stderr
, call sir_stdoutopts/sir_stdoutlevels and sir_stderropts/sir_stderrlevels, respectively. To change the text styling on a per-level basis, call sir_settextstyle.stdout
/stderr
, call sir_stdoutopts/sir_stdoutlevels and sir_stderropts/sir_stderrlevels, respectively. To change the text styling on a per-level basis, call sir_settextstyle.
+Defaults
+stdout
/stderr
, call sir_stdoutopts/sir_stdoutlevels and sir_stderropts/sir_stderrlevels, respectively. To change the text styling on a per-level basis, call sir_settextstyle.stdout
/stderr
, call sir_stdoutopts/sir_stdoutlevels and sir_stderropts/sir_stderrlevels, respectively. To change the text styling on a per-level basis, call sir_settextstyle.
+Defaults
+stdout
/stderr
, call sir_stdoutopts/sir_stdoutlevels and sir_stderropts/sir_stderrlevels, respectively. To change the text styling on a per-level basis, call sir_settextstyle.stdout
/stderr
, call sir_stdoutopts/sir_stdoutlevels and sir_stderropts/sir_stderrlevels, respectively. To change the text styling on a per-level basis, call sir_settextstyle.
+Defaults
SIRO_ALL
+
@@ -660,15 +602,14 @@
void sir_geterrorinfo
(
- sir_errorinfo *
- err )
+ sir_errorinfo * err )
@@ -688,8 +629,7 @@
@@ -710,8 +650,7 @@ uint32_t sir_getversionhex
(
- void
- )
+ void )
const char * sir_getversionstring
(
- void
- )
+ void )
@@ -734,31 +673,24 @@ bool sir_info
(
- PRINTF_FORMAT const char *
- format,
+ PRINTF_FORMAT const char * format,
-
-
- ...
-
-
- )
-
+ ... )
+stdout
/stderr
, call sir_stdoutopts/sir_stdoutlevels and sir_stderropts/sir_stderrlevels, respectively. To change the text styling on a per-level basis, call sir_settextstyle.stdout
/stderr
, call sir_stdoutopts/sir_stdoutlevels and sir_stderropts/sir_stderrlevels, respectively. To change the text styling on a per-level basis, call sir_settextstyle.
+Defaults
+sir_cleanup
-
si Pointer to a sirinit structure containing the desired settings and configuration. libsir makes a copy of this structure, so its lifetime is not a concern.
+true
if initialization was successful, false
otherwise. Call sir_geterror to obtain information about any error that may have occurred. true
if initialization was successful, false
otherwise. Call sir_geterror to obtain information about any error that may have occurred. bool sir_isinitialized
(
- void
- )
+ void )
@@ -820,8 +750,8 @@
+true
if sir_init has been called and libsir is initialized; false
if sir_init has not yet been called, or a corresponding call to sir_cleanup has already been made.
+
@@ -834,8 +764,7 @@ true
if sir_init has been called and libsir is initialized; false
if sir_init has not yet been called, or a corresponding call to sir_cleanup has already been made. bool sir_isprerelease
(
- void
- )
+ void )
@@ -855,8 +784,7 @@ sirpluginid sir_loadplugin
(
- const char *
- path )
+ const char * path )
@@ -868,7 +796,7 @@ path
is a relative path, it shall be treated as relative to the current working directory. This is not necessarily the same directory that your application's binary file resides in.
+
@@ -890,8 +818,7 @@ bool sir_makeinit
(
- sirinit *
- si )
+ sirinit * si )
@@ -919,36 +846,28 @@ sir_textcolor sir_makergb
(
- sir_textcolor
- r,
+ sir_textcolor r,
- sir_textcolor
- g,
+ sir_textcolor g,
-
- sir_textcolor
- b
-
-
- )
-
+ sir_textcolor b )
-
+
+Defaults
@@ -970,31 +889,24 @@ r The red component (0..255) bool sir_notice
(
- PRINTF_FORMAT const char *
- format,
+ PRINTF_FORMAT const char * format,
-
-
- ...
-
-
- )
-
+ ... )
+stdout
/stderr
, call sir_stdoutopts/sir_stdoutlevels and sir_stderropts/sir_stderrlevels, respectively. To change the text styling on a per-level basis, call sir_settextstyle.stdout
/stderr
, call sir_stdoutopts/sir_stdoutlevels and sir_stderropts/sir_stderrlevels, respectively. To change the text styling on a per-level basis, call sir_settextstyle.
+Defaults
id
(the value returned from sir_addfile) to be removed from libsir, and its file descriptor closed.id
(the value returned from sir_addfile) to be removed from libsir, and its file descriptor closed.
+sir_fileopts
-
id The sirfileid obtained when the file was added to libsir.
+true
if the file is known to libsir and was successfully removed, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. true
if the file is known to libsir and was successfully removed, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. bool sir_resettextstyles
(
- void
- )
+ void )
-
+
+
-
+Defaultstrue
if successfully reset, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. true
if successfully reset, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. bool sir_setcolormode
(
- sir_colormode
- mode )
+ sir_colormode mode )
@@ -1091,18 +1000,18 @@
+Defaults
-
mode One of the SIRCM_*
constants, defining the mode to use.
+true
if the color mode was changed successfully, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred.
@@ -1115,42 +1024,33 @@ true
if the color mode was changed successfully, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. bool sir_settextstyle
(
- sir_level
- level,
+ sir_level level,
- sir_textattr
- attr,
+ sir_textattr attr,
- sir_textcolor
- fg,
+ sir_textcolor fg,
-
- sir_textcolor
- bg
-
-
- )
-
+ sir_textcolor bg )
+
+DefaultsSIRTC_DEFAULT
to get the default foreground or background color. To set colors in RGB color mode, use sir_makergb to create the foreground and background colors.SIRTC_DEFAULT
to get the default foreground or background color. To set colors in RGB color mode, use sir_makergb to create the foreground and background colors.sir_stderropts.
-
+stderr
, use sir_stderropts.
-
levels New bitmask of sir_level to register for. If you wish to use the default levels, pass SIRL_DEFAULT.
+true
if successfully updated, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. true
if successfully updated, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. bool sir_stderropts
(
- sir_options
- opts )
+ sir_options opts )
@@ -1224,15 +1122,15 @@ SIRO_NOPID
stderr
, use sir_stderrlevels.
+stderr
, use sir_stderrlevels.
-
opts New bitmask of sir_option for stderr
. If you wish to use the default values, pass SIRL_DEFAULT.
+true
if successfully updated, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred.
@@ -1245,8 +1143,7 @@ true
if successfully updated, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. bool sir_stdoutlevels
(
- sir_levels
- levels )
+ sir_levels levels )
@@ -1260,15 +1157,15 @@ sir_stdoutopts.
To modify formatting options for stdout
, use sir_stdoutopts.
levels | New bitmask of sir_level to register for. If you wish to use the default levels, pass SIRL_DEFAULT. |
true
if successfully updated, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. true
if successfully updated, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. To modify level registrations for stdout
, use sir_stdoutlevels.
To modify level registrations for stdout
, use sir_stdoutlevels.
opts | New bitmask of sir_option for stdout . If you wish to use the default values, pass SIRL_DEFAULT. |
true
if successfully updated, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. true
if successfully updated, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. true
if successfully updated, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. true
if successfully updated, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. true
if successfully updated, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. true
if successfully updated, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. To modify formatting options for the system logger, use sir_syslogopts.
+levels | New bitmask of sir_level to register for. If you wish to use the default levels, pass SIRL_DEFAULT. |
true
if successfully updated, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. true
if successfully updated, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. To modify level registrations for the system logger, use sir_sysloglevels.
-To modify level registrations for the system logger, use sir_sysloglevels.
+opts | New bitmask of sir_option for the system logger. If you wish to use the default values, pass SIRO_DEFAULT. |
true
if successfully updated, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. true
if successfully updated, false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. Unloads a previously registered plugin module.
-Cleans up, de-registers, and unloads a plugin represented by id
(the value returned from sir_loadplugin).
Cleans up, de-registers, and unloads a plugin represented by id
(the value returned from sir_loadplugin).
If the plugin is located in the cache, it is instructed to clean up and prepare to be unloaded. Upon completion of the plugin's clean up routine, it is unloaded.
-true
if the plugin was located and successfully unloaded,false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. true
if the plugin was located and successfully unloaded,false
otherwise. Use sir_geterror to obtain information about any error that may have occurred. Dispatches a SIRL_WARN level message.
The message will be delivered to all destinations registered to receive warning-level messages, each with their own formatting and styling options.
-stdout
/stderr
, call sir_stdoutopts/sir_stdoutlevels and sir_stderropts/sir_stderrlevels, respectively. To change the text styling on a per-level basis, call sir_settextstyle.stdout
/stderr
, call sir_stdoutopts/sir_stdoutlevels and sir_stderropts/sir_stderrlevels, respectively. To change the text styling on a per-level basis, call sir_settextstyle.Data Structures | |
struct | sir_errorinfo |
Information about an error that occurred. More... | |
struct | sir_errorinfo |
Information about an error that occurred. More... | |
struct | sir_textstyle |
Container for all the information associated with the appearance of text in the context of stdio. More... | |
struct | sir_textstyle |
Container for all the information associated with the appearance of text in the context of stdio. More... | |
struct | sir_stdio_dest |
Configuration for stdio destinations (stdout and stderr). More... | |
struct | sir_stdio_dest |
Configuration for stdio destinations (stdout and stderr). More... | |
struct | sir_syslog_dest |
Configuration for the system logger destination. More... | |
struct | sir_syslog_dest |
Configuration for the system logger destination. More... | |
struct | sirinit |
libsir initialization and configuration data. More... | |
struct | sirinit |
libsir initialization and configuration data. More... | |
struct | sir_syslog_dest._state |
Reserved for internal use; do not modify. More... | |
struct | sir_syslog_dest._state |
Reserved for internal use; do not modify. More... | |
@@ -197,7 +198,7 @@
| | Exclude time stamps (implies SIRO_NOMSEC). | | | | Sets all other options except SIRO_NOHDR. | | | | The sir_level type. | | | sir_level bitmask type. | | | The sir_option type. | | | sir_option bitmask type. | | |
Data Fields | ||
---|---|---|
-sir_textattr | +sir_textattrattr | Text attributes. |
-sir_textcolor | +sir_textcolorbg | Background color. |
-sir_textcolor | +sir_textcolorfg |
@@ -498,21 +499,21 @@ & |
Configuration for stdio destinations (stdout and stderr).
-Data Fields | ||
---|---|---|
-sir_levels | +sir_levelslevels | -sir_level bitmask defining output levels to register for. |
-sir_options | +sir_optionsopts | -sir_option bitmask defining the formatting of output. |
Data Fields | ||||
---|---|---|---|---|
-struct sir_syslog_dest._state | +struct sir_syslog_dest._state_state |
@@ -553,17 +554,17 @@
The identity string to pass to the system logger. | ||
-sir_levels | +sir_levelslevels | -sir_level bitmask defining levels to register for. | ||
-sir_options | +sir_optionsopts |
-sir_option bitmask defining the formatting of output.
Furthermore, the supported options vary based on the system logging facility in use.
|
Data Fields | ||||
---|---|---|---|---|
-sir_stdio_dest | +sir_stdio_destd_stderr | stderr configuration. | ||
-sir_stdio_dest | +sir_stdio_destd_stdout | stdout configuration. | ||
-sir_syslog_dest | +sir_syslog_destd_syslog |
@@ -614,7 +615,7 @@ ◆
Set SIRO_NONAME in a destination's options bitmask to suppress it. +The name to use in log messages (usually the process name).Set SIRO_NONAME in a destination's options bitmask to suppress it. |
enum sir_colormode | +enum sir_colormode |
enum sir_errorcode | +enum sir_errorcode |
enum sir_textattr | +enum sir_textattr |
libsir integrity tests -More...
Functions | |
bool | sirtest_threadrace (void) |
bool | sirtest_threadrace (void) |
Properly handle multiple threads competing for locked sections. | |
bool | sirtest_exceedmaxsize (void) |
bool | sirtest_exceedmaxsize (void) |
Properly handle messages that exceed internal buffer sizes. | |
bool | sirtest_logwritesanity (void) |
bool | sirtest_logwritesanity (void) |
Ensure the correct (and complete) message is written to a log file. | |
bool | sirtest_failnooutputdest (void) |
bool | sirtest_failnooutputdest (void) |
Properly handle the lack of any output destinations. | |
bool | sirtest_failnulls (void) |
bool | sirtest_failnulls (void) |
Properly handle null/empty input. | |
bool | sirtest_failemptymessage (void) |
bool | sirtest_failemptymessage (void) |
Ensure an empty message is properly handled. | |
bool | sirtest_filecachesanity (void) |
bool | sirtest_filecachesanity (void) |
Properly handle adding and removing log files. | |
bool | sirtest_failinvalidfilename (void) |
bool | sirtest_failinvalidfilename (void) |
Properly handle invalid log file name. | |
bool | sirtest_failfilebadpermission (void) |
bool | sirtest_failfilebadpermission (void) |
Properly handle log file without appropriate permissions. | |
bool | sirtest_faildupefile (void) |
bool | sirtest_faildupefile (void) |
Properly refuse to add a duplicate file. | |
bool | sirtest_failremovebadfile (void) |
bool | sirtest_failremovebadfile (void) |
Properly refuse to remove a file that isn't added. | |
bool | sirtest_rollandarchivefile (void) |
bool | sirtest_rollandarchivefile (void) |
Properly roll/archive a file when it hits max size. | |
bool | sirtest_failwithoutinit (void) |
bool | sirtest_failwithoutinit (void) |
Properly handle calls without initialization. | |
bool | sirtest_isinitialized (void) |
bool | sirtest_isinitialized (void) |
bool | sirtest_failinittwice (void) |
bool | sirtest_failinittwice (void) |
Properly handle two initialization calls without corresponding cleanup. | |
bool | sirtest_failinvalidinitdata (void) |
bool | sirtest_failinvalidinitdata (void) |
Properly handle initialization with junk memory. | |
bool | sirtest_initcleanupinit (void) |
bool | sirtest_initcleanupinit (void) |
Properly handle initialization, cleanup, re-initialization. | |
bool | sirtest_initmakeinit (void) |
bool | sirtest_initmakeinit (void) |
Properly initialize using sir_makeinit. | |
bool | sirtest_failaftercleanup (void) |
bool | sirtest_failaftercleanup (void) |
Properly handle calls after cleanup. | |
bool | sirtest_errorsanity (void) |
bool | sirtest_errorsanity (void) |
Properly return valid codes and messages for all possible errors. | |
bool | sirtest_textstylesanity (void) |
bool | sirtest_textstylesanity (void) |
Properly style stdio output for each level, and handle style overrides. | |
bool | sirtest_optionssanity (void) |
bool | sirtest_optionssanity (void) |
Properly reject invalid option bitmasks. | |
bool | sirtest_levelssanity (void) |
bool | sirtest_levelssanity (void) |
Properly reject invalid level bitmasks. | |
bool | sirtest_mutexsanity (void) |
bool | sirtest_mutexsanity (void) |
Ensure that the mutex implementation is functioning properly. | |
bool | sirtest_perf (void) |
bool | sirtest_perf (void) |
Performance evaluation. | |
bool | sirtest_updatesanity (void) |
bool | sirtest_updatesanity (void) |
Properly update levels/options at runtime. | |
bool | sirtest_threadidsanity (void) |
bool | sirtest_threadidsanity (void) |
Properly format thread ID/names in output. | |
bool | sirtest_syslog (void) |
bool | sirtest_syslog (void) |
Properly open, configure, and send messages to syslog(). | |
bool | sirtest_os_log (void) |
bool | sirtest_os_log (void) |
Properly open, configure, and send messages to os_log(). | |
bool | sirtest_win_eventlog (void) |
bool | sirtest_win_eventlog (void) |
Properly open, configure, and send messages to the Windows event log. | |
bool | sirtest_filesystem (void) |
bool | sirtest_filesystem (void) |
Ensure the proper functionality of portable filesystem implementation. | |
bool | sirtest_squelchspam (void) |
bool | sirtest_squelchspam (void) |
Ensure that spam messages are squelched, normal messages are not, and proper return values result from calls into libsir. | |
bool | sirtest_pluginloader (void) |
bool | sirtest_pluginloader (void) |
Ensure that well-formed, valid plugins are successfully loaded, and that ill-formed/incorrectly behaving plugins are rejected. | |
bool | sirtest_stringutils (void) |
bool | sirtest_stringutils (void) |
Ensure the string utility routines are functioning properly. | |
bool | sirtest_getcpucount (void) |
bool | sirtest_getcpucount (void) |
Ensure the processor counting routines are functioning properly. | |
bool | sirtest_getversioninfo (void) |
bool | sirtest_getversioninfo (void) |
Ensure that version retrieval exports are functioning properly. | |
bool | sirtest_threadpool (void) |
bool | sirtest_threadpool (void) |
Ensure the proper functioning of the thread pool and job queue mech- anisms. | |
diff --git a/docs/platform_8h_source.html b/docs/platform_8h_source.html index 9c90485ab..1afef8980 100644 --- a/docs/platform_8h_source.html +++ b/docs/platform_8h_source.html @@ -4,7 +4,7 @@
- + @@ -32,6 +32,7 @@ + @@ -54,7 +55,7 @@ - +
@@ -89,7 +90,7 @@
- +
@@ -89,7 +90,7 @@
- +
@@ -89,7 +90,7 @@
- +
@@ -89,7 +90,7 @@
- +
@@ -89,7 +90,7 @@
- +
@@ -89,7 +90,7 @@
- +
@@ -89,7 +90,7 @@
- + @@ -84,7 +85,7 @@
- + @@ -84,7 +85,7 @@
- +
@@ -89,7 +90,7 @@
- + @@ -84,7 +85,7 @@
Typedefs | |
+ | |
template<size_t N, typename ... Ts> | |
using | sir::NthTypeOf = typename std::tuple_element< N, std::tuple< Ts... > >::type |
Utility template for obtaining the type of Nth item in a parameter pack. | |
-using | sir::default_logger = logger< true, default_policy, default_adapter > |
A logger that implements the default adapter. | |
-using | sir::std_format_logger = logger< true, default_policy, default_adapter, std_format_adapter > |
A logger that implements the default adapter and the std::format adapter. | |
-using | sir::boost_logger = logger< true, default_policy, default_adapter, boost_format_adapter > |
A logger that implements the default adapter and the boost::format adapter. | |
-using | sir::fmt_logger = logger< true, default_policy, default_adapter, fmt_format_adapter > |
A logger that implements the default adapter and the fmt::format adapter. | |
-using | sir::iostream_logger = logger< true, default_policy, default_adapter, std_iostream_adapter > |
A logger that implements the default adapter and the std::iostream adapter. | |
using | sir::NthTypeOf = typename std::tuple_element<N, std::tuple<Ts...>>::type |
Utility template for obtaining the type of Nth item in a parameter pack. | |
+using | sir::default_logger = logger<true, default_policy, default_adapter> |
A logger that implements the default adapter. | |
+using | sir::std_format_logger |
A logger that implements the default adapter and the std::format adapter. | |
+using | sir::boost_logger |
A logger that implements the default adapter and the boost::format adapter. | |
+using | sir::fmt_logger |
A logger that implements the default adapter and the fmt::format adapter. | |
+using | sir::iostream_logger |
A logger that implements the default adapter and the std::iostream adapter. | |
- +
@@ -89,7 +90,7 @@
- + @@ -84,7 +85,7 @@
Functions | |
bool | _sir_condcreate (sir_condition *cond) |
bool | _sir_condcreate (sir_condition *cond) |
Creates/initializes a new condition variable. | |
bool | _sir_condbroadcast (sir_condition *cond) |
bool | _sir_condbroadcast (sir_condition *cond) |
Broadcast signals a condition variable. | |
bool | _sir_conddestroy (sir_condition *cond) |
bool | _sir_conddestroy (sir_condition *cond) |
Destroys a condition variable. | |
bool | _sir_condwait_timeout (sir_condition *cond, sir_mutex *mutex, const sir_wait *howlong) |
bool | _sir_condwait_timeout (sir_condition *cond, sir_mutex *mutex, const sir_wait *howlong) |
Waits a given amount of time for a condition variable to become signaled. | |
diff --git a/docs/structsir_1_1error.html b/docs/structsir_1_1error.html index 6c6b966f4..cb0466a02 100644 --- a/docs/structsir_1_1error.html +++ b/docs/structsir_1_1error.html @@ -4,7 +4,7 @@
- + @@ -32,6 +32,7 @@ + @@ -54,7 +55,7 @@ - + @@ -84,7 +85,7 @@
Contains basic information about an error. - More...
+ More...Contains all available information about an error. - More...
+ More...Shared command line configuration. - More...
+ More...sir_level <-> human-readable string form. - More...
+ More...sir_level <-> sir_textstyle mapping. - More...
+ More...Internally-used plugin module data. - More...
+ More...Internally-used plugin module data.
Plugin module cache. - More...
+ More...Plugin module cache.
Plugin interface for v1. - More...
+ More...The libsir-to-plugin query data structure. - More...
+ More...FIFO queue. - More...
+ More...A node in a sir_queue. - More...
+ More...A node in a sir_queue.
Maps a test function to a human-readable name and some metadata. - More...
+ More...Container for text style related data that is mutex protected. - More...
+ More...Container for text style related data that is mutex protected.
Per-thread error type. - More...
+ More...Per-thread error type.
Thread pool/job queue data container. - More...
+ More...Internally-used time value type. - More...
+ More...Internally-used time value type.
Encapsulates dynamic updating of current configuration. - More...
+ More...Formatted output container. - More...
+ More...Formatted output container.
Internally-used global config container. - More...
+ More...Internally-used global config container.
Log file cache. - More...
+ More...Log file cache.
Internally-used log file data. - More...
+ More...Internally-used log file data.
@@ -89,7 +90,7 @@
- +
@@ -89,7 +90,7 @@
- +
@@ -89,7 +90,7 @@
- +
@@ -89,7 +90,7 @@
- + @@ -84,7 +85,7 @@
In order to ensure that libsir is working properly on your system, the first thing you should do after compilation is verify that the test suite runs successfully (in fact, we recommend making it part of your deployment workflow).
+In order to ensure that libsir is working properly on your system, the first thing you should do after compilation is verify that the test suite runs successfully (in fact, we recommend making it part of your deployment workflow).
It will exit with 0
if all test(s) ran successfully and passed, or 1
if errors occurred/any test failed.
The simplest way to achieve this is simply to run build/bin/sirtests
from the root of the repository. You should see output similar to the following:
- +
@@ -89,7 +90,7 @@
- + @@ -84,7 +85,7 @@
▼Public Interface | Functions and types that comprise the public interface to libsir |
▼Public Interface | |
Functions | |
Types | |
C++ Wrapper | |
Plugins | |
Defaults | Default sir_option bitmasks, sir_level registrations, and sir_textstyle bitmasks |
Tests | Libsir integrity tests |
Defaults | |
Tests |
@@ -89,7 +90,7 @@
- +
@@ -89,7 +90,7 @@
- +
@@ -89,7 +90,7 @@