generated from metcoder95/lib_template
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
The (slightly modified) example from the docs results in Unhandled 'error' event.
Although the logs were successfully sent (!).
To Reproduce
import fs from 'node:fs';
const CRED_FILE_PATH = './path-to-credentials.json';
const creds = JSON.parse(fs.readFileSync(CRED_FILE_PATH, 'utf-8'));
import pino from 'pino';
const logger = pino({
transport: {
target: 'cloud-pine',
options: {
logName: 'my_cloud-pine',
cloudLoggingOptions: {
googleCloudOptions: {
projectId: creds.project_id,
credentials: creds,
},
}
}
}
});
logger.info('Hello from pino');
logger.error({ andSomedata: 1 }, 'Pino Error');Expected behavior
No errors, graceful exit
Screenshots
$node pino.js
node:events:491
throw er; // Unhandled 'error' event
^
Error: end() took too long (10s)
at end (C:\Users\...\test-google-logs\node_modules\thread-stream\index.js:406:15)
at ThreadStream.end (C:\Users\...\test-google-logs\node_modules\thread-stream\index.js:258:5)
at autoEnd (C:\Users\...\test-google-logs\node_modules\pino\lib\transport.js:75:10)
at process.wrap (C:\Users\...\test-google-logs\node_modules\on-exit-leak-free\index.js:10:7)
at Object.onceWrapper (node:events:628:26)
at process.emit (node:events:513:28)
Emitted 'error' event on ThreadStream instance at:
at destroy (C:\Users\...\test-google-logs\node_modules\thread-stream\index.js:349:12)
at end (C:\Users\...\test-google-logs\node_modules\thread-stream\index.js:415:5)
at ThreadStream.end (C:\Users\...\test-google-logs\node_modules\thread-stream\index.js:258:5)
[... lines matching original stack trace ...]
at process.emit (node:events:513:28)Desktop (please complete the following information):
- OS: Windows 10
- Nodejs: v18.16.0
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working