Comments (7)
and i want to modify the log file name in the .json file,how can i find the explanation with all the configs?
from log4js-node.
by the way,i have had a look at the source code,i can't find how can i do this like i did in the log4Net:generate a single file for each day,for example:
D:/
-----someLog.log
-----someLog.log.20120627
-----someLog.log.20120626
from log4js-node.
The first part of the issue (missing newlines) looks to work fine for me - but I'm on a Mac. Are you using windows? What version of node are you using? I'm guessing I just need to do "\r\n" at the end of a line instead of just "\n" for it to work on windows.
For the file appender, the log file name is determined from the filename property in the json.
There's no support for rotating log files based on date, just file size at the moment. I'm happy to accept pull requests for a feature like that though.
from log4js-node.
i'm using windows,the first issue has been solved(by adding '\r\n' ).
our team like log4net very much(does log4js has relationship with log4net?),and we hope the log files can keep 'steady'(once reach maxSize,not modify its name,just put it there).because we use the logs to analyze some bugs or user activities.
from log4js-node.
The only connection with log4net is that we're both trying to follow what log4j did originally. Any similarities are purely coincidental :) - you shouldn't rely on things that work in log4net working in log4js.
I'll fix up the layouts to add a "\r" to log messages in windows.
from log4js-node.
haha~allright,thx
from log4js-node.
If you're on node 0.8, then version 0.5.1 of log4js in npm has a fix for the newline problem.
from log4js-node.
Related Issues (20)
- Error in vite compilation after importing log4js HOT 3
- dateFile appender "mode" not working HOT 4
- multiFile type is not able to use with the error: type "multiFile" could not be found HOT 4
- backups day count not working as it as HOT 2
- "maxLogSize" BUG: overwrite currently archived files HOT 2
- log4js breaks chaining of <http.ServerResponse> HOT 2
- os.EOL should be tested before being returned.
- Custom field names for mongo logging HOT 1
- Used together with PM2, the log did not enter the corresponding file HOT 3
- numBackups failed when using dot into pattern
- Feature request: Custom object to `logger.X()` calls
- connectLogger's proxy for status code breaks ServerResponse.writeHead API
- TypeError: log4js.getLogger is not a function HOT 2
- TypeError: appenderModule.configure is not a function HOT 5
- DeprecationWarning: OutgoingMessage.prototype._headers is deprecated HOT 2
- log4js.logger - defaultParseCallStack error appears in my logs HOT 11
- Has the attribute 'daysToKeep' been deleted? HOT 11
- How to add new appenders dynamically. HOT 3
- Feature Request: Assigned different appenders to a category with different log levels HOT 1
- "TypeError: Cannot convert object to primitive value" in cluster mode
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 log4js-node.