25 Commits

Author SHA1 Message Date
Lam Wei Li
e1efb82829
fix(LoggingEvent): serde for object with null prototype 2024-04-04 15:30:56 +08:00
Lam Wei Li
6f697ad317
fix(LoggingEvent): throws error for invalid location passed when creating a new LoggingEvent 2022-10-02 01:15:05 +08:00
Lam Wei Li
31ae2b258d
refactor(LoggingEvent): loop through location keys instead of hard-coding one-by-one 2022-10-02 00:54:50 +08:00
Lam Wei Li
6f9c436896
fix(LoggingEvent): serde for NaN, Infinity, -Infinity, undefined 2022-10-01 18:37:41 +08:00
Zachary Haber
0089e784b4
refactor: remove duck typing 2022-09-30 00:55:23 +08:00
Zachary Haber
0683535e0f
feat: add error property to LoggingEvent 2022-09-30 00:27:49 +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
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
Zachary Haber
cad9555948
style: run prettier:fix 2022-06-23 01:00:07 +08:00
Lam Wei Li
c0a63b3bc7
chore(fix): deserialise for enableCallStack features: filename, lineNumber, columnNumber, callStack 2022-04-13 00:27:33 +08:00
Lam Wei Li
cbfffd4d71
chore(dev): bump eslint-config-airbnb-base from 13.2.0 to 15.0.0 2022-03-14 16:31:03 +08:00
Lam Wei Li
1481ec6f62
Fixed ESLint no-restricted-globals error 2022-02-21 01:47:57 +08:00
Lam Wei Li
4fc8634fa9
Fixed serialise() for NaN, Infinity, -Infinity and undefined recursively 2022-02-21 01:47:56 +08:00
Lam Wei Li
ceb06bed61
Fixed serialise() for NaN, Infinity, -Infinity and undefined 2022-02-21 01:47:53 +08:00
Wataru Ashihara
a81500b7e6
style: conform @param to official style
ref. https://jsdoc.app/tags-param.html
2020-05-04 09:13:36 +09: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
LoneRifle
29c92211f2 fix(#789): use flatted in place of CircularJSON
CircularJSON is now deprecated, so replace it with its successor
and use it in the sole location where we used CircularJSON, ie
in the LoggingEvent serialization/deserialization functions

* npm - install flatted, remove circular-json
* LoggingEvent - use flatted for serialization/deserialization
* tests - acknowledge that flatted (and circular-json) should not
  parse anything other than their respective serialized payloads
  and use flatted when parsing/stringifying test data
2018-11-04 15:32:28 +08:00
Gareth Jones
bea20cc0ce chore: merged fix for stacktrace bug 2018-03-01 07:50:40 +11:00
Gareth Jones
3203efcb55 fix(json): removed try catch because circ json fixes typeerror 2018-02-08 08:12:17 +11:00
Gareth Jones
09a72eb17a fix(test): added coverage of serialisation 2018-02-07 08:25:02 +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
da703cdebb chore(merge): merged 2.4.1 from master 2017-12-13 08:35:46 +11:00
Gareth Jones
319562914b fix(tcp): interim commit while I work on something else 2017-12-12 08:03:57 +11:00