{"_id":"@tsed/logger-pattern-layout","_rev":"7-f1374fc0b13fd697ef015ec156549a23","name":"@tsed/logger-pattern-layout","dist-tags":{"rc":"8.0.0-rc.1","latest":"8.0.5"},"versions":{"8.0.0-rc.1":{"name":"@tsed/logger-pattern-layout","version":"8.0.0-rc.1","keywords":["ts","log","debug","typescript","trace"],"author":{"name":"Romain Lenzotti"},"license":"MIT","_id":"@tsed/logger-pattern-layout@8.0.0-rc.1","maintainers":[{"name":"romakita","email":"rom.lenzotti@gmail.com"}],"homepage":"https://github.com/tsedio/logger/tree/production/packages/logger-pattern-layout","bugs":{"url":"https://github.com/tsedio/logger/issues"},"dist":{"shasum":"21ea2fbbc78bff79c10b9ffbdb6a10527567afc6","tarball":"https://registry.npmjs.org/@tsed/logger-pattern-layout/-/logger-pattern-layout-8.0.0-rc.1.tgz","fileCount":48,"integrity":"sha512-fhXBUMBv7RKMPenx3sHW15Cr4yFmEDX5/gAIrhbiIN9/6mjDvN/tdY6+w8qwvvy/57cuTyxofb9J1A3kZnZt1g==","signatures":[{"sig":"MEUCIQCljMCNNWUD2ikPZiFtXNZcN/n5LTVc6+nvayBuHeWhoQIgMusWdr0VDA2xCZI95Nkhn+nfEUoRNY782dZedmwQlJE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21377},"main":"./lib/esm/index.js","type":"module","module":"./lib/esm/index.js","source":"./src/index.ts","browser":"./lib/common/index.js","exports":{".":{"types":"./lib/types/node/index.d.ts","import":"./lib/esm/node/index.js","browser":"./lib/esm/common/index.js","default":"./lib/esm/node/index.js","tsed_source":"./src/node/index.ts"}},"gitHead":"c5f67a2722f0e074495b37df88d2f6909a5b364d","scripts":{"test":"vitest run","build":"yarn barrels && yarn run build:ts","barrels":"barrels","test:ci":"vitest run --coverage.thresholds.autoUpdate=true","build:ts":"tsc --build tsconfig.esm.json"},"typings":"./lib/types/index.d.ts","_npmUser":{"name":"romakita","email":"rom.lenzotti@gmail.com"},"repository":{"url":"git+https://github.com/tsedio/logger.git","type":"git"},"_npmVersion":"10.8.2","description":"Pattern layout appender module for @tsed/logger","directories":{},"_nodeVersion":"20.19.4","dependencies":{"tslib":"2.8.1"},"publishConfig":{"tag":"rc"},"_hasShrinkwrap":false,"devDependencies":{"vite":"7.0.6","vitest":"^3.2.4","typescript":"5.9.2","@tsed/logger":"8.0.0-rc.1","@tsed/vitest":"8.0.0-rc.1","@tsed/barrels":"6.6.0","@tsed/typescript":"8.0.0-rc.1"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/logger-pattern-layout_8.0.0-rc.1_1754313683045_0.11944787484794084","host":"s3://npm-registry-packages-npm-production"}},"8.0.0":{"name":"@tsed/logger-pattern-layout","version":"8.0.0","keywords":["ts","log","debug","typescript","trace"],"author":{"name":"Romain Lenzotti"},"license":"MIT","_id":"@tsed/logger-pattern-layout@8.0.0","maintainers":[{"name":"romakita","email":"rom.lenzotti@gmail.com"}],"homepage":"https://github.com/tsedio/logger/tree/production/packages/logger-pattern-layout","bugs":{"url":"https://github.com/tsedio/logger/issues"},"dist":{"shasum":"5eb33537708f3e271ab9471182f60eac0a4963d3","tarball":"https://registry.npmjs.org/@tsed/logger-pattern-layout/-/logger-pattern-layout-8.0.0.tgz","fileCount":48,"integrity":"sha512-6AzhUoyA94qTBm25mwkoQXAtBNVfwdNmw8c8zXZkMZfJ9VXPCvILaWLQrBysRkp6lxuxEx2YA38KIum91UsxmA==","signatures":[{"sig":"MEUCIQCdmislX3TKhCr4OyHZxQW4SFUm3e9cjUoNOvdyDGctkAIgJvLMJE+XrYTqIv4jMPWh/uPZZlYb90tlnc8Le9bp3Lk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21315},"main":"./lib/esm/index.js","type":"module","module":"./lib/esm/index.js","source":"./src/index.ts","browser":"./lib/common/index.js","exports":{".":{"types":"./lib/types/node/index.d.ts","import":"./lib/esm/node/index.js","browser":"./lib/esm/common/index.js","default":"./lib/esm/node/index.js","tsed_source":"./src/node/index.ts"}},"gitHead":"fd4892443d4ed4943cdec7af19500a92ef104425","scripts":{"test":"vitest run","build":"yarn barrels && yarn run build:ts","barrels":"barrels","test:ci":"vitest run --coverage.thresholds.autoUpdate=true","build:ts":"tsc --build tsconfig.esm.json"},"typings":"./lib/types/index.d.ts","_npmUser":{"name":"romakita","email":"rom.lenzotti@gmail.com"},"repository":{"url":"git+https://github.com/tsedio/logger.git","type":"git"},"_npmVersion":"10.8.2","description":"Pattern layout appender module for @tsed/logger","directories":{},"_nodeVersion":"20.19.4","dependencies":{"tslib":"2.8.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"7.0.6","vitest":"^3.2.4","typescript":"5.9.2","@tsed/logger":"8.0.0","@tsed/vitest":"8.0.0","@tsed/barrels":"6.6.0","@tsed/typescript":"8.0.0"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/logger-pattern-layout_8.0.0_1754753878640_0.3269631061463041","host":"s3://npm-registry-packages-npm-production"}},"8.0.1":{"name":"@tsed/logger-pattern-layout","version":"8.0.1","keywords":["ts","log","debug","typescript","trace"],"author":{"name":"Romain Lenzotti"},"license":"MIT","_id":"@tsed/logger-pattern-layout@8.0.1","maintainers":[{"name":"romakita","email":"rom.lenzotti@gmail.com"}],"homepage":"https://github.com/tsedio/logger/tree/production/packages/logger-pattern-layout","bugs":{"url":"https://github.com/tsedio/logger/issues"},"dist":{"shasum":"d6739158c420ed727ff988fe9101da99a8c712df","tarball":"https://registry.npmjs.org/@tsed/logger-pattern-layout/-/logger-pattern-layout-8.0.1.tgz","fileCount":48,"integrity":"sha512-vML38MY/aB+aZkTjm+o76oHxD8LRCg6eL2D8Ze3vw1l/hBwqTrgIBrjh2oFXVGhm/66KmyBsBC5eKk4HodyXGw==","signatures":[{"sig":"MEUCIBKbOHmA09Bf+TXWgKojGXAYhJyqbtzjFpzn3uysPgoaAiEA0DWXklL1Osf0TcEPwMFvDV28gIEXU74rC7OZlVHAfdM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21315},"main":"./lib/esm/index.js","type":"module","module":"./lib/esm/index.js","source":"./src/index.ts","browser":"./lib/common/index.js","exports":{".":{"types":"./lib/types/node/index.d.ts","import":"./lib/esm/node/index.js","browser":"./lib/esm/common/index.js","default":"./lib/esm/node/index.js","tsed_source":"./src/node/index.ts"}},"gitHead":"eae151d59a01df572b03d2e631ff2e28656486a4","scripts":{"test":"vitest run","build":"yarn barrels && yarn run build:ts","barrels":"barrels","test:ci":"vitest run --coverage.thresholds.autoUpdate=true","build:ts":"tsc --build tsconfig.esm.json"},"typings":"./lib/types/index.d.ts","_npmUser":{"name":"romakita","email":"rom.lenzotti@gmail.com"},"repository":{"url":"git+https://github.com/tsedio/logger.git","type":"git"},"_npmVersion":"10.8.2","description":"Pattern layout appender module for @tsed/logger","directories":{},"_nodeVersion":"20.19.4","dependencies":{"tslib":"2.8.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"7.0.6","vitest":"^3.2.4","typescript":"5.9.2","@tsed/logger":"8.0.1","@tsed/vitest":"8.0.1","@tsed/barrels":"6.6.0","@tsed/typescript":"8.0.1"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/logger-pattern-layout_8.0.1_1754822110398_0.21418404855825446","host":"s3://npm-registry-packages-npm-production"}},"8.0.2":{"name":"@tsed/logger-pattern-layout","version":"8.0.2","keywords":["ts","log","debug","typescript","trace"],"author":{"name":"Romain Lenzotti"},"license":"MIT","_id":"@tsed/logger-pattern-layout@8.0.2","maintainers":[{"name":"romakita","email":"rom.lenzotti@gmail.com"}],"homepage":"https://github.com/tsedio/logger/tree/production/packages/logger-pattern-layout","bugs":{"url":"https://github.com/tsedio/logger/issues"},"dist":{"shasum":"19e2102d17d102fcdf9a617eacdc11d0d146a64d","tarball":"https://registry.npmjs.org/@tsed/logger-pattern-layout/-/logger-pattern-layout-8.0.2.tgz","fileCount":48,"integrity":"sha512-/bdesxsObIQN6k2IwOWoqsrcq5flqavdPQldTYRCLLhfUYt1MvntMqicAIzzbhQlNxcqU8M8WAMWwXf6+i59sg==","signatures":[{"sig":"MEQCIGyqF+yVxXZY9+YTGVwfDZH8f6P3rzc6Cz+yNburln+5AiBZABZaMYwaKO5OCGFmOFvMU3XP5G5hyfkVTsUAoqEzfQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21315},"main":"./lib/esm/index.js","type":"module","module":"./lib/esm/index.js","source":"./src/index.ts","browser":"./lib/common/index.js","exports":{".":{"types":"./lib/types/node/index.d.ts","import":"./lib/esm/node/index.js","browser":"./lib/esm/common/index.js","default":"./lib/esm/node/index.js","tsed_source":"./src/node/index.ts"}},"gitHead":"2d63650a5ecc7d39ba4856ad332b05f6cd51a4a4","scripts":{"test":"vitest run","build":"yarn barrels && yarn run build:ts","barrels":"barrels","test:ci":"vitest run --coverage.thresholds.autoUpdate=true","build:ts":"tsc --build tsconfig.esm.json"},"typings":"./lib/types/index.d.ts","_npmUser":{"name":"romakita","email":"rom.lenzotti@gmail.com"},"repository":{"url":"git+https://github.com/tsedio/logger.git","type":"git"},"_npmVersion":"10.8.2","description":"Pattern layout appender module for @tsed/logger","directories":{},"_nodeVersion":"20.19.4","dependencies":{"tslib":"2.8.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"7.0.6","vitest":"^3.2.4","typescript":"5.9.2","@tsed/logger":"8.0.2","@tsed/vitest":"8.0.2","@tsed/barrels":"6.6.0","@tsed/typescript":"8.0.2"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/logger-pattern-layout_8.0.2_1755209383298_0.17284434795309367","host":"s3://npm-registry-packages-npm-production"}},"8.0.3":{"name":"@tsed/logger-pattern-layout","version":"8.0.3","keywords":["ts","log","debug","typescript","trace"],"author":{"name":"Romain Lenzotti"},"license":"MIT","_id":"@tsed/logger-pattern-layout@8.0.3","maintainers":[{"name":"romakita","email":"rom.lenzotti@gmail.com"}],"homepage":"https://github.com/tsedio/logger/tree/production/packages/logger-pattern-layout","bugs":{"url":"https://github.com/tsedio/logger/issues"},"dist":{"shasum":"1f41f23644357e06f4eeb73d3e27e79180e13936","tarball":"https://registry.npmjs.org/@tsed/logger-pattern-layout/-/logger-pattern-layout-8.0.3.tgz","fileCount":48,"integrity":"sha512-iKk07f3myIQl1Lp4dowS/XeUMe07VBrE5wm3TLG1iTgnuEjrMpr0pGFqyZEK3q887s4foJVZW9HdAdYXdJbkEg==","signatures":[{"sig":"MEUCICITyUYpPLOS7EwyAWz6T624Wv2Chaj+6Hz/sPZBAr8EAiEA5dfx/MnfiRAcb6xwLztqVOLGq9vN4O8LYSbzvLPVekA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21315},"main":"./lib/esm/index.js","type":"module","module":"./lib/esm/index.js","source":"./src/index.ts","browser":"./lib/common/index.js","exports":{".":{"types":"./lib/types/node/index.d.ts","import":"./lib/esm/node/index.js","browser":"./lib/esm/common/index.js","default":"./lib/esm/node/index.js","tsed_source":"./src/node/index.ts"}},"gitHead":"7fbe68c9043cec5b3a9babf1f819b5ab1749a9a8","scripts":{"test":"vitest run","build":"yarn barrels && yarn run build:ts","barrels":"barrels","test:ci":"vitest run --coverage.thresholds.autoUpdate=true","build:ts":"tsc --build tsconfig.esm.json"},"typings":"./lib/types/index.d.ts","_npmUser":{"name":"romakita","email":"rom.lenzotti@gmail.com"},"repository":{"url":"git+https://github.com/tsedio/logger.git","type":"git"},"_npmVersion":"10.8.2","description":"Pattern layout appender module for @tsed/logger","directories":{},"_nodeVersion":"20.19.4","dependencies":{"tslib":"2.8.1"},"_hasShrinkwrap":false,"devDependencies":{"vite":"7.0.6","vitest":"^3.2.4","typescript":"5.9.2","@tsed/logger":"8.0.3","@tsed/vitest":"8.0.3","@tsed/barrels":"6.6.0","@tsed/typescript":"8.0.3"},"peerDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/logger-pattern-layout_8.0.3_1755210649845_0.8397680560229028","host":"s3://npm-registry-packages-npm-production"}},"8.0.4":{"name":"@tsed/logger-pattern-layout","version":"8.0.4","keywords":["ts","log","debug","typescript","trace"],"author":{"name":"Romain Lenzotti"},"license":"MIT","_id":"@tsed/logger-pattern-layout@8.0.4","maintainers":[{"name":"romakita","email":"rom.lenzotti@gmail.com"}],"homepage":"https://github.com/tsedio/logger/tree/production/packages/logger-pattern-layout","bugs":{"url":"https://github.com/tsedio/logger/issues"},"dist":{"shasum":"dcdb02a7b916f70ee3f2a8b832a565c8ab664e84","tarball":"https://registry.npmjs.org/@tsed/logger-pattern-layout/-/logger-pattern-layout-8.0.4.tgz","fileCount":48,"integrity":"sha512-2MZebYosFyTJHYDKhrc7jn4uIeGrT4joLQfL4xyVp/2JRozCUZjFQA5gYMHHcjQSyGIlbQ2CruKLNFIzWURmLw==","signatures":[{"sig":"MEUCIQCRF1IwuCjFdKY8Z9eC0sQO18UraVNsrjnIGJgFNyQ7aQIgabgh2MBYYBhcCyixOxURFCwerJmIjvO8ryO0y9C0dZY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21463},"main":"./lib/esm/index.js","type":"module","module":"./lib/esm/index.js","source":"./src/index.ts","browser":"./lib/common/index.js","exports":{".":{"types":"./lib/types/node/index.d.ts","import":"./lib/esm/node/index.js","browser":"./lib/esm/common/index.js","default":"./lib/esm/node/index.js","tsed_source":"./src/node/index.ts"}},"gitHead":"72c1ed54f6f4a2d071d1f16034ecc2fdcc977e68","scripts":{"test":"vitest run","build":"yarn barrels && yarn run build:ts","barrels":"barrels","test:ci":"vitest run --coverage.thresholds.autoUpdate=true","build:ts":"tsc --build tsconfig.esm.json"},"typings":"./lib/types/index.d.ts","_npmUser":{"name":"romakita","email":"rom.lenzotti@gmail.com"},"repository":{"url":"git+https://github.com/tsedio/logger.git","type":"git"},"_npmVersion":"10.8.2","description":"Pattern layout appender module for @tsed/logger","directories":{},"_nodeVersion":"20.19.4","dependencies":{"tslib":"2.8.1","date-format":"^4.0.14"},"_hasShrinkwrap":false,"devDependencies":{"vite":"7.0.6","vitest":"^3.2.4","typescript":"5.9.2","@tsed/logger":"8.0.4","@tsed/vitest":"8.0.4","@tsed/barrels":"6.6.0","@tsed/typescript":"8.0.4"},"peerDependencies":{"@tsed/logger":">=8.0.0"},"peerDependenciesMeta":{"@tsed/logger":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/logger-pattern-layout_8.0.4_1755629626572_0.9529347168697031","host":"s3://npm-registry-packages-npm-production"}},"8.0.5":{"name":"@tsed/logger-pattern-layout","description":"Pattern layout appender module for @tsed/logger","type":"module","version":"8.0.5","author":{"name":"Romain Lenzotti"},"license":"MIT","source":"./src/index.ts","main":"./lib/esm/index.js","module":"./lib/esm/index.js","browser":"./lib/common/index.js","typings":"./lib/types/index.d.ts","exports":{".":{"tsed_source":"./src/node/index.ts","types":"./lib/types/node/index.d.ts","browser":"./lib/esm/common/index.js","import":"./lib/esm/node/index.js","default":"./lib/esm/node/index.js"}},"scripts":{"test":"vitest run","test:ci":"vitest run --coverage.thresholds.autoUpdate=true","build":"yarn barrels && yarn run build:ts","barrels":"barrels && eslint src/**/index.ts --fix","build:ts":"tsc --build tsconfig.esm.json"},"repository":{"type":"git","url":"git+https://github.com/tsedio/logger.git"},"keywords":["ts","log","debug","typescript","trace"],"bugs":{"url":"https://github.com/tsedio/logger/issues"},"homepage":"https://github.com/tsedio/logger/tree/production/packages/logger-pattern-layout","dependencies":{"date-format":"^4.0.14","tslib":"2.8.1"},"devDependencies":{"@tsed/barrels":"6.6.0","@tsed/logger":"8.0.5","@tsed/typescript":"8.0.5","@tsed/vitest":"8.0.5","typescript":"5.9.2","vite":"7.0.6","vitest":"^3.2.4"},"peerDependencies":{"@tsed/logger":">=8.0.0"},"peerDependenciesMeta":{"@tsed/logger":{"optional":false}},"_id":"@tsed/logger-pattern-layout@8.0.5","gitHead":"3ceb83d8d0c5e2cc49b8ca49074213659f3cdfd8","_nodeVersion":"20.20.1","_npmVersion":"10.8.2","dist":{"integrity":"sha512-n1TWoVwAAYdwY/z6ZnrS74pfhV9ov6FxmGXZyJRlUcjAzCi5/zCKJ6N+yHP6mli0KR69bxqdh7GYuLANizMX4A==","shasum":"e75a3509f530793a4e809823c77cdc0b4fbbe733","tarball":"https://registry.npmjs.org/@tsed/logger-pattern-layout/-/logger-pattern-layout-8.0.5.tgz","fileCount":48,"unpackedSize":21504,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCID9eRpoALvZau2FzoZH1cvWhg50llr9AnJmLMrNdeX5hAiEA5ljo6wWWmYLaofJ0m9aRG6mESCINVwsUDmEjGet+0PY="}]},"_npmUser":{"name":"romakita","email":"rom.lenzotti@gmail.com"},"directories":{},"maintainers":[{"name":"romakita","email":"rom.lenzotti@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/logger-pattern-layout_8.0.5_1773847437539_0.1978034422860957"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-04T13:21:22.896Z","modified":"2026-03-18T15:23:57.791Z","8.0.0-rc.1":"2025-08-04T13:21:23.213Z","8.0.0":"2025-08-09T15:37:58.817Z","8.0.1":"2025-08-10T10:35:10.600Z","8.0.2":"2025-08-14T22:09:43.488Z","8.0.3":"2025-08-14T22:30:50.029Z","8.0.4":"2025-08-19T18:53:46.780Z","8.0.5":"2026-03-18T15:23:57.661Z"},"bugs":{"url":"https://github.com/tsedio/logger/issues"},"author":{"name":"Romain Lenzotti"},"license":"MIT","homepage":"https://github.com/tsedio/logger/tree/production/packages/logger-pattern-layout","keywords":["ts","log","debug","typescript","trace"],"repository":{"type":"git","url":"git+https://github.com/tsedio/logger.git"},"description":"Pattern layout appender module for @tsed/logger","maintainers":[{"name":"romakita","email":"rom.lenzotti@gmail.com"}],"readme":"# @tsed/logger-pattern-layout\n\n[![Build Status](https://travis-ci.org/tsedio/logger.svg?branch=master)](https://travis-ci.org/tsedio/logger)\n[![Coverage Status](https://coveralls.io/repos/github/tsedio/logger/badge.svg?branch=master)](https://coveralls.io/github/tsedio/logger?branch=master)\n[![TypeScript](https://badges.frapsoft.com/typescript/love/typescript.svg?v=100)](https://github.com/ellerbrock/typescript-badges/)\n[![npm version](https://badge.fury.io/js/%40tsed%2Flogger-pattern-layout.svg)](https://badge.fury.io/js/%40tsed%2Flogger-pattern-layout)\n[![Dependencies](https://david-dm.org/tsedio/logger.svg)](https://david-dm.org/tsedio/logger#info=dependencies)\n[![img](https://david-dm.org/tsedio/logger/dev-status.svg)](https://david-dm.org/tsedio/logger/#info=devDependencies)\n[![img](https://david-dm.org/tsedio/logger/peer-status.svg)](https://david-dm.org/tsedio/logger/#info=peerDependenciess)\n[![Known Vulnerabilities](https://snyk.io/test/github/tsedio/logger/badge.svg)](https://snyk.io/test/github/tsedio/ts-express-decorators)\n\n<p style=\"text-align: center\" align=\"center\">\n <a href=\"https://tsed.dev\" target=\"_blank\"><img src=\"https://tsed.dev/tsed-og.png\" width=\"200\" alt=\"Ts.ED logo\"/></a>\n</p>\n\nPattern layout module for [@tsed/logger](https://tsedio.github.io/logger/).\n\n## Features\n\n- Configurable log message layout/patterns\n- Support for padding and truncation\n- Custom tokens and context values\n- Colored output blocks\n\n## Installation\n\n```bash\nnpm install @tsed/logger-pattern-layout\n```\n\n## Usage\n\n```typescript\nimport {Logger} from \"@tsed/logger\";\nimport {PatternLayout} from \"@tsed/logger-pattern-layout\";\n\nconst logger = new Logger(\"loggerName\");\n\nlogger.appenders.set(\"stdout\", {\n  type: \"stdout\",\n  layout: {\n    type: PatternLayout,\n    pattern: \"%d %p %c %m%n\"\n  },\n  level: [\"debug\", \"info\", \"trace\"]\n});\n\nlogger.info(\"Hello world\");\n```\n\nWill produce the following log output:\n\n```\n2023-08-04 11:46:00.123 INFO loggerName Hello world\n```\n\n## Pattern Format\n\nThe pattern string can contain any characters, but sequences beginning with `%` will be replaced with values taken from the log event and other environmental values.\n\nFormat for specifiers is `%[padding].[truncation][field]{[format]}` - padding and truncation are optional, and format only applies to a few tokens (notably, date).\n\nExample: `%5.10p` - left pad the log level by 5 characters, up to a max of 10.\n\n### Available Fields\n\n- `%r` - time in toLocaleTimeString format\n- `%p` - log level\n- `%c` - log category\n- `%h` - hostname\n- `%m` - log data\n- `%j` - log data as JSON\n- `%d` - date, formatted - default is `ISO8601`, format options are: `ISO8601`, `ISO8601_WITH_TZ_OFFSET`, `ABSOLUTE`, `DATE`, or any string compatible with the date-format library. e.g. `%d{DATE}`, `%d{yyyy/MM/dd-hh.mm.ss}`\n- `%%` - for when you want a literal `%` in your output\n- `%n` - newline\n- `%z` - process id (from process.pid)\n- `%x{[tokenname]}` - add dynamic tokens to your log. Tokens are specified in the tokens parameter\n- `%X{[tokenname]}` - add values from the Logger context. Tokens are keys into the context values\n- `%[` - start a colored block (color will be taken from the log level)\n- `%]` - end a colored block\n\n## Custom Tokens\n\nUser-defined tokens can be either a string or a function. Functions will be passed the log event, and should return a string.\n\n```typescript\nimport {Logger} from \"@tsed/logger\";\nimport {PatternLayout} from \"@tsed/logger-pattern-layout\";\n\nconst logger = new Logger(\"loggerName\");\n\nlogger.appenders.set(\"stdout\", {\n  type: \"stdout\",\n  layout: {\n    type: PatternLayout,\n    pattern: \"%d %p %c %x{user} %m%n\",\n    tokens: {\n      user: (logEvent) => AuthLibrary.currentUser()\n    }\n  },\n  level: [\"debug\", \"info\", \"trace\"]\n});\n\nlogger.info(\"User action\");\n```\n\n## Logger Context\n\nYou can also use the Logger context to store tokens and use them in your layouts.\n\n```typescript\nimport {Logger} from \"@tsed/logger\";\nimport {PatternLayout} from \"@tsed/logger-pattern-layout\";\n\nconst logger = new Logger(\"loggerName\");\n\nlogger.appenders.set(\"stdout\", {\n  type: \"stdout\",\n  layout: {\n    type: PatternLayout,\n    pattern: \"%d %p %c %X{user} %m%n\"\n  },\n  level: [\"debug\", \"info\", \"trace\"]\n});\n\nlogger.context.add(\"user\", \"charlie\");\nlogger.info(\"User logged in\");\n```\n\nThis would output:\n\n```\n2023-08-04 11:46:00.123 INFO loggerName charlie User logged in\n```\n\n> Note that you can also add functions to the Logger Context, and they will be passed the logEvent as well.\n\n## License\n\nThe MIT License (MIT)\n\nCopyright (c) 2016 - 2023 Romain Lenzotti\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","readmeFilename":"readme.md"}