@mastra/loggers 1.0.0-beta.2 → 1.0.0-beta.4
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.
- package/CHANGELOG.md +46 -0
- package/dist/docs/README.md +33 -0
- package/dist/docs/SKILL.md +34 -0
- package/dist/docs/SOURCE_MAP.json +6 -0
- package/dist/docs/core/01-reference.md +42 -0
- package/dist/docs/logging/01-reference.md +116 -0
- package/dist/docs/observability/01-overview.md +64 -0
- package/dist/docs/observability/02-logging.md +104 -0
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/pino.d.ts +1 -0
- package/dist/pino.d.ts.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# @mastra/loggers
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Add embedded documentation support for Mastra packages ([#11472](https://github.com/mastra-ai/mastra/pull/11472))
|
|
8
|
+
|
|
9
|
+
Mastra packages now include embedded documentation in the published npm package under `dist/docs/`. This enables coding agents and AI assistants to understand and use the framework by reading documentation directly from `node_modules`.
|
|
10
|
+
|
|
11
|
+
Each package includes:
|
|
12
|
+
- **SKILL.md** - Entry point explaining the package's purpose and capabilities
|
|
13
|
+
- **SOURCE_MAP.json** - Machine-readable index mapping exports to types and implementation files
|
|
14
|
+
- **Topic folders** - Conceptual documentation organized by feature area
|
|
15
|
+
|
|
16
|
+
Documentation is driven by the `packages` frontmatter field in MDX files, which maps docs to their corresponding packages. CI validation ensures all docs include this field.
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`d2d3e22`](https://github.com/mastra-ai/mastra/commit/d2d3e22a419ee243f8812a84e3453dd44365ecb0), [`bc72b52`](https://github.com/mastra-ai/mastra/commit/bc72b529ee4478fe89ecd85a8be47ce0127b82a0), [`05b8bee`](https://github.com/mastra-ai/mastra/commit/05b8bee9e50e6c2a4a2bf210eca25ee212ca24fa), [`c042bd0`](https://github.com/mastra-ai/mastra/commit/c042bd0b743e0e86199d0cb83344ca7690e34a9c), [`940a2b2`](https://github.com/mastra-ai/mastra/commit/940a2b27480626ed7e74f55806dcd2181c1dd0c2), [`e0941c3`](https://github.com/mastra-ai/mastra/commit/e0941c3d7fc75695d5d258e7008fd5d6e650800c), [`0c0580a`](https://github.com/mastra-ai/mastra/commit/0c0580a42f697cd2a7d5973f25bfe7da9055038a), [`28f5f89`](https://github.com/mastra-ai/mastra/commit/28f5f89705f2409921e3c45178796c0e0d0bbb64), [`e601b27`](https://github.com/mastra-ai/mastra/commit/e601b272c70f3a5ecca610373aa6223012704892), [`3d3366f`](https://github.com/mastra-ai/mastra/commit/3d3366f31683e7137d126a3a57174a222c5801fb), [`5a4953f`](https://github.com/mastra-ai/mastra/commit/5a4953f7d25bb15ca31ed16038092a39cb3f98b3), [`eb9e522`](https://github.com/mastra-ai/mastra/commit/eb9e522ce3070a405e5b949b7bf5609ca51d7fe2), [`20e6f19`](https://github.com/mastra-ai/mastra/commit/20e6f1971d51d3ff6dd7accad8aaaae826d540ed), [`4f0b3c6`](https://github.com/mastra-ai/mastra/commit/4f0b3c66f196c06448487f680ccbb614d281e2f7), [`74c4f22`](https://github.com/mastra-ai/mastra/commit/74c4f22ed4c71e72598eacc346ba95cdbc00294f), [`81b6a8f`](https://github.com/mastra-ai/mastra/commit/81b6a8ff79f49a7549d15d66624ac1a0b8f5f971), [`e4d366a`](https://github.com/mastra-ai/mastra/commit/e4d366aeb500371dd4210d6aa8361a4c21d87034), [`a4f010b`](https://github.com/mastra-ai/mastra/commit/a4f010b22e4355a5fdee70a1fe0f6e4a692cc29e), [`73b0bb3`](https://github.com/mastra-ai/mastra/commit/73b0bb394dba7c9482eb467a97ab283dbc0ef4db), [`5627a8c`](https://github.com/mastra-ai/mastra/commit/5627a8c6dc11fe3711b3fa7a6ffd6eb34100a306), [`3ff45d1`](https://github.com/mastra-ai/mastra/commit/3ff45d10e0c80c5335a957ab563da72feb623520), [`251df45`](https://github.com/mastra-ai/mastra/commit/251df4531407dfa46d805feb40ff3fb49769f455), [`f894d14`](https://github.com/mastra-ai/mastra/commit/f894d148946629af7b1f452d65a9cf864cec3765), [`c2b9547`](https://github.com/mastra-ai/mastra/commit/c2b9547bf435f56339f23625a743b2147ab1c7a6), [`580b592`](https://github.com/mastra-ai/mastra/commit/580b5927afc82fe460dfdf9a38a902511b6b7e7f), [`58e3931`](https://github.com/mastra-ai/mastra/commit/58e3931af9baa5921688566210f00fb0c10479fa), [`08bb631`](https://github.com/mastra-ai/mastra/commit/08bb631ae2b14684b2678e3549d0b399a6f0561e), [`4fba91b`](https://github.com/mastra-ai/mastra/commit/4fba91bec7c95911dc28e369437596b152b04cd0), [`12b0cc4`](https://github.com/mastra-ai/mastra/commit/12b0cc4077d886b1a552637dedb70a7ade93528c)]:
|
|
19
|
+
- @mastra/core@1.0.0-beta.20
|
|
20
|
+
|
|
21
|
+
## 1.0.0-beta.3
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- Add redact option to PinoLogger for PII protection ([#10919](https://github.com/mastra-ai/mastra/pull/10919))
|
|
26
|
+
|
|
27
|
+
Exposes Pino's native `redact` option in `PinoLogger`, allowing sensitive data to be automatically redacted from logs.
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
import { PinoLogger } from '@mastra/loggers';
|
|
31
|
+
|
|
32
|
+
const logger = new PinoLogger({
|
|
33
|
+
name: 'MyApp',
|
|
34
|
+
redact: {
|
|
35
|
+
paths: ['*.password', '*.token', '*.apiKey', '*.email'],
|
|
36
|
+
censor: '[REDACTED]',
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
logger.info('User login', { username: 'john', password: 'secret123' });
|
|
41
|
+
// Output: { username: "john", password: "[REDACTED]", msg: "User login" }
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- Updated dependencies [[`0d41fe2`](https://github.com/mastra-ai/mastra/commit/0d41fe245355dfc66d61a0d9c85d9400aac351ff), [`6b3ba91`](https://github.com/mastra-ai/mastra/commit/6b3ba91494cc10394df96782f349a4f7b1e152cc), [`7907fd1`](https://github.com/mastra-ai/mastra/commit/7907fd1c5059813b7b870b81ca71041dc807331b)]:
|
|
47
|
+
- @mastra/core@1.0.0-beta.8
|
|
48
|
+
|
|
3
49
|
## 1.0.0-beta.2
|
|
4
50
|
|
|
5
51
|
### Minor Changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# @mastra/loggers Documentation
|
|
2
|
+
|
|
3
|
+
> Embedded documentation for coding agents
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Read the skill overview
|
|
9
|
+
cat docs/SKILL.md
|
|
10
|
+
|
|
11
|
+
# Get the source map
|
|
12
|
+
cat docs/SOURCE_MAP.json
|
|
13
|
+
|
|
14
|
+
# Read topic documentation
|
|
15
|
+
cat docs/<topic>/01-overview.md
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Structure
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
docs/
|
|
22
|
+
├── SKILL.md # Entry point
|
|
23
|
+
├── README.md # This file
|
|
24
|
+
├── SOURCE_MAP.json # Export index
|
|
25
|
+
├── core/ (1 files)
|
|
26
|
+
├── logging/ (1 files)
|
|
27
|
+
├── observability/ (2 files)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Version
|
|
31
|
+
|
|
32
|
+
Package: @mastra/loggers
|
|
33
|
+
Version: 1.0.0-beta.4
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mastra-loggers-docs
|
|
3
|
+
description: Documentation for @mastra/loggers. Includes links to type definitions and readable implementation code in dist/.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# @mastra/loggers Documentation
|
|
7
|
+
|
|
8
|
+
> **Version**: 1.0.0-beta.4
|
|
9
|
+
> **Package**: @mastra/loggers
|
|
10
|
+
|
|
11
|
+
## Quick Navigation
|
|
12
|
+
|
|
13
|
+
Use SOURCE_MAP.json to find any export:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
cat docs/SOURCE_MAP.json
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Each export maps to:
|
|
20
|
+
- **types**: `.d.ts` file with JSDoc and API signatures
|
|
21
|
+
- **implementation**: `.js` chunk file with readable source
|
|
22
|
+
- **docs**: Conceptual documentation in `docs/`
|
|
23
|
+
|
|
24
|
+
## Top Exports
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
See SOURCE_MAP.json for the complete list.
|
|
29
|
+
|
|
30
|
+
## Available Topics
|
|
31
|
+
|
|
32
|
+
- [Core](core/) - 1 file(s)
|
|
33
|
+
- [Logging](logging/) - 1 file(s)
|
|
34
|
+
- [Observability](observability/) - 2 file(s)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Core API Reference
|
|
2
|
+
|
|
3
|
+
> API reference for core - 1 entries
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Reference: Mastra Class
|
|
9
|
+
|
|
10
|
+
> Documentation for the `Mastra` class in Mastra, the core entry point for managing agents, workflows, MCP servers, and server endpoints.
|
|
11
|
+
|
|
12
|
+
The `Mastra` class is the central orchestrator in any Mastra application, managing agents, workflows, storage, logging, telemetry, and more. Typically, you create a single instance of `Mastra` to coordinate your application.
|
|
13
|
+
|
|
14
|
+
Think of `Mastra` as a top-level registry:
|
|
15
|
+
|
|
16
|
+
- Registering **integrations** makes them accessible to **agents**, **workflows**, and **tools** alike.
|
|
17
|
+
- **tools** aren’t registered on `Mastra` directly but are associated with agents and discovered automatically.
|
|
18
|
+
|
|
19
|
+
## Usage example
|
|
20
|
+
|
|
21
|
+
```typescript title="src/mastra/index.ts"
|
|
22
|
+
import { Mastra } from "@mastra/core";
|
|
23
|
+
import { PinoLogger } from "@mastra/loggers";
|
|
24
|
+
import { LibSQLStore } from "@mastra/libsql";
|
|
25
|
+
import { weatherWorkflow } from "./workflows/weather-workflow";
|
|
26
|
+
import { weatherAgent } from "./agents/weather-agent";
|
|
27
|
+
|
|
28
|
+
export const mastra = new Mastra({
|
|
29
|
+
workflows: { weatherWorkflow },
|
|
30
|
+
agents: { weatherAgent },
|
|
31
|
+
storage: new LibSQLStore({
|
|
32
|
+
id: 'mastra-storage',
|
|
33
|
+
url: ":memory:",
|
|
34
|
+
}),
|
|
35
|
+
logger: new PinoLogger({
|
|
36
|
+
name: "Mastra",
|
|
37
|
+
level: "info",
|
|
38
|
+
}),
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Constructor parameters
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Logging API Reference
|
|
2
|
+
|
|
3
|
+
> API reference for logging - 1 entries
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Reference: PinoLogger
|
|
9
|
+
|
|
10
|
+
> Documentation for PinoLogger, which provides methods to record events at various severity levels.
|
|
11
|
+
|
|
12
|
+
A Logger instance is created using `new PinoLogger()` and provides methods to record events at various severity levels.
|
|
13
|
+
|
|
14
|
+
When deploying to Mastra Cloud, logs are displayed on the [Logs](https://mastra.ai/docs/v1/mastra-cloud/observability#logs) page. In self-hosted or custom environments, logs can be directed to files or external services depending on the configured transports.
|
|
15
|
+
|
|
16
|
+
## Usage example
|
|
17
|
+
|
|
18
|
+
```typescript title="src/mastra/index.ts"
|
|
19
|
+
import { Mastra } from "@mastra/core";
|
|
20
|
+
import { PinoLogger } from "@mastra/loggers";
|
|
21
|
+
|
|
22
|
+
export const mastra = new Mastra({
|
|
23
|
+
logger: new PinoLogger({
|
|
24
|
+
name: "Mastra",
|
|
25
|
+
level: "info",
|
|
26
|
+
}),
|
|
27
|
+
});
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Parameters
|
|
31
|
+
|
|
32
|
+
## File transport (structured logs)
|
|
33
|
+
|
|
34
|
+
Writes structured logs to a file using the `FileTransport`. The logger accepts a plain message as the first argument and structured metadata as the second argument. These are internally converted to a `BaseLogMessage` and persisted to the configured file path.
|
|
35
|
+
|
|
36
|
+
```typescript title="src/mastra/loggers/file-transport.ts"
|
|
37
|
+
import { FileTransport } from "@mastra/loggers/file";
|
|
38
|
+
import { PinoLogger } from "@mastra/loggers/pino";
|
|
39
|
+
|
|
40
|
+
export const fileLogger = new PinoLogger({
|
|
41
|
+
name: "Mastra",
|
|
42
|
+
transports: { file: new FileTransport({ path: "test-dir/test.log" }) },
|
|
43
|
+
level: "warn",
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### File transport usage
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
fileLogger.warn("Low disk space", {
|
|
51
|
+
destinationPath: "system",
|
|
52
|
+
type: "WORKFLOW",
|
|
53
|
+
});
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Upstash transport (remote log drain)
|
|
57
|
+
|
|
58
|
+
Streams structured logs to a remote Redis list using the `UpstashTransport`. The logger accepts a string message and a structured metadata object. This enables centralized logging for distributed environments, supporting filtering by `destinationPath`, `type`, and `runId`.
|
|
59
|
+
|
|
60
|
+
```typescript title="src/mastra/loggers/upstash-transport.ts"
|
|
61
|
+
import { UpstashTransport } from "@mastra/loggers/upstash";
|
|
62
|
+
import { PinoLogger } from "@mastra/loggers/pino";
|
|
63
|
+
|
|
64
|
+
export const upstashLogger = new PinoLogger({
|
|
65
|
+
name: "Mastra",
|
|
66
|
+
transports: {
|
|
67
|
+
upstash: new UpstashTransport({
|
|
68
|
+
listName: "production-logs",
|
|
69
|
+
upstashUrl: process.env.UPSTASH_URL!,
|
|
70
|
+
upstashToken: process.env.UPSTASH_TOKEN!,
|
|
71
|
+
}),
|
|
72
|
+
},
|
|
73
|
+
level: "info",
|
|
74
|
+
});
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Upstash transport usage
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
upstashLogger.info("User signed in", {
|
|
81
|
+
destinationPath: "auth",
|
|
82
|
+
type: "AGENT",
|
|
83
|
+
runId: "run_123",
|
|
84
|
+
});
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Custom transport
|
|
88
|
+
|
|
89
|
+
You can create custom transports using the `createCustomTransport` utility to integrate with any logging service or stream.
|
|
90
|
+
|
|
91
|
+
### Sentry transport example
|
|
92
|
+
|
|
93
|
+
Creates a custom transport using `createCustomTransport` and integrates it with a third-party logging stream such as `pino-sentry-transport`. This allows forwarding logs to an external system like Sentry for advanced monitoring and observability.
|
|
94
|
+
|
|
95
|
+
```typescript title="src/mastra/loggers/sentry-transport.ts"
|
|
96
|
+
import { createCustomTransport } from "@mastra/core/loggers";
|
|
97
|
+
import { PinoLogger } from "@mastra/loggers/pino";
|
|
98
|
+
import pinoSentry from "pino-sentry-transport";
|
|
99
|
+
|
|
100
|
+
const sentryStream = await pinoSentry({
|
|
101
|
+
sentry: {
|
|
102
|
+
dsn: "YOUR_SENTRY_DSN",
|
|
103
|
+
_experiments: {
|
|
104
|
+
enableLogs: true,
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
const customTransport = createCustomTransport(sentryStream);
|
|
110
|
+
|
|
111
|
+
export const sentryLogger = new PinoLogger({
|
|
112
|
+
name: "Mastra",
|
|
113
|
+
level: "info",
|
|
114
|
+
transports: { sentry: customTransport },
|
|
115
|
+
});
|
|
116
|
+
```
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
> Monitor and debug applications with Mastra
|
|
2
|
+
|
|
3
|
+
# Observability Overview
|
|
4
|
+
|
|
5
|
+
Mastra provides observability features for AI applications. Monitor LLM operations, trace agent decisions, and debug complex workflows with tools that understand AI-specific patterns.
|
|
6
|
+
|
|
7
|
+
## Key Features
|
|
8
|
+
|
|
9
|
+
### Tracing
|
|
10
|
+
|
|
11
|
+
Specialized tracing for AI operations that captures:
|
|
12
|
+
|
|
13
|
+
- **Model interactions**: Token usage, latency, prompts, and completions
|
|
14
|
+
- **Agent execution**: Decision paths, tool calls, and memory operations
|
|
15
|
+
- **Workflow steps**: Branching logic, parallel execution, and step outputs
|
|
16
|
+
- **Automatic instrumentation**: Tracing with decorators
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
Configure Observability in your Mastra instance:
|
|
21
|
+
|
|
22
|
+
```typescript title="src/mastra/index.ts"
|
|
23
|
+
import { Mastra } from "@mastra/core";
|
|
24
|
+
import { PinoLogger } from "@mastra/loggers";
|
|
25
|
+
import { LibSQLStore } from "@mastra/libsql";
|
|
26
|
+
import {
|
|
27
|
+
Observability,
|
|
28
|
+
DefaultExporter,
|
|
29
|
+
CloudExporter,
|
|
30
|
+
SensitiveDataFilter,
|
|
31
|
+
} from "@mastra/observability";
|
|
32
|
+
|
|
33
|
+
export const mastra = new Mastra({
|
|
34
|
+
logger: new PinoLogger(),
|
|
35
|
+
storage: new LibSQLStore({
|
|
36
|
+
id: 'mastra-storage',
|
|
37
|
+
url: "file:./mastra.db", // Storage is required for tracing
|
|
38
|
+
}),
|
|
39
|
+
observability: new Observability({
|
|
40
|
+
configs: {
|
|
41
|
+
default: {
|
|
42
|
+
serviceName: "mastra",
|
|
43
|
+
exporters: [
|
|
44
|
+
new DefaultExporter(), // Persists traces to storage for Mastra Studio
|
|
45
|
+
new CloudExporter(), // Sends traces to Mastra Cloud (if MASTRA_CLOUD_ACCESS_TOKEN is set)
|
|
46
|
+
],
|
|
47
|
+
spanOutputProcessors: [
|
|
48
|
+
new SensitiveDataFilter(), // Redacts sensitive data like passwords, tokens, keys
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
}),
|
|
53
|
+
});
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
With this basic setup, you will see Traces and Logs in both Studio and in Mastra Cloud.
|
|
57
|
+
|
|
58
|
+
We also support various external tracing providers like MLflow, Langfuse, Braintrust, and any OpenTelemetry-compatible platform (Datadog, New Relic, SigNoz, etc.). See more about this in the [Tracing](https://mastra.ai/docs/v1/observability/tracing/overview) documentation.
|
|
59
|
+
|
|
60
|
+
## What's Next?
|
|
61
|
+
|
|
62
|
+
- **[Set up Tracing](https://mastra.ai/docs/v1/observability/tracing/overview)**: Configure tracing for your application
|
|
63
|
+
- **[Configure Logging](https://mastra.ai/docs/v1/observability/logging)**: Add structured logging
|
|
64
|
+
- **[API Reference](https://mastra.ai/reference/v1/observability/tracing/instances)**: Detailed configuration options
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
> Learn how to use logging in Mastra to monitor execution, capture application behavior, and improve the accuracy of AI applications.
|
|
2
|
+
|
|
3
|
+
# Logging
|
|
4
|
+
|
|
5
|
+
Mastra's logging system captures function execution, input data, and output responses in a structured format.
|
|
6
|
+
|
|
7
|
+
When deploying to Mastra Cloud, logs are shown on the [Logs](https://mastra.ai/docs/v1/mastra-cloud/observability) page. In self-hosted or custom environments, logs can be directed to files or external services depending on the configured transports.
|
|
8
|
+
|
|
9
|
+
## Configuring logs with PinoLogger
|
|
10
|
+
|
|
11
|
+
When [initializing a new Mastra project](https://mastra.ai/guides/v1/getting-started/quickstart) using the CLI, `PinoLogger` is included by default.
|
|
12
|
+
|
|
13
|
+
```typescript title="src/mastra/index.ts"
|
|
14
|
+
import { Mastra } from "@mastra/core/mastra";
|
|
15
|
+
import { PinoLogger } from "@mastra/loggers";
|
|
16
|
+
|
|
17
|
+
export const mastra = new Mastra({
|
|
18
|
+
logger: new PinoLogger({
|
|
19
|
+
name: "Mastra",
|
|
20
|
+
level: "info",
|
|
21
|
+
}),
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
> **Note:**
|
|
26
|
+
|
|
27
|
+
Visit [PinoLogger](https://mastra.ai/reference/v1/logging/pino-logger) for all available configuration options.
|
|
28
|
+
|
|
29
|
+
## Customizing logs
|
|
30
|
+
|
|
31
|
+
Mastra provides access to a logger instance via the `mastra.getLogger()` method, available inside both workflow steps and tools. The logger supports standard severity levels: `debug`, `info`, `warn`, and `error`.
|
|
32
|
+
|
|
33
|
+
### Logging from workflow steps
|
|
34
|
+
|
|
35
|
+
Within a workflow step, access the logger via the `mastra` parameter inside the `execute` function. This allows you to log messages relevant to the step’s execution.
|
|
36
|
+
|
|
37
|
+
```typescript {6-7} title="src/mastra/workflows/test-workflow.ts"
|
|
38
|
+
import { createWorkflow, createStep } from "@mastra/core/workflows";
|
|
39
|
+
import { z } from "zod";
|
|
40
|
+
|
|
41
|
+
const step1 = createStep({
|
|
42
|
+
execute: async ({ mastra }) => {
|
|
43
|
+
const logger = mastra.getLogger();
|
|
44
|
+
logger.info("workflow info log");
|
|
45
|
+
|
|
46
|
+
return {
|
|
47
|
+
output: ""
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export const testWorkflow = createWorkflow({...})
|
|
53
|
+
.then(step1)
|
|
54
|
+
.commit();
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Logging from tools
|
|
58
|
+
|
|
59
|
+
Similarly, tools have access to the logger instance via the `mastra` parameter. Use this to log tool specific activity during execution.
|
|
60
|
+
|
|
61
|
+
```typescript {6-7} title="src/mastra/tools/test-tool.ts"
|
|
62
|
+
import { createTool } from "@mastra/core/tools";
|
|
63
|
+
import { z } from "zod";
|
|
64
|
+
|
|
65
|
+
export const testTool = createTool({
|
|
66
|
+
execute: async ({ mastra }) => {
|
|
67
|
+
const logger = mastra?.getLogger();
|
|
68
|
+
logger?.info("tool info log");
|
|
69
|
+
|
|
70
|
+
return {
|
|
71
|
+
output: "",
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Logging with additional data
|
|
78
|
+
|
|
79
|
+
Logger methods accept an optional second argument for additional data. This can be any value, such as an object, string, or number.
|
|
80
|
+
|
|
81
|
+
In this example, the log message includes an object with a key of `agent` and a value of the `testAgent` instance.
|
|
82
|
+
|
|
83
|
+
```typescript {10} title="src/mastra/workflows/test-workflow.ts"
|
|
84
|
+
import { createWorkflow, createStep } from "@mastra/core/workflows";
|
|
85
|
+
import { z } from "zod";
|
|
86
|
+
|
|
87
|
+
const step1 = createStep({
|
|
88
|
+
execute: async ({ mastra }) => {
|
|
89
|
+
|
|
90
|
+
const testAgent = mastra.getAgent("testAgent");
|
|
91
|
+
|
|
92
|
+
const logger = mastra.getLogger();
|
|
93
|
+
logger.info("workflow info log", { agent: testAgent });
|
|
94
|
+
|
|
95
|
+
return {
|
|
96
|
+
output: ""
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
export const testWorkflow = createWorkflow({...})
|
|
102
|
+
.then(step1)
|
|
103
|
+
.commit();
|
|
104
|
+
```
|
package/dist/index.cjs
CHANGED
|
@@ -35,7 +35,8 @@ var PinoLogger = class _PinoLogger extends logger.MastraLogger {
|
|
|
35
35
|
{
|
|
36
36
|
name: options.name || "app",
|
|
37
37
|
level: options.level || logger.LogLevel.INFO,
|
|
38
|
-
formatters: options.formatters
|
|
38
|
+
formatters: options.formatters,
|
|
39
|
+
redact: options.redact
|
|
39
40
|
},
|
|
40
41
|
options.overrideDefaultTransports ? options?.transports?.default : transportsAry.length === 0 ? prettyStream : pino__default.default.multistream([
|
|
41
42
|
...transportsAry.map(([, transport]) => ({
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/pino.ts"],"names":["MastraLogger","pretty","pino","LogLevel"],"mappings":";;;;;;;;;;;;
|
|
1
|
+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;AAAA,EAEA,KAAA,CAAM,OAAA,EAAiB,IAAA,GAA4B,EAAC,EAAS;AAC3D,IAAA,IAAA,CAAK,MAAA,CAAO,KAAA,CAAM,IAAA,EAAM,OAAO,CAAA;AAAA,EACjC;AACF","file":"index.cjs","sourcesContent":["import type { LoggerTransport } from '@mastra/core/logger';\nimport { LogLevel, MastraLogger } from '@mastra/core/logger';\nimport pino from 'pino';\nimport pretty from 'pino-pretty';\n\ntype TransportMap = Record<string, LoggerTransport>;\n\nexport type { LogLevel } from '@mastra/core/logger';\n\nexport interface PinoLoggerOptions {\n name?: string;\n level?: LogLevel;\n transports?: TransportMap;\n overrideDefaultTransports?: boolean;\n formatters?: pino.LoggerOptions['formatters'];\n redact?: pino.LoggerOptions['redact'];\n}\n\ninterface PinoLoggerInternalOptions extends PinoLoggerOptions {\n /** @internal Used internally for child loggers */\n _logger?: pino.Logger;\n}\n\nexport class PinoLogger extends MastraLogger {\n protected logger: pino.Logger;\n\n constructor(options: PinoLoggerOptions = {}) {\n super(options);\n\n const internalOptions = options as PinoLoggerInternalOptions;\n\n // If an existing pino logger is provided (for child loggers), use it directly\n if (internalOptions._logger) {\n this.logger = internalOptions._logger;\n return;\n }\n\n let prettyStream: ReturnType<typeof pretty> | undefined = undefined;\n if (!options.overrideDefaultTransports) {\n prettyStream = pretty({\n colorize: true,\n levelFirst: true,\n ignore: 'pid,hostname',\n colorizeObjects: true,\n translateTime: 'SYS:standard',\n singleLine: false,\n });\n }\n\n const transportsAry = [...this.getTransports().entries()];\n this.logger = pino(\n {\n name: options.name || 'app',\n level: options.level || LogLevel.INFO,\n formatters: options.formatters,\n redact: options.redact,\n },\n options.overrideDefaultTransports\n ? options?.transports?.default\n : transportsAry.length === 0\n ? prettyStream\n : pino.multistream([\n ...transportsAry.map(([, transport]) => ({\n stream: transport,\n level: options.level || LogLevel.INFO,\n })),\n {\n stream: prettyStream!,\n level: options.level || LogLevel.INFO,\n },\n ]),\n );\n }\n\n /**\n * Creates a child logger with additional bound context.\n * All logs from the child logger will include the bound context.\n *\n * @param bindings - Key-value pairs to include in all logs from this child logger\n * @returns A new PinoLogger instance with the bound context\n *\n * @example\n * ```typescript\n * const baseLogger = new PinoLogger({ name: 'MyApp' });\n *\n * // Create module-scoped logger\n * const serviceLogger = baseLogger.child({ module: 'UserService' });\n * serviceLogger.info('User created', { userId: '123' });\n * // Output includes: { module: 'UserService', userId: '123', msg: 'User created' }\n *\n * // Create request-scoped logger\n * const requestLogger = baseLogger.child({ requestId: req.id });\n * requestLogger.error('Request failed', { err: error });\n * // Output includes: { requestId: 'abc', msg: 'Request failed', err: {...} }\n * ```\n */\n child(bindings: Record<string, unknown>): PinoLogger {\n const childPino = this.logger.child(bindings);\n const childOptions: PinoLoggerInternalOptions = {\n name: this.name,\n level: this.level,\n transports: Object.fromEntries(this.transports),\n _logger: childPino,\n };\n return new PinoLogger(childOptions);\n }\n\n debug(message: string, args: Record<string, any> = {}): void {\n this.logger.debug(args, message);\n }\n\n info(message: string, args: Record<string, any> = {}): void {\n this.logger.info(args, message);\n }\n\n warn(message: string, args: Record<string, any> = {}): void {\n this.logger.warn(args, message);\n }\n\n error(message: string, args: Record<string, any> = {}): void {\n this.logger.error(args, message);\n }\n}\n"]}
|
package/dist/index.js
CHANGED
|
@@ -28,7 +28,8 @@ var PinoLogger = class _PinoLogger extends MastraLogger {
|
|
|
28
28
|
{
|
|
29
29
|
name: options.name || "app",
|
|
30
30
|
level: options.level || LogLevel.INFO,
|
|
31
|
-
formatters: options.formatters
|
|
31
|
+
formatters: options.formatters,
|
|
32
|
+
redact: options.redact
|
|
32
33
|
},
|
|
33
34
|
options.overrideDefaultTransports ? options?.transports?.default : transportsAry.length === 0 ? prettyStream : pino.multistream([
|
|
34
35
|
...transportsAry.map(([, transport]) => ({
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/pino.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"sources":["../src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EAAS;AAC3D,IAAA,IAAA,CAAK,MAAA,CAAO,KAAA,CAAM,IAAA,EAAM,OAAO,CAAA;AAAA,EACjC;AACF","file":"index.js","sourcesContent":["import type { LoggerTransport } from '@mastra/core/logger';\nimport { LogLevel, MastraLogger } from '@mastra/core/logger';\nimport pino from 'pino';\nimport pretty from 'pino-pretty';\n\ntype TransportMap = Record<string, LoggerTransport>;\n\nexport type { LogLevel } from '@mastra/core/logger';\n\nexport interface PinoLoggerOptions {\n name?: string;\n level?: LogLevel;\n transports?: TransportMap;\n overrideDefaultTransports?: boolean;\n formatters?: pino.LoggerOptions['formatters'];\n redact?: pino.LoggerOptions['redact'];\n}\n\ninterface PinoLoggerInternalOptions extends PinoLoggerOptions {\n /** @internal Used internally for child loggers */\n _logger?: pino.Logger;\n}\n\nexport class PinoLogger extends MastraLogger {\n protected logger: pino.Logger;\n\n constructor(options: PinoLoggerOptions = {}) {\n super(options);\n\n const internalOptions = options as PinoLoggerInternalOptions;\n\n // If an existing pino logger is provided (for child loggers), use it directly\n if (internalOptions._logger) {\n this.logger = internalOptions._logger;\n return;\n }\n\n let prettyStream: ReturnType<typeof pretty> | undefined = undefined;\n if (!options.overrideDefaultTransports) {\n prettyStream = pretty({\n colorize: true,\n levelFirst: true,\n ignore: 'pid,hostname',\n colorizeObjects: true,\n translateTime: 'SYS:standard',\n singleLine: false,\n });\n }\n\n const transportsAry = [...this.getTransports().entries()];\n this.logger = pino(\n {\n name: options.name || 'app',\n level: options.level || LogLevel.INFO,\n formatters: options.formatters,\n redact: options.redact,\n },\n options.overrideDefaultTransports\n ? options?.transports?.default\n : transportsAry.length === 0\n ? prettyStream\n : pino.multistream([\n ...transportsAry.map(([, transport]) => ({\n stream: transport,\n level: options.level || LogLevel.INFO,\n })),\n {\n stream: prettyStream!,\n level: options.level || LogLevel.INFO,\n },\n ]),\n );\n }\n\n /**\n * Creates a child logger with additional bound context.\n * All logs from the child logger will include the bound context.\n *\n * @param bindings - Key-value pairs to include in all logs from this child logger\n * @returns A new PinoLogger instance with the bound context\n *\n * @example\n * ```typescript\n * const baseLogger = new PinoLogger({ name: 'MyApp' });\n *\n * // Create module-scoped logger\n * const serviceLogger = baseLogger.child({ module: 'UserService' });\n * serviceLogger.info('User created', { userId: '123' });\n * // Output includes: { module: 'UserService', userId: '123', msg: 'User created' }\n *\n * // Create request-scoped logger\n * const requestLogger = baseLogger.child({ requestId: req.id });\n * requestLogger.error('Request failed', { err: error });\n * // Output includes: { requestId: 'abc', msg: 'Request failed', err: {...} }\n * ```\n */\n child(bindings: Record<string, unknown>): PinoLogger {\n const childPino = this.logger.child(bindings);\n const childOptions: PinoLoggerInternalOptions = {\n name: this.name,\n level: this.level,\n transports: Object.fromEntries(this.transports),\n _logger: childPino,\n };\n return new PinoLogger(childOptions);\n }\n\n debug(message: string, args: Record<string, any> = {}): void {\n this.logger.debug(args, message);\n }\n\n info(message: string, args: Record<string, any> = {}): void {\n this.logger.info(args, message);\n }\n\n warn(message: string, args: Record<string, any> = {}): void {\n this.logger.warn(args, message);\n }\n\n error(message: string, args: Record<string, any> = {}): void {\n this.logger.error(args, message);\n }\n}\n"]}
|
package/dist/pino.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface PinoLoggerOptions {
|
|
|
9
9
|
transports?: TransportMap;
|
|
10
10
|
overrideDefaultTransports?: boolean;
|
|
11
11
|
formatters?: pino.LoggerOptions['formatters'];
|
|
12
|
+
redact?: pino.LoggerOptions['redact'];
|
|
12
13
|
}
|
|
13
14
|
export declare class PinoLogger extends MastraLogger {
|
|
14
15
|
protected logger: pino.Logger;
|
package/dist/pino.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pino.d.ts","sourceRoot":"","sources":["../src/pino.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC7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CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,UAAU;IAWpD,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAAG,IAAI;IAI5D,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAAG,IAAI;IAI3D,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAAG,IAAI;IAI3D,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,GAAG,IAAI;CAG7D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/loggers",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -69,17 +69,16 @@
|
|
|
69
69
|
"pino-pretty": "^13.0.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@microsoft/api-extractor": "^7.52.8",
|
|
73
72
|
"@types/node": "22.13.17",
|
|
74
73
|
"@vitest/coverage-v8": "4.0.12",
|
|
75
74
|
"@vitest/ui": "4.0.12",
|
|
76
75
|
"eslint": "^9.37.0",
|
|
77
76
|
"tsup": "^8.5.0",
|
|
78
|
-
"typescript": "^5.
|
|
79
|
-
"vitest": "4.0.
|
|
77
|
+
"typescript": "^5.9.3",
|
|
78
|
+
"vitest": "4.0.16",
|
|
80
79
|
"@internal/types-builder": "0.0.28",
|
|
81
80
|
"@internal/lint": "0.0.53",
|
|
82
|
-
"@mastra/core": "1.0.0-beta.
|
|
81
|
+
"@mastra/core": "1.0.0-beta.20"
|
|
83
82
|
},
|
|
84
83
|
"peerDependencies": {
|
|
85
84
|
"@mastra/core": ">=1.0.0-0 <2.0.0-0"
|
|
@@ -88,7 +87,8 @@
|
|
|
88
87
|
"node": ">=22.13.0"
|
|
89
88
|
},
|
|
90
89
|
"scripts": {
|
|
91
|
-
"build": "tsup --silent --config tsup.config.ts",
|
|
90
|
+
"build:lib": "tsup --silent --config tsup.config.ts",
|
|
91
|
+
"build:docs": "pnpx tsx ../../scripts/generate-package-docs.ts packages/loggers",
|
|
92
92
|
"build:watch": "tsup --watch --silent --config tsup.config.ts",
|
|
93
93
|
"test": "vitest run",
|
|
94
94
|
"lint": "eslint ."
|