Git Product home page Git Product logo

Comments (7)

wbpmrck avatar wbpmrck commented on June 2, 2024

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.

wbpmrck avatar wbpmrck commented on June 2, 2024

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.

nomiddlename avatar nomiddlename commented on June 2, 2024

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.

wbpmrck avatar wbpmrck commented on June 2, 2024

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.

nomiddlename avatar nomiddlename commented on June 2, 2024

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.

wbpmrck avatar wbpmrck commented on June 2, 2024

haha~allright,thx

from log4js-node.

nomiddlename avatar nomiddlename commented on June 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.