I want to do log when user log in to my app by get client ip, server ip, username, start time, end time write to text file [YY-MM-DD.log]. my app use node.js
Asked
Active
Viewed 38 times
-1
-
You need to give us some code, or at least describe your libraries and what you have tried. – Alex Michailidis Nov 22 '17 at 08:57
-
Possible duplicate of [Writing files in Node.js](https://stackoverflow.com/questions/2496710/writing-files-in-node-js) – DragonBorn Nov 22 '17 at 08:58
-
All these information can be found in the documentations of Node.js... – KarelG Nov 22 '17 at 09:02
-
@alex-rokabilis What do you recommend about libraries? – AnonymousP Nov 22 '17 at 09:14
1 Answers
0
for making organized logs in nodejs you can use log4js . You can also build a new file with the current date name in your log directory and put your logs in it which this can be a help: write files in node-js
NaWeeD
- 561
- 5
- 15