2

nodejs logging system, I want a beautiful console logging and also can save to log file, and also fast, async will be better.

The most difficult is , node-worker, which use std io to communicate with parent process, so if the logging system using std io, it can't work.

2 Answers 2

3

There are a lot of options given on this page, in the debugging section.

Sign up to request clarification or add additional context in comments.

1 Comment

They can if they can write to files. Either use a logfile per worker, or set the workers to send their messages to a single process, with a stream socket or a pipe or syslog.
0

I have looked through many loggers, and I wasn't able to find a lightweight solution - so I decided to make a simple solution that is posted on github.

  • Saves the file
  • Gives you a pretty output (we all love that)

I hope this helps you out.

SETUP

https://github.com/bluejamesbond/Scribe.js

PS: If there are any problems, I would be obliged if you can fix it and then do a pull request. Otherwise, you are more than welcome to post as an issue.

SAMPLE OUTPUT TO CONSOLE

enter image description here

SAMPLE DIRECTORY SETUP

enter image description here

SAMPLE OUTPUT FILE

enter image description here

1 Comment

Let me know if this works with node-worker. I feel that it should be easy to implement a queue that builds the outputs and then prints out as necessary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.