21 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
6f9c436896
fix(LoggingEvent): serde for NaN, Infinity, -Infinity, undefined 2022-10-01 18:37:41 +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 "l0ner" Soltys
dd3051d9ed
FIX: typo in LoggingEvent test
Co-authored-by: Lam Wei Li <peteriman@mail.com>
2022-09-01 19:28:45 +08:00
Pawel Soltys
6ea3e43c62 FIX: add missing field to test 2022-09-01 13:02:43 +02:00
Pawel Soltys
5f988bd097 FIX: remove unneeded test cases 2022-09-01 12:54:26 +02: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
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
4f1111ee40
chore(lint): added specific eslint rule(s) to disable for clarity 2022-03-12 01:25:39 +08:00
Lam Wei Li
a3f172f1cb
Fixed ESLint radix error 2022-02-21 01:47:58 +08:00
Lam Wei Li
0f13656cf2
Added test cases 2022-02-21 01:47:56 +08:00
Gareth Jones
66fe30e9f4 chore: oh shit I changed the eslint rules 2019-08-01 16:57:32 +10:00
Jimmy Huang
911693f294 chore: fix typo 2019-05-16 10:44:54 +08:00
Jimmy Hunag
c7bac4c39c test: cover LoggingEvent-test 2019-05-16 02:09:17 +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
09a72eb17a fix(test): added coverage of serialisation 2018-02-07 08:25:02 +11:00