pino is a very low overhead Node.js logger.
Questions tagged [pinojs]
62 questions
0
votes
0 answers
pino-loki doesn't work if used in useEffect or error boundary components in nextjs
I want to use Loki for frontend log collection.
I have a page that looks like this:
export default function TestLogging() {
logger.debug("client-side debug");
logger.info("client-side info");
logger.warn("client-side warn");
…

Sheena
- 15,590
- 14
- 75
- 113
0
votes
0 answers
Node-electron-pino | pino doesn't work with electron TypeError: browser.transport is not a function
I'm struggling with using [pino][1] as my logger and I'm keep getting the following error:
App threw an error during load
TypeError: browser.transport is not a function
at Object.…

Or Yaacov
- 3,597
- 5
- 25
- 49
0
votes
1 answer
Emojis are not rendering in the terminal when using the logger.info() , logger.warn, etc
When using the console.log() the emojis are rendered in the terminal but when using logger.info() , logger.warn() , etc emojis didn't appropriately render. I used Pino-pretty.
src/app.js
utils/logger.js
import express from "express";
import cors…
0
votes
1 answer
How to inject service inside a module function NestJS
I'm using pino-logger in my NestJS project to log the activities in my application, and I'm logging the object along with ReqId so I can trace the whole activity inside one request. I'd like to use the same "ReqId" in another place as well, but I'm…

Zain Khan
- 1,644
- 5
- 31
- 67
0
votes
0 answers
Pino manually set level when logging
How can I manually set the level of a log when using Pino?
Here's some sample code:
const baseLogger = pino(loggerOptions);
const activityLogger = baseLogger.child({ name: "activity" });
const workerLogger = baseLogger.child({ name: "worker"…

Paymahn Moghadasian
- 9,301
- 13
- 56
- 94
0
votes
0 answers
Pino (pinojs) only logging some HTTP request
I am trying to add logging with pino to an existing node.js web application, that uses express.js and Postgresql. However, some HTTP post request are not being logged. It seems to only happen with HTTP post request responding with a redirect. It…

rlp
- 513
- 2
- 7
- 16
0
votes
1 answer
Nestedkey with mixin pino-logger
I have this logger model:
LoggerModule.forRootAsync({
imports: [ConfigModule],
useFactory: (configService: ConfigService) => ({
pinoHttp: {
level: configService.get('logger.level', { infer: true }),
…

yairabr
- 101
- 1
- 1
- 6
0
votes
0 answers
Pino : Rolling log file based on log size and date
I am working on logging features for one of my NodeJs/TypeScript projects.
I found a great library named Pino. It is much easier to implement but I require more features like:
I require Rolling appended feature based on log size and DateTime. It…

Md. Sajedul Karim
- 6,749
- 3
- 61
- 87
0
votes
1 answer
nestjs pino logger not used when exception is thrown during initialization
For logging in nestjs I implemented pino as described here: https://github.com/iamolegga/nestjs-pino.
When there is an error throw during the initialization of the nestjs modules, the default nestjs logger is used instead of pino. When the…

user2625247
- 361
- 1
- 4
- 15
0
votes
1 answer
Node.js, logging with Pino: warning 'Possible EventEmitter memory leak detected'
To register any events in my project, I use pino. This is my 'Logger.js' file:
require('dotenv').config();
const pino = require('pino');
const logger = (
name,
level = (process.env.LOG_LEVEL || 'info'),
file = process.env.LOG_FILE ||…

Stanislav Shevchenko
- 43
- 4
0
votes
1 answer
Pino - "unable to determine transport target for..." - When adding library from github
I tried to fork a simple pino transport "pino-loki" on github and wan't to add it as my dependency.
package.json seems to be fine and the library is pulled from github.
"pino-loki": "mygithub/pino-loki"
But for some reason pino can't initialise…

somerandomusername
- 1,993
- 4
- 23
- 55
0
votes
1 answer
Pino logger custom destinations based on log level and logging on nodeJS console
Im having a hard time logging on Stdout and logging in file. Is there a way to log on stdout based on log level and at the same time log in file?
As of now, my code is currently logging on text file base on their current level. Example if the log is…

Poor programmer
- 121
- 12
0
votes
2 answers
PinoWarning: prettyPrint is deprecated, look at https://github.com/pinojs/pino-pretty for alternatives
I suddenly started getting following error in my nodejs project
[PINODEP008] PinoWarning: prettyPrint is deprecated, look at https://github.com/pinojs/pino-pretty for alternatives.
What to do? App is crashing
(Use `node --trace-warnings ...` to…

Vinit Khandelwal
- 490
- 8
- 20
0
votes
1 answer
Why node-emoji won't print properly on nestjs/pino logger?
I am investigating a strange behavior from a Nestjs project I am developing, that wants to use @NestJs/Pino logger to display emojis in the terminal's logs. However, node-emoji only display the emoji properly in the terminal if I use…
0
votes
1 answer
pino logger as fastify plugin
I have been created my own options and stream for fastify logger:
const logger = pino(
{
level: 'info',
...ecsFormat,
},
pinoMultiStream.multistream([
{ stream: streamToElastic },
{
stream: pretty({
colorize: true,
sync:…

Arseniy Klibaner
- 37
- 4