Comments (5)
Note that the above code does not recreate the file because.. it is still writing to it. There is no logic in your code to close the file descriptor in createWriteStream
and reopen it. You can use https://github.com/mcollina/sonic-boom#sonicboomreopenfile instead, and it offers that capability.
It's also significantly faster, so hey ;).
This is covered in https://getpino.io/#/docs/help?id=reopening.
from pino-multi-stream.
There is a way to reopen the streams using pino-multi-stream
? I searched and didn't understand how to reopen. I know how to reopen using only one destination but with multi-stream I am lost.
Sorry if this is not the place to ask this.
from pino-multi-stream.
You should use https://www.npmjs.com/package/sonic-boom as a stream destination
from pino-multi-stream.
Thanks, this will solve the problem, yes?
streams.forEach(el => {
el.stream.reopen();
});
from pino-multi-stream.
from pino-multi-stream.
Related Issues (20)
- Level is not being set upon initilization HOT 2
- Would it be nice to take pino to peerDependency? HOT 1
- log.child(obj).info(string) throws 'unknown level' error HOT 4
- Custom levels don't behave the same with and without pino-multi-stream HOT 12
- Passing arguments to prettyStream HOT 3
- unknown level undefined error when using prettyPrint HOT 2
- multi-stream not working with pretty-print HOT 3
- Log no longer written to multiple streams HOT 2
- Log redaction not working in production HOT 2
- Destination write stream file is bloated with NUL characters at head HOT 1
- dedupe logs HOT 5
- TypeError: Cannot read property 'flushSync' of undefined HOT 1
- Not working in browser HOT 2
- Stream level changes the level of another stream HOT 5
- Provide example how to use standard pino + one more stream HOT 9
- module crashes at the configuration stage HOT 3
- multilog HOT 1
- Steam into file HOT 1
- Deprecate this module HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pino-multi-stream.