@abapify/logger 0.4.33 → 0.4.38

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 +15 -43
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,14 +1,11 @@
1
1
  # @abapify/logger
2
2
 
3
- [![version](https://img.shields.io/github/package-json/v/abapify/adt-cli?filename=packages/logger/package.json)](https://github.com/abapify/adt-cli/pkgs/npm/%40abapify%2Flogger)
3
+ [![npm](https://img.shields.io/npm/v/%40abapify%2Flogger)](https://www.npmjs.com/package/@abapify/logger)
4
+ [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/abapify/adt-cli/blob/main/LICENSE)
4
5
 
5
- Shared logger interface for `@abapify` packages.
6
+ Shared logger interface for abapify packages.
6
7
 
7
- ## Overview
8
-
9
- This package defines the `Logger` interface used across all abapify packages. It is compatible with [pino](https://getpino.io/), winston, bunyan, and any other logger that exposes a standard log-level API.
10
-
11
- ## Installation
8
+ ## Install
12
9
 
13
10
  ```bash
14
11
  npm install @abapify/logger
@@ -16,48 +13,23 @@ npm install @abapify/logger
16
13
 
17
14
  ## Usage
18
15
 
19
- ### Accept the interface in your package
20
-
21
- ```typescript
16
+ ```ts
22
17
  import type { Logger } from '@abapify/logger';
18
+ import { ConsoleLogger } from '@abapify/logger';
23
19
 
24
- export function createMyService(logger: Logger) {
25
- logger.info('Service started');
26
- logger.debug('Detail', { key: 'value' });
27
- }
28
- ```
29
-
30
- ### Use the no-op logger in tests
31
-
32
- ```typescript
33
- import { noopLogger } from '@abapify/logger';
34
-
35
- const service = createMyService(noopLogger);
20
+ const logger: Logger = new ConsoleLogger();
21
+ logger.info('Service started');
36
22
  ```
37
23
 
38
- ### Use pino in production
24
+ ## Features
39
25
 
40
- ```typescript
41
- import pino from 'pino';
42
- import type { Logger } from '@abapify/logger';
26
+ - Minimal `Logger` interface shared by abapify packages
27
+ - `ConsoleLogger` and `NoOpLogger` implementations
43
28
 
44
- const logger: Logger = pino();
45
- ```
29
+ ## Documentation
46
30
 
47
- ## Interface
48
-
49
- ```typescript
50
- interface Logger {
51
- trace(msg: string, obj?: any): void;
52
- debug(msg: string, obj?: any): void;
53
- info(msg: string, obj?: any): void;
54
- warn(msg: string, obj?: any): void;
55
- error(msg: string, obj?: any): void;
56
- fatal(msg: string, obj?: any): void;
57
- child(bindings: Record<string, any>): Logger;
58
- }
59
- ```
31
+ **[adt-cli.netlify.app/sdk/packages/logger](https://adt-cli.netlify.app/sdk/packages/logger)**
60
32
 
61
- ## License
33
+ ---
62
34
 
63
- MIT
35
+ Part of [**abapify**](https://github.com/abapify/adt-cli) — open, typed tooling for SAP ABAP Development Tools (ADT): CLI, MCP server, and SDK.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.4.33",
6
+ "version": "0.4.38",
7
7
  "description": "Shared logger interface for abapify packages",
8
8
  "type": "module",
9
9
  "types": "./dist/index.d.mts",