Benoît Lefèvre
0632c2197e
feat issue #1341 (Layouts) : taking into account code review's feedback
2022-12-03 22:49:28 +01:00
Benoît Lefèvre
e01c3c7bbf
feat issue #1341 (Layouts) : use split instead of regexp
2022-11-30 23:21:46 +01:00
Benoît Lefèvre
ab43399200
feat issue #1341 (Layouts) : fix typo & add related doc entry
2022-11-28 10:04:25 +01:00
Benoît Lefèvre
aedef32bb9
feat issue #1341 (Layouts) : support a specifier on %m
2022-11-14 02:13:14 +01:00
Lam Wei Li
2523e17a15
chore(deps-dev): bump prettier from 1.19.1 to 2.7.1
2022-09-28 17:22:38 +08:00
Lam Wei Li
462e35a1fb
refactor( #1316 ): code flow and readability (%C:class, %M:function, %A:alias, %F:full - in order)
2022-09-01 21:54:54 +08:00
Pawel Soltys
397b06e15f
FEAT: documentation for %F field
2022-09-01 12:48:10 +02:00
Pawel Soltys
03b3f50870
FEAT: added %F field containing fully qualified caller name
2022-08-29 15:11:04 +02:00
Pawel Soltys
396a4de469
FEAT: patternLayout function name, class name and function alias
...
Added to patternLayout the following fields:
- %M - function name of the caller issuing the logging request
- %C - class name of the caller issuing the logging request
- %A - function alias of the caller issuing the logging request
The first two come from log4j, and use the same field specifiers.
When called from method bar of a Class foo:
- %M will be replaced with bar
- %C will be replaced with Foo
- %A will be empty
When called from function foo:
- %M will be replaced with foo
- %C will be empty
- %A will be empty
%A will be non empty only if the call stack parsed to obtain the values
contains string [as foo].
2022-08-27 22:00:53 +02:00
Lam Wei Li
4bc5589a28
style: ran prettier
2022-07-26 03:07:06 +08:00
Zachary Haber
cad9555948
style: run prettier:fix
2022-06-23 01:00:07 +08:00
Lam Wei Li
24651f36d5
style: white-space
2022-05-20 01:06:48 +08:00
Lam Wei Li
b4c45b564b
chore(fix): fileDepth for ESM
2022-04-11 00:57:13 +08:00
Tobias Speicher
aeff6dc882
refactor: replace deprecated String.prototype.substr()
...
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-03-27 01:47:47 +01:00
Lam Wei Li
7534f9c25f
chore(test): added test coverage for deprecation notices
2022-03-15 15:57:53 +08:00
Lam Wei Li
03f74493a9
chore(lint): should not disable eslint rule, quote-props, in file-level
2022-03-12 15:43:53 +08:00
Lam Wei Li
235656df8d
chore(lint): should not disable eslint rule, no-cond-assign, in file-level
2022-03-12 15:43:05 +08:00
Lam Wei Li
3226b3de40
emit deprecation
2022-01-23 21:26:45 +08:00
Lam Wei Li
26ed377d6c
fixed eslint
2022-01-23 21:20:34 +08:00
Lam Wei Li
bedbc4152f
refactor date pattern names for clarity (when %date actually means %datetime)
2022-01-23 21:20:26 +08:00
Gareth Jones
2f45b084fb
fix: truncation and padding for stacktraces
2019-10-22 08:58:46 +11:00
Gareth
5addabd6f6
chore: changes to get tests passing on windows
2019-08-16 14:26:39 +10:00
Gareth Jones
66fe30e9f4
chore: oh shit I changed the eslint rules
2019-08-01 16:57:32 +10:00
Gareth Jones
edf2535130
chore: improved layouts test coverage
2019-08-01 15:05:28 +10:00
Romain
e70d13200c
feat: add delimiter for fileName depth to %f layout patern
2019-07-09 11:00:49 +02:00
Jimmy Huang
911693f294
chore: fix typo
2019-05-16 10:44:54 +08:00
Jimmy Hunag
5da824e2ff
feat: add line number, column position and filename support
2019-05-16 00:45:46 +08:00
Bjorn Stromberg
027f2567b6
fix(layout): Use level as a string for node v12 ( Fixes #859 )
2019-04-24 15:21:47 +09:00
Martin Heidegger
a06e2cc83c
chore: updated dependencies (including eslint)
2019-02-20 23:07:23 +09:00
Gareth Jones
09c02e0b39
fix: all tests passing now with updated streamroller
2019-01-24 08:33:15 +11:00
Gareth Jones
20a6b295a5
fix: removed the custom inspect thing as it was only need for node < 6
2018-07-13 09:44:23 +10:00
Teamop
095ede2bdf
fix( #730 ): make the red color lighter for error
2018-06-18 17:33:55 +08:00
Gareth Jones
906a77403d
chore(lint): added linting to test files
2017-11-14 08:45:22 +11:00
Gareth Jones
78d9e3568e
fix( #252 ): stacktraces in different vm context
2017-07-26 08:54:25 +10:00
Gareth Jones
bff675fd9b
fix(cluster): removed pattern layout cluster, because it would not work
2017-07-07 09:12:10 +10:00
Gareth Jones
0d10e2ade5
feat(levels): custom colours for levels in config #90 #254
2017-07-02 23:52:29 +10:00
Jorge Silva
6e15364ef5
feat( #130 ): Add support for MDC in pattern layout
2017-06-17 13:59:06 +01:00
Jan Peter Stotz
2c7cbf0d41
bugfix for issue #457 : pattern %z (process id) can not be padded/truncated
2017-03-27 14:26:02 +02:00
Gareth Jones
6838fcdb93
fix(test): date_format -> external lib, dateFile test -> tap
2016-12-30 18:01:50 +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
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
95f3b537f4
refactor: layouts.js
2016-07-14 22:10:53 +08:00
e-cloud
5328e03802
refactor: just format code according to the editor config(tests passed)
2016-07-14 17:36:30 +08:00
Gareth Jones
08315bbfb9
Fix for stack traces appearing twice in node v6 - issue #389
2016-06-15 09:35:08 +10:00
Gareth Jones
538c34c8f4
fixed a few more jshint problems (turned a couple off as well)
2016-05-05 16:37:15 +10:00
Gareth Jones
97fc892c00
fixing some jshint errors
2016-04-29 09:11:17 +10:00
Alexei Tarnakin
5e428cb58e
Returned layout support in logstashUDP appender. Tests added
2015-10-30 16:15:18 +03:00