You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25-4Lines changed: 25 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ Loggers can be broken down into 4 types:
23
23
-*Demux*: There is only one possible Demux Logger. and it is central to log routing. It acts as a hub that recieves 1 log message, and then sends copies of it to all its child loggers. Like iin the diagram above, it can be composed with Filters to control what goes where.
24
24
25
25
This is a basically full taxonomy of all compositional loggers.
26
-
Other than `Sinks`, this package implements the full set. So you shouldn't need to build your own routing components, just configure the ones included in this package.
26
+
This package implements the full set. So you shouldn't need to build your own routing components, just configure the ones included in this package.
27
27
28
28
It is worth understanding the idea of logging purity.
29
29
The loggers defined in this package are all pure.
@@ -81,9 +81,10 @@ logger = global_logger()
81
81
82
82
83
83
# Loggers introduced by this package:
84
-
This package introduces 7 new loggers.
85
-
The `TeeLogger`, the `TransformerLogger`, 3 types of filtered logger, and the `FileLogger`.
86
-
All of them just wrap existing loggers.
84
+
This package introduces 8 new loggers.
85
+
The `TeeLogger`, the `TransformerLogger`, 3 types of filtered logger, the `FileLogger`,
86
+
the `DatetimeRotatingFileLogger` and the `FormatLogger`.
87
+
All of them, except `FormatLogger`, just wrap existing loggers.
87
88
- The `TeeLogger` sends the logs to multiple different loggers.
88
89
- The `TransformerLogger` applies a function to modify log messages before passing them on.
89
90
- The 3 filter loggers are used to control if a message is written or not
@@ -92,6 +93,7 @@ All of them just wrap existing loggers.
92
93
- The `ActiveFilteredLogger` lets you filter based on the full content
93
94
- The `FileLogger` is a simple logger sink that writes to file.
94
95
- The `DatetimeRotatingFileLogger` is a logger sink that writes to file, rotating logs based upon a user-provided `DateFormat`.
96
+
- The `FormatLogger` is a logger sink that simply formats the message and writes to the logger stream.
95
97
96
98
By combining `TeeLogger` with filter loggers you can arbitrarily route log messages, wherever you want.
0 commit comments