[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 scoped pino packages as interim dependencies #1

Need to use full NPM packages to support library in use for flatpak and docker images without git. Can remove once PRs are merged.

FoxxMD (Mar 18, 2024, 9:49 AM EDT) 32c08912 0dda5208

+56 -56
+45 -45
package-lock.json
··· 1 1 { 2 2 "name": "@foxxmd/logging", 3 - "version": "0.1.5", 3 + "version": "0.1.6", 4 4 "lockfileVersion": 3, 5 5 "requires": true, 6 6 "packages": { 7 7 "": { 8 8 "name": "@foxxmd/logging", 9 - "version": "0.1.5", 9 + "version": "0.1.6", 10 10 "license": "MIT", 11 11 "dependencies": { 12 - "pino": "^8.19.0", 13 - "pino-pretty": "github:foxxmd/pino-pretty#additionalFunctionality", 14 - "pino-roll": "github:foxxmd/pino-roll#fileAsFunc" 12 + "@foxxmd/pino-pretty": "^10.3.2", 13 + "@foxxmd/pino-roll": "^1.0.1", 14 + "pino": "^8.19.0" 15 15 }, 16 16 "devDependencies": { 17 17 "@types/chai": "^4.3.0", ··· 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 + } 455 + }, 456 + "node_modules/@foxxmd/pino-roll": { 457 + "version": "1.0.1", 458 + "resolved": "https://registry.npmjs.org/@foxxmd/pino-roll/-/pino-roll-1.0.1.tgz", 459 + "integrity": "sha512-THgMw/gb9Jhd0o7SeYEYbEqUQ5V+JU0OUfiMJrhd/mP3XI6WZI5fESL1ivurTbmGZik2H4L/0azkeabrFpTqKw==", 460 + "dependencies": { 461 + "sonic-boom": "^3.2.0" 422 462 } 423 463 }, 424 464 "node_modules/@isaacs/cliui": { ··· 1789 1829 "dependencies": { 1790 1830 "readable-stream": "^4.0.0", 1791 1831 "split2": "^4.0.0" 1792 - } 1793 - }, 1794 - "node_modules/pino-pretty": { 1795 - "version": "10.3.1", 1796 - "resolved": "git+ssh://git@github.com/foxxmd/pino-pretty.git#1ee28b3b79c0131c323440494ff487db888e5c57", 1797 - "license": "MIT", 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 - } 1825 - }, 1826 - "node_modules/pino-roll": { 1827 - "version": "1.0.0-rc.1", 1828 - "resolved": "git+ssh://git@github.com/foxxmd/pino-roll.git#11a676826e83a807eac74a3328996d10bc1c720a", 1829 - "license": "MIT", 1830 - "dependencies": { 1831 - "sonic-boom": "^3.2.0" 1832 1832 } 1833 1833 }, 1834 1834 "node_modules/pino-std-serializers": {
+4 -4
package.json
··· 1 1 { 2 2 "name": "@foxxmd/logging", 3 3 "type": "module", 4 - "version": "0.1.5", 4 + "version": "0.1.6", 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 - "pino": "^8.19.0", 71 - "pino-pretty": "github:foxxmd/pino-pretty#additionalFunctionality", 72 - "pino-roll": "github:foxxmd/pino-roll#fileAsFunc" 70 + "@foxxmd/pino-pretty": "^10.3.2", 71 + "@foxxmd/pino-roll": "^1.0.1", 72 + "pino": "^8.19.0" 73 73 }, 74 74 "overrides": { 75 75 "with-local-tmp-dir": {
+2 -2
src/destinations.ts
··· 1 - import pinoRoll from 'pino-roll'; 1 + import pinoRoll from '@foxxmd/pino-roll'; 2 2 import { 3 3 LogLevelStreamEntry, 4 4 LogLevel, ··· 6 6 FileDestination, 7 7 } from "./types.js"; 8 8 import {DestinationStream, pino, destination} from "pino"; 9 - import {build} from "pino-pretty" 9 + import {build} from "@foxxmd/pino-pretty" 10 10 import {PRETTY_OPTS_CONSOLE, PRETTY_OPTS_FILE, prettyOptsConsoleFactory, prettyOptsFileFactory} from "./pretty.js"; 11 11 import {fileOrDirectoryIsWriteable} from "./util.js"; 12 12 import path from "path";
+1 -1
src/pretty.ts
··· 1 - import {PrettyOptions} from "pino-pretty"; 1 + import {PrettyOptions} from "@foxxmd/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 "pino-pretty"; 2 + import {PrettyOptions} from "@foxxmd/pino-pretty"; 3 3 import {MarkRequired} from "ts-essentials"; 4 4 5 5 export type LogLevel = typeof LOG_LEVEL_NAMES[number];
+3 -3
tests/index.test.ts
··· 108 108 stream: rawStream 109 109 } 110 110 ]; 111 - const {destinations = [], ...restExtras} = extras; 112 - const logger = await loggerAppRolling({...opts, console: 'silent'}, {destinations: [...destinations, ...streams], ...restExtras}); 111 + const {destinations = [], pretty, ...restExtras} = extras; 112 + const logger = await loggerAppRolling({...opts, console: 'silent'}, {destinations: [...destinations, ...streams], pretty, ...restExtras}); 113 113 return [logger, testStream, rawStream]; 114 114 } 115 115 ··· 135 135 }, 136 136 ]; 137 137 138 - const logger = loggerApp({...opts, console: 'silent'}, {destinations: [...destinations, ...streams], ...pretty, ...restExtras}); 138 + const logger = loggerApp({...opts, console: 'silent'}, {destinations: [...destinations, ...streams], pretty, ...restExtras}); 139 139 return [logger, testStream, rawStream]; 140 140 } 141 141