From 8e7fccc74d149a2cf010b5eb9fcda6d25220788c Mon Sep 17 00:00:00 2001 From: Lucas Trzesniewski Date: Tue, 23 Jul 2024 19:23:32 +0200 Subject: [PATCH] Update docs --- README.md | 24 +++++++++---------- .../Formatting/DefaultFormatter.cs | 6 ++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 75a4c4d..68875a3 100644 --- a/README.md +++ b/README.md @@ -130,18 +130,18 @@ The output format of the built-in appenders may be customized through the `Forma The prefix pattern is a string with the following placeholders: -| Placeholder | Effect | Format | -|------------------|---------------------------------------------------------------|------------------------------------------------------------| -| `%date` | The message date in UTC | A `DateTime` format string, default: `yyyy-MM-dd` | -| `%localDate` | The message date converted to the local time zone | A `DateTime` format string, default: `yyyy-MM-dd` | -| `%time` | The message timestamp in UTC | A `TimeSpan` format string, default: `hh\:mm\:ss\.fffffff` | -| `%localTime` | The message timestamp converted to the local time zone | A `TimeSpan` format string, default: `hh\:mm\:ss\.fffffff` | -| `%thread` | The thread name (or ID) which logged the message | | -| `%level` | The log level in uppercase | `pad` is equivalent to `5` (the longest level length) | -| `%logger` | The logger name | | -| `%loggerCompact` | The logger name, with the namespace shortened to its initials | | -| `%newline` | Equivalent to `Environment.NewLine` | | -| `%column` | Inserts padding spaces until a given column index | The column index to reach | +| Placeholder | Effect | Format | +|------------------|------------------------------------------------------------------|------------------------------------------------------------| +| `%date` | The message date in UTC (recommended, also contains time of day) | A `DateTime` format string, default: `yyyy-MM-dd` | +| `%localDate` | The message date converted to the local time zone | A `DateTime` format string, default: `yyyy-MM-dd` | +| `%time` | The message time of day (in UTC) | A `TimeSpan` format string, default: `hh\:mm\:ss\.fffffff` | +| `%localTime` | The message time of day (converted to the local time zone) | A `TimeSpan` format string, default: `hh\:mm\:ss\.fffffff` | +| `%thread` | The thread name (or ID) which logged the message | | +| `%level` | The log level in uppercase | `pad` is equivalent to `5` (the longest level length) | +| `%logger` | The logger name | | +| `%loggerCompact` | The logger name, with the namespace shortened to its initials | | +| `%newline` | Equivalent to `Environment.NewLine` | | +| `%column` | Inserts padding spaces until a given column index | The column index to reach | Prefixes can be written in the form `%{prefix}` or `%{prefix:format}` to define a format string. String placeholders accept an integer format string which defines their minimum length. For instance, `%{logger:20}` will always be at least 20 characters wide. diff --git a/src/ZeroLog.Impl.Full/Formatting/DefaultFormatter.cs b/src/ZeroLog.Impl.Full/Formatting/DefaultFormatter.cs index efaaae8..7b15fc0 100644 --- a/src/ZeroLog.Impl.Full/Formatting/DefaultFormatter.cs +++ b/src/ZeroLog.Impl.Full/Formatting/DefaultFormatter.cs @@ -28,10 +28,10 @@ public sealed class DefaultFormatter : Formatter /// /// The pattern is a string containing placeholders: /// - /// %dateThe message UTC date (default format: yyyy-MM-dd). + /// %dateThe message UTC date (recommended, default format: yyyy-MM-dd). /// %localDateThe message local date (default format: yyyy-MM-dd). - /// %timeThe message UTC timestamp (default format: hh\:mm\:ss\.fffffff). - /// %localTimeThe message local timestamp (default format: hh\:mm\:ss\.fffffff). + /// %timeThe message time of day in UTC (default format: hh\:mm\:ss\.fffffff). + /// %localTimeThe message time of day converted to the local time zone (default format: hh\:mm\:ss\.fffffff). /// %threadThe thread name (or ID) which logged the message. /// %levelThe log level in uppercase (specify the pad format to make each level 5 characters wide). /// %loggerThe logger name.