@verdaccio/logger 8.0.0-next-8.38 → 8.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +37 -0
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -15,6 +15,43 @@
15
15
  [![Docker Pulls](https://img.shields.io/docker/pulls/verdaccio/verdaccio?style=flat&logo=docker&label=Docker%20Pulls&color=lightgrey)](https://hub.docker.com/r/verdaccio/verdaccio)
16
16
  [![GitHub Stars](https://img.shields.io/github/stars/verdaccio?style=flat&logo=github&label=GitHub%20Stars%20%E2%AD%90&color=lightgrey)](https://github.com/verdaccio/verdaccio/stargazers)
17
17
 
18
+ > **Note:** This package is mostly for internal use by Verdaccio and is only intended to be used with Verdaccio 6.x.
19
+
20
+ ## Overview
21
+
22
+ The `@verdaccio/logger` package provides the main logger initialization for Verdaccio, built on top of [Pino](https://getpino.io/). It creates a singleton logger instance configured through Verdaccio's configuration.
23
+
24
+ ## Installation
25
+
26
+ ```bash
27
+ npm install @verdaccio/logger
28
+ ```
29
+
30
+ ## Usage
31
+
32
+ ```typescript
33
+ import { logger, setup } from '@verdaccio/logger';
34
+
35
+ // Initialize the logger with configuration
36
+ setup({ type: 'stdout', format: 'pretty', level: 'info' });
37
+
38
+ // Use the logger instance
39
+ logger.info({ pkg: 'my-package' }, 'package published');
40
+ logger.warn('something went wrong');
41
+ logger.error({ err }, 'fatal error');
42
+ ```
43
+
44
+ ### API
45
+
46
+ - **`setup(options)`** - Initializes the Pino logger with Verdaccio configuration options. Returns the singleton logger instance.
47
+ - **`logger`** - The initialized Logger instance, available after calling `setup()`.
48
+
49
+ ### Configuration Options
50
+
51
+ - **`type`** - Output destination (`'stdout'`, `'stderr'`, or a file path)
52
+ - **`format`** - Log format (`'pretty'` for human-readable, `'json'` for structured)
53
+ - **`level`** - Log level (`'trace'`, `'debug'`, `'info'`, `'warn'`, `'error'`, `'fatal'`)
54
+
18
55
  ## Donations
19
56
 
20
57
  Verdaccio is run by **volunteers**; nobody is working full-time on it. If you find this project to be useful and would like to support its development, consider making a donation - **your logo might end up in this readme.** 😉
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdaccio/logger",
3
- "version": "8.0.0-next-8.38",
3
+ "version": "8.0.1",
4
4
  "description": "Verdaccio Logger",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -33,11 +33,11 @@
33
33
  "node": ">=18"
34
34
  },
35
35
  "dependencies": {
36
- "@verdaccio/logger-commons": "8.0.0-next-8.38",
36
+ "@verdaccio/logger-commons": "8.0.1",
37
37
  "pino": "9.14.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@verdaccio/types": "13.0.0-next-8.12"
40
+ "@verdaccio/types": "13.0.0"
41
41
  },
42
42
  "funding": {
43
43
  "type": "opencollective",