19 Commits

Author SHA1 Message Date
Lam Wei Li
df8931703b
feat: added log4js.isConfigured() API 2023-02-20 13:31:02 +08:00
Lam Wei Li
317282fc45
type: updated Configuration.levels type to allow for custom log levels 2022-11-17 14:41:47 +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
Lam Wei Li
4bc5589a28
style: ran prettier 2022-07-26 03:07:06 +08:00
Zachary Haber
e2640f234b feat(types): Make Appender type extensible via Appenders 2022-06-09 11:21:17 -05:00
Lam Wei Li
05a64ff1fe
chore(test): improve test coverage for log4js
log4js.js - Line 83 - return recordingModule
2022-03-07 23:38:08 +08:00
David Glasser
58234af1f6 Make typings match code better
Fixes v6.4.0 regressions.

There is an npm script `npm run typings` which actually failed before
this commit. This seems to have been a combination of incorrect typings
(a mandatory argument to `getLevel` that should be optional, the idea
that for custom appenders `configure` should return an intermediate
"generator" function before the appender function itself) as well as
mistakes in the test file (which had an appender module which had one
level of function nesting too few).

Specifically, for the `configure` function on appenders, I believe there
should be two levels of function: an outer function taking one-time
configuration, and an inner function taking an individual log messages.
The typings file wanted there to be three layers, and the test file
wanted there to be one layer.

Fixes #1155.
2022-01-21 10:50:55 -08:00
Angelo Polo
c5ea84764d test: Add typescript recording usage example 2021-11-11 11:50:24 +01:00
abetomo
e27926a08e style(indentation): change indentation to soft tabs
The JavaScript code was indented with spaces, so I adjusted it.
2020-05-22 15:58:49 +09:00
aaropn-edwards
a1197982e2 fix: Adds guards for undefiend callback functions in shutdown method
This fixes issue #971
2019-11-21 10:14:17 +11:00
Gareth Jones
39cd2ef3f6 docs: added explanation of passing appender module in config, and types 2019-06-26 07:57:28 +10:00
leak4mk0
340fafb749 Fix type definition. 2019-05-12 09:22:40 +09:00
Philip White
22c13dd08e fix: Document log-format function, allow it in TypeScript 2018-07-27 12:57:25 -07:00
Nico Jansen
18ad653044 fix(typings): correctly type the levels property 2018-07-04 18:16:41 +02:00
LongYinan
9a049d604e
fix(types): loose type restrict in Logger 2018-05-28 15:22:29 +08:00
Peter Safranek
d39b5eb36b fix(#709): strict Log4js typings
* Strictly type the exported Log4js interface.
* Test the typings for strictness using the TypesScript compiler.
2018-05-12 19:26:56 -07:00
Ilja Denisovs
fe07ab2e75 fix(types): Added return type for configure(...). 2018-02-15 11:49:44 +02:00
taoqf
02c6ebbb2d fix: add typescript definition 2017-10-16 13:43:41 +08:00
taoqf
589c9d3269 fix: add type defination 2017-10-12 15:27:09 +08:00