26 Commits

Author SHA1 Message Date
Gareth Jones
8627f743ef fix(#614): bumped deps of debug, date-format, streamroller 2017-11-17 08:47:45 +11:00
Gareth Jones
f266757fcf fix(cluster): add flag to turn off the cluster support 2017-09-25 09:47:03 +10:00
Gareth Jones
3de180710d fix(#501): don't break when objects are weird 2017-07-14 08:50:41 +10:00
Gareth Jones
58e65543fa fix(cluster): removed cluster appender, moved cluster handling into core 2017-07-07 08:48:17 +10:00
Gareth Jones
d27ae8694e fix(logger): logger levels now shared across instances of same category 2017-04-28 08:29:14 +10:00
Gareth Jones
dd208520d8 fix(logFaces): split logfaces into UDP+HTTP, added context to loggers 2017-03-15 10:01:13 +11:00
Gareth Jones
4333261721 fix(levels): added level configuration, fixed smtp appender 2017-03-09 08:28:41 +11:00
Gareth Jones
1d50b82a96 refactor: fixed a few more appenders 2017-02-07 08:53:51 +11:00
Gareth Jones
5283782ba0 refactor(all): basic logging to stdout works again
- removed config reloading
- removed console replacement
- added recording appender
- added config validation
- changed config format
2017-02-05 10:05:49 +11:00
e-cloud
7d9dc55ff2 style: upgrade eslint and format the code
no logic changed.
2016-12-12 21:04:34 +08:00
e-cloud
02d6c017f4 Merge branch 'master'
Conflicts:
	.travis.yml
	lib/appenders/dateFile.js
	lib/appenders/file.js
	lib/appenders/fileSync.js
	lib/appenders/gelf.js
	lib/appenders/logFacesAppender.js
	lib/date_format.js
	lib/debug.js
	lib/layouts.js
	lib/log4js.js
	lib/log4js.json
	lib/logger.js
	lib/streams/BaseRollingFileStream.js
	lib/streams/DateRollingFileStream.js
	lib/streams/RollingFileStream.js
	lib/streams/index.js
	package.json
	test/layouts-test.js
	test/streams/BaseRollingFileStream-test.js
	test/streams/DateRollingFileStream-test.js
	test/streams/rollingFileStream-test.js
2016-12-12 17:42:34 +08:00
Nathan Woltman
0af3f1607f Improve core logging performance
Allow V8 to optimize functions by not leaking the arguments object.
This results in a performance improvement of about 20%.
2016-11-10 12:32:53 -05:00
Gareth Jones
2b84671471 changed default appender to stdout, replaced streams with streamroller, started removal of vows tests 2016-10-23 11:50:53 +11:00
e-cloud
495d87c521 refactor: fallback some code to support Node.js v4
1. reintroduce `semver` to support code >=4 && <6
2. fallback syntax like rest parameter and default parameter
3. update `sandboxed-module` to fix "strict mode error"
2016-07-18 15:42:05 +08:00
e-cloud
9cc3a88bd7 refactor: more small refactor
1. drop semver related code with no need to detect node version
2. drop license declaration in log4js.js for there is one in the project dir
3. other changes
2016-07-16 13:49:24 +08:00
e-cloud
8f6d69ba01 refactor: logger.js
turn the old style `exports` to the new style `module.exports`
2016-07-14 22:07:56 +08:00
e-cloud
5328e03802 refactor: just format code according to the editor config(tests passed) 2016-07-14 17:36:30 +08:00
Blake Ambrose
8e0a0f9f53 Added ability to add custom log levels to client, simillar to log4j for java 2016-06-08 11:51:36 +10:00
Nathan Woltman
c99783031f Improve logging performance
Allow V8 to optimize the logging functions by not leaking the arguments object
and reduce the number of object accesses in the toLevel function.
This results in a performance improvement of about 11%.
2016-02-07 19:53:05 -05:00
Gareth Jones
adeb714243 made calling logger.log safe if level is not provided as first argument (github issue #279) 2015-04-17 08:31:12 +10:00
Luis Malheiro
6fa998408a Adds subcategories to the appenders and loggers. Adds property "level" at the file appender to limit the levels that a file appender accepts.
Creates a MARK category that always write to the log. That's useful to write things like '---- STARTED ----'.
2014-08-29 16:33:32 +02:00
Gareth Jones
e4d5228f2b Merge branch 'flush-on-exit' 2014-04-09 07:37:17 +10:00
John Engler
633ed3cddb Support for disabling log writes on shutdown.
Updated logger.js to support disabling all log writes.
Updated log4js.js shutdown function to disable log writes.
Added tests.
Update gitignore to ignore rolling date stream's test output.
2014-04-07 19:06:29 -07:00
jci-fox
22c156582f Adding level checks on dynamic logging
using levels.toLevel and this.isLevelEnabled prior to emiting the event will prevent the appenders from being notified if the log level provided is below the loggers level.
2014-03-04 09:08:27 -06:00
Gareth Jones
46ae1a586d more linting 2013-05-30 08:26:26 +10:00
Gareth Jones
a046523804 Moved Logger into separate file, added support for loading appenders outside log4js, removed 'name' from appender requirements 2012-06-01 11:11:07 +10:00