Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 04c85ec

Browse files
author
Gareth Jones
committed
brief description of the log setup
1 parent 07d925e commit 04c85ec

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

‎README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
11
log4js-example
22
==============
33

4-
A full application that demonstrates how to configure log4js
4+
A full express application that demonstrates how to configure log4js for the most common use-case.
5+
6+
To run:
7+
```
8+
npm install
9+
npm start
10+
```
11+
12+
Log config
13+
==========
14+
Config file is in `config/log4js.json`. It defines three appenders that are children of the clustered appender. The clustered appender makes sure that only the master process writes to the log files, otherwise having multiple processes try to write at the same time will cause problems. Three log files are defined: `log/app.log` gets all the log messages and is configured to rotate when the file gets to 10Mb in size, keeping 3 backups of the file; `log/errors.log` uses the logLevelFilter to only get ERROR messages; `log/access.log` contains only the http request logs, using the connect-logger, and is configured to rotate every day.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /