From ab43399200d93f497d820ddcf736087fb32bc53a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Lef=C3=A8vre?= Date: Mon, 28 Nov 2022 10:04:25 +0100 Subject: [PATCH] feat issue #1341 (Layouts) : fix typo & add related doc entry --- docs/layouts.md | 2 ++ lib/layouts.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/layouts.md b/docs/layouts.md index 590b591..7b14f27 100644 --- a/docs/layouts.md +++ b/docs/layouts.md @@ -134,6 +134,8 @@ Fields can be any of: - `%c` log category - `%h` hostname - `%m` log data +- `%m{l}`, where l is an integer, log data.slice(l) +- `%m{l,u}`, where l and u are integers, log data.slice(l,u) - `%d` date, formatted - default is `ISO8601`, format options are: `ISO8601`, `ISO8601_WITH_TZ_OFFSET`, `ABSOLUTETIME`, `DATETIME`, or any string compatible with the [date-format](https://www.npmjs.com/package/date-format) library. e.g. `%d{DATETIME}`, `%d{yyyy/MM/dd-hh.mm.ss}` - `%%` % - for when you want a literal `%` in your output - `%n` newline diff --git a/lib/layouts.js b/lib/layouts.js index 2d7c660..2660a7e 100644 --- a/lib/layouts.js +++ b/lib/layouts.js @@ -102,7 +102,7 @@ function dummyLayout(loggingEvent) { * - %h hostname * - %m log data * - %m{l}, where l is an integer : log data.slice(l) - * - %m{l,u}, where l ans u are integers : log data.slice(l,u) + * - %m{l,u}, where l and u are integers : log data.slice(l,u) * - %d date in constious formats * - %% % * - %n newline