abernh
76f91427ba
fix(logger.log): warn on invalid log-level
...
a warning is logged if the `log` method is used with an unknown log-level
this happens whenever people confuse the `log` method with yet another log-level-short method (like in the browser console.log)
adjusted `newLevel-test` accordingly
rel: https://github.com/log4js-node/log4js-node/issues/1042
Signed-off-by: abernh <a.bernhard@23go.de>
2021-02-23 12:02:15 +01:00
Gareth Jones
8db199f08f
chore: more eslint fallout
2019-08-07 08:26:04 +10:00
Gareth Jones
66fe30e9f4
chore: oh shit I changed the eslint rules
2019-08-01 16:57:32 +10:00
Gareth Jones
42d38e6236
docs: fixed a couple of spelling errors
2019-07-10 08:46:15 +10:00
Romain
4f9e2a3b86
feat: allow to change default way to parse callstack
2019-07-09 11:54:38 +02:00
Gareth Jones
b51d8b0994
chore: removed unused lines
2019-05-23 08:15:13 +10:00
Jimmy Huang
ea6cbf06b0
test: add output '' when callstack info not exist
2019-05-20 11:39:19 +08:00
Jimmy Huang
c49ea03ca6
revert: remove global useCallStack
2019-05-17 15:10:39 +08:00
Jimmy Hunag
a564ce4b5f
test: add & fix test
2019-05-16 23:30:16 +08:00
Jimmy Huang
911693f294
chore: fix typo
2019-05-16 10:44:54 +08:00
Jimmy Hunag
ea0028b1cb
test: add callsite for devDeps & cover logger-test
2019-05-16 01:59:03 +08:00
Jimmy Hunag
5da824e2ff
feat: add line number, column position and filename support
2019-05-16 00:45:46 +08:00
Gareth Jones
7234e3ada3
chore(coverage): removed unused check
2018-02-08 08:30:42 +11:00
Gareth Jones
8084e80027
fix(tests): tests failing - config listeners not working in sandbox
2018-01-17 08:24:50 +11:00
Gareth Jones
319562914b
fix(tcp): interim commit while I work on something else
2017-12-12 08:03:57 +11:00
Gareth Jones
6f4dfeaafc
Merge branch 'master' into tcp-refactor
2017-11-21 08:17:47 +11:00
Gareth Jones
8627f743ef
fix( #614 ): bumped deps of debug, date-format, streamroller
2017-11-17 08:47:45 +11:00
Gareth Jones
aeed9d6c92
fix(tcp): moved serialisation code to logevent
2017-10-12 08:31:54 +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