[READ-ONLY] Mirror of https://github.com/FoxxMD/logging. A typed, opinionated, batteries-included, Pino-based logging solution for backend TS/JS projects foxxmd.github.io/logging
child-logger logging logging-library nodejs pinojs typescript-library
0

Configure Feed

Select the types of activity you want to include in your feed.

refactor: Use official pino-pretty #1

Use pino-pretty@11.0.0 which includes merged PR for additional functionality from pinojs/pino-pretty#495 and replaces scoped package

FoxxMD (Mar 20, 2024, 10:13 AM EDT) f12f08a4 0c615da3

+45 -45
+38 -38
package-lock.json
··· 1 1 { 2 2 "name": "@foxxmd/logging", 3 - "version": "0.1.8", 3 + "version": "0.1.9", 4 4 "lockfileVersion": 3, 5 5 "requires": true, 6 6 "packages": { 7 7 "": { 8 8 "name": "@foxxmd/logging", 9 - "version": "0.1.8", 9 + "version": "0.1.9", 10 10 "license": "MIT", 11 11 "dependencies": { 12 - "@foxxmd/pino-pretty": "^10.3.2", 13 12 "pino": "^8.19.0", 13 + "pino-pretty": "^11.0.0", 14 14 "pino-roll": "^1.0.1" 15 15 }, 16 16 "devDependencies": { ··· 419 419 ], 420 420 "engines": { 421 421 "node": ">=12" 422 - } 423 - }, 424 - "node_modules/@foxxmd/pino-pretty": { 425 - "version": "10.3.2", 426 - "resolved": "https://registry.npmjs.org/@foxxmd/pino-pretty/-/pino-pretty-10.3.2.tgz", 427 - "integrity": "sha512-rdrYCWd9gP+7X5eU1kXjN8N5It7ml62frw8EYBvrlHyFNoDtvARLit8NWBFlQKk/YaQ9QRow9O0buWRgqubIYw==", 428 - "dependencies": { 429 - "colorette": "^2.0.7", 430 - "dateformat": "^4.6.3", 431 - "fast-copy": "^3.0.0", 432 - "fast-safe-stringify": "^2.1.1", 433 - "help-me": "^5.0.0", 434 - "joycon": "^3.1.1", 435 - "minimist": "^1.2.6", 436 - "on-exit-leak-free": "^2.1.0", 437 - "pino-abstract-transport": "^1.0.0", 438 - "pump": "^3.0.0", 439 - "readable-stream": "^4.0.0", 440 - "secure-json-parse": "^2.4.0", 441 - "sonic-boom": "^3.0.0", 442 - "strip-json-comments": "^3.1.1" 443 - }, 444 - "bin": { 445 - "pino-pretty": "bin.js" 446 - } 447 - }, 448 - "node_modules/@foxxmd/pino-pretty/node_modules/dateformat": { 449 - "version": "4.6.3", 450 - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", 451 - "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", 452 - "engines": { 453 - "node": "*" 454 422 } 455 423 }, 456 424 "node_modules/@isaacs/cliui": { ··· 1133 1101 } 1134 1102 }, 1135 1103 "node_modules/fast-copy": { 1136 - "version": "3.0.1", 1137 - "resolved": "https://registry.npmjs.org/fast-copy/-/fast-copy-3.0.1.tgz", 1138 - "integrity": "sha512-Knr7NOtK3HWRYGtHoJrjkaWepqT8thIVGAwt0p0aUs1zqkAzXZV4vo9fFNwyb5fcqK1GKYFYxldQdIDVKhUAfA==" 1104 + "version": "3.0.2", 1105 + "resolved": "https://registry.npmjs.org/fast-copy/-/fast-copy-3.0.2.tgz", 1106 + "integrity": "sha512-dl0O9Vhju8IrcLndv2eU4ldt1ftXMqqfgN4H1cpmGV7P6jeB9FwpN9a2c8DPGE1Ys88rNUJVYDHq73CGAGOPfQ==" 1139 1107 }, 1140 1108 "node_modules/fast-redact": { 1141 1109 "version": "3.4.0", ··· 1821 1789 "dependencies": { 1822 1790 "readable-stream": "^4.0.0", 1823 1791 "split2": "^4.0.0" 1792 + } 1793 + }, 1794 + "node_modules/pino-pretty": { 1795 + "version": "11.0.0", 1796 + "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-11.0.0.tgz", 1797 + "integrity": "sha512-YFJZqw59mHIY72wBnBs7XhLGG6qpJMa4pEQTRgEPEbjIYbng2LXEZZF1DoyDg9CfejEy8uZCyzpcBXXG0oOCwQ==", 1798 + "dependencies": { 1799 + "colorette": "^2.0.7", 1800 + "dateformat": "^4.6.3", 1801 + "fast-copy": "^3.0.0", 1802 + "fast-safe-stringify": "^2.1.1", 1803 + "help-me": "^5.0.0", 1804 + "joycon": "^3.1.1", 1805 + "minimist": "^1.2.6", 1806 + "on-exit-leak-free": "^2.1.0", 1807 + "pino-abstract-transport": "^1.0.0", 1808 + "pump": "^3.0.0", 1809 + "readable-stream": "^4.0.0", 1810 + "secure-json-parse": "^2.4.0", 1811 + "sonic-boom": "^3.0.0", 1812 + "strip-json-comments": "^3.1.1" 1813 + }, 1814 + "bin": { 1815 + "pino-pretty": "bin.js" 1816 + } 1817 + }, 1818 + "node_modules/pino-pretty/node_modules/dateformat": { 1819 + "version": "4.6.3", 1820 + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-4.6.3.tgz", 1821 + "integrity": "sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==", 1822 + "engines": { 1823 + "node": "*" 1824 1824 } 1825 1825 }, 1826 1826 "node_modules/pino-roll": {
+2 -2
package.json
··· 1 1 { 2 2 "name": "@foxxmd/logging", 3 3 "type": "module", 4 - "version": "0.1.8", 4 + "version": "0.1.9", 5 5 "repository": "https://github.com/foxxmd/logging", 6 6 "description": "A typed, opinionated, batteries-included, Pino-based logging solution for backend TS/JS projects", 7 7 "scripts": { ··· 67 67 "with-local-tmp-dir": "^5.1.1" 68 68 }, 69 69 "dependencies": { 70 - "@foxxmd/pino-pretty": "^10.3.2", 71 70 "pino": "^8.19.0", 71 + "pino-pretty": "^11.0.0", 72 72 "pino-roll": "^1.0.1" 73 73 }, 74 74 "overrides": {
+3 -3
src/destinations.ts
··· 5 5 StreamDestination, 6 6 FileDestination, 7 7 } from "./types.js"; 8 - import {DestinationStream, pino, destination} from "pino"; 9 - import {build} from "@foxxmd/pino-pretty" 10 - import {PRETTY_OPTS_CONSOLE, PRETTY_OPTS_FILE, prettyOptsConsoleFactory, prettyOptsFileFactory} from "./pretty.js"; 8 + import {destination} from "pino"; 9 + import {build} from "pino-pretty" 10 + import {PRETTY_OPTS_FILE, prettyOptsConsoleFactory, prettyOptsFileFactory} from "./pretty.js"; 11 11 import {fileOrDirectoryIsWriteable} from "./util.js"; 12 12 import path from "path"; 13 13
+1 -1
src/pretty.ts
··· 1 - import {PrettyOptions} from "@foxxmd/pino-pretty"; 1 + import {PrettyOptions} from "pino-pretty"; 2 2 import {CWD, getLongestStr} from "./util.js"; 3 3 import { 4 4 LOG_LEVEL_NAMES,
+1 -1
src/types.ts
··· 1 1 import {DestinationStream, Logger as PinoLogger, LoggerOptions, StreamEntry, Level} from 'pino'; 2 - import {PrettyOptions} from "@foxxmd/pino-pretty"; 2 + import {PrettyOptions} from "pino-pretty"; 3 3 import {MarkRequired} from "ts-essentials"; 4 4 5 5 export type LogLevel = typeof LOG_LEVEL_NAMES[number];