Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

234
Views
Format pino file stream with pino-pretty

I build my first logger for my discord .js bot.

Now I need help with this:

How can I format the output fs stream also with pino-pretty? This is my code

var fs = require('fs');
var pinoms = require('pino-multi-stream')

const date = new Date()

const prettyStream = pinoms.prettyStream({ prettyPrint: { colorize: true, translateTime: "SYS:standard", ignore: "hostname,pid" } });
var streams = [
    {stream: fs.createWriteStream(`logs/${date.getFullYear()}-${date.getMonth()+1}-${date.getDate()}-${date.getHours()}-${date.getMinutes()}.log`) },
    {stream: prettyStream }
]

var logger = pinoms(pinoms.multistream(streams))
module.exports = logger;

I've looked for some solutions but couldn't find anything. Please help!

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!