Lam Wei Li
6a8b706590
test(Logger): apart from asserting a throw, also assert the thrown error message
2022-10-02 01:15:06 +08:00
Zachary Haber
b1598c04c7
feat: add error to logging event from logger
2022-09-30 00:55:20 +08:00
Zachary Haber
0465894412
chore: tests for new parseCallStack functionality and changes
2022-09-29 23:27:50 +08: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
Pawel Soltys
4360da010f
FIX: missing test cases for %M, %C, %A and %F fields
2022-09-01 12:49:14 +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
Lam Wei Li
879e8c7646
refactor(test): forward-compatible with tap v15 when callback is removed from beforeEach and afterEach
...
in tap 15.0.0, libtap was added:
https://github.com/tapjs/libtap/compare/v0.3.0...v1.0.0#diff-e41924228a867ab0a0d8689f84ae6d826da70a0d65fc59ae2c69539035c4ef6aL905-L915
2022-07-25 22:37:42 +08:00
Lam Wei Li
5f617cc94b
refactor(test): added callback for beforeEach() and afterEach() for tap v14 downgrade
2022-07-25 22:37:32 +08:00
Zachary Haber
cad9555948
style: run prettier:fix
2022-06-23 01:00:07 +08:00
Lam Wei Li
496e318fcc
chore(test): added test cases
2022-03-21 13:18:11 +08:00
Lam Wei Li
442bab55b8
chore(test): improve test coverage for logger
...
lib/logger.js - Line 25 - catch (err) {
lib/logger.js - Line 26 - // will never get error unless nodejs has breaking changes to Error
lib/logger.js - Line 27 - console.error('log4js.logger - defaultParseCallStack error', err); // eslint-disable-line no-console
lib/logger.js - Line 28 - }
lib/logger.js - Line 29 - return null;
2022-03-12 00:39:51 +08:00
Lam Wei Li
c7c72cc879
refactor(test): tap v15 - removed callback from beforeEach() and afterEach()
...
c363aebf69
2022-01-26 20:12:53 +08:00
Gareth Jones
66fe30e9f4
chore: oh shit I changed the eslint rules
2019-08-01 16:57:32 +10:00
Romain
015d060ec5
test: add test for setParseCallbackFunction
2019-07-09 13:09:49 +02: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
cfb458c6c1
style: fix lint
2019-05-16 02:12:07 +08:00
Jimmy Hunag
ea0028b1cb
test: add callsite for devDeps & cover logger-test
2019-05-16 01:59:03 +08:00
Martin Heidegger
a06e2cc83c
chore: updated dependencies (including eslint)
2019-02-20 23:07:23 +09:00
Gareth Jones
d52734471d
fix(test): all tests passing except server
2018-02-05 07:04:46 +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
3de180710d
fix( #501 ): don't break when objects are weird
2017-07-14 08:50:41 +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
e45476f24d
fix(test): moved console, logger, logstash tests to tap
2016-12-27 18:52:38 +11:00