Comments (4)
from signale.
Don't know if that is still going to be helpfull, but you can pass on the options the default stream (process.stderr) and a writableStream to a file:
const logger = new Signale({ stream: [process.stderr, fs.createWriteStream('./log.txt')] })
I haven't yet tested if writing to a file degrades the performance somehow, but as it is a writeStream I wouldn't expect any major impact. Also, the file will receive the buffer converted to UTF-8, meaning that the control characters and color codes used to colorize the terminal output are going to appear in the file (eg: �[90m
[39m
). I was able to remove them by creating a wrapper and removing them using the control character (U+001B, 27 in decimal) before passing the stream to Signale, not sure if that is a good way to do it, but worked.
from signale.
I have the same problem.
from signale.
So how did you manage to create the wrapper befor passing the stream. i am no clear on how it is done in code?
Could you mayby give an example?
from signale.
Related Issues (20)
- Recommend @klaussinani for GitHub Sponsor Matching Funds
- Reorder logging levels to reduce debug noise HOT 10
- Add the ability to enable/disable stack trace displaying HOT 1
- TypeScript Rewrite Fork
- Cut new release so that TypeScript types are published with the package HOT 2
- Conditional logging based on scope HOT 1
- HH:MM:SS doesn't work HOT 2
- nested objects HOT 2
- Project status? Doesn't seem maintained HOT 14
- TypeError: Cannot read property 'length' of undefined HOT 1
- Return line of log HOT 1
- Allow custom tagging or a custom context
- Snap availability HOT 2
- Indent is off in GitHub Actions logs
- WriteStream object is not accepted in stream array HOT 1
- support ES6 module HOT 3
- Doesn't loo like expected, at least inside clusters
- Doesn't look like expected, at least inside workers threads HOT 2
- Mark project as abandoned
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 signale.