Comments (4)
Hi @Ciph3r-Zer0 ,
it seems when you read the docs you've missed the filename paragraph 😉
If you use a string
, the default filename generator function is used, otherwise you can provide your own filename generator function to completely customize the generated file names.
If this helps, please feel free to close this issue.
from rotating-file-stream.
Hello, thanks for replying
yes this solves my problem, but why is there 2 file.log files in the directory now?
The first file is called file.log which is the current log file
But the second file is called file.log.txt which contains the path for compressed files like this:
logs\1402-02-19_23-46-00_1.log.gz logs\1402-02-19_23-46-05_1.log.gz logs\1402-02-19_23-46-10_1.log.gz logs\1402-02-19_23-46-15_1.log.gz logs\1402-02-19_23-46-20_1.log.gz logs\1402-02-19_23-46-25_1.log.gz logs\1402-02-19_23-46-30_1.log.gz logs\1402-02-19_23-46-35_1.log.gz
from rotating-file-stream.
Hi @Ciph3r-Zer0 ,
it seems the .txt
file is the history file; if you use maxFiles
or maxSize
that file contains the history of the files to check to respect the limits.
Its name can be customized through the history option.
from rotating-file-stream.
Yeap, it worked. Thanks
from rotating-file-stream.
Related Issues (20)
- Cannot find module 'fs/promises' HOT 6
- Not able to compress log file HOT 3
- [bug] Cannot read properties of undefined (reading 'write') HOT 25
- Rotating log file with size, maxFiles and path options HOT 9
- Unhandled Error, No such file or directory, unlink called twice on same file. HOT 17
- The first rotated file is not specified time length. HOT 1
- Error: this.timeout.unref is not a function HOT 10
- while deploying the project i am getting this error please help HOT 7
- [bug] it does not create the file again when it's writing HOT 1
- how do i do the unit testing in node js HOT 2
- Sometimes crashes on interval change HOT 3
- UTC: interval & intervalBoundary HOT 1
- Jumping from Node v14 to v18 between 3.1.1 and 3.2.0 HOT 6
- maxfiles seems to cause an error: Error: ENOENT: no such file or directory HOT 3
- [bug] File not rotating when using a generator function HOT 6
- [bug] the process deleted all log file when default file size larger than maxSize HOT 1
- Question: how to set folder to store file? HOT 1
- I am using node version 18 but still getting this error HOT 1
- Import error in node 20.11 HOT 8
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 rotating-file-stream.