96 Commits

Author SHA1 Message Date
Masaki Kobayashi
01042e234c feat: add missing typedef of removeColor option of file appender 2024-07-18 17:02:19 +09:00
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
Zachary Haber
0683535e0f
feat: add error property to LoggingEvent 2022-09-30 00:27:49 +08:00
Zachary Haber
22c7d224de
chore: separate out CallStack type from base LoggingEvent 2022-09-29 23:27: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
a8418a0c85
refactor(#1082): removed return value for log4js.shutdown() 2022-09-03 17:13:48 +08:00
Lam Wei Li
49e301df80
Merge branch 'master' into shutdown-type-consistent 2022-09-03 00:04:24 +08:00
Lam Wei Li
387e7123cb
type: corrected Recording interface 2022-07-26 15:43:09 +08:00
Lam Wei Li
11d4c2243a
type: corrected AppenderModule interface 2022-07-26 15:42:34 +08:00
Lam Wei Li
4bc5589a28
style: ran prettier 2022-07-26 03:07:06 +08:00
Taoz1
d06414cee9 fix: types of logger 2022-07-06 10:00:29 +08:00
Zachary Haber
e2640f234b feat(types): Make Appender type extensible via Appenders 2022-06-09 11:21:17 -05:00
marrowleaves
184986816f fix(types): add LogEvent.serialise 2022-05-25 11:27:11 +08:00
Lam Wei Li
e20e24f136
docs: updated fileAppender maxLogSize documentation 2022-05-20 01:30:26 +08:00
Lam Wei Li
d9d2d8d921
chore(type): added fileNameSep for FileAppender and DateFileAppender
- based on https://github.com/log4js-node/log4js-node/pull/1182
- based on https://github.com/log4js-node/log4js-node/pull/1181
2022-05-12 01:00:36 +08:00
Lam Wei Li
126e286c1a
chore(docs): updated documentation 2022-05-12 00:56:18 +08:00
Lam Wei Li
480c81aa9a
chore(docs): updated comments in typescript def
- based on faef3d20f643a9e1a29883f493cdbe893a47de77
- based on d894f573058d50f6c41e9048f46fadc037097b16
- based on e2947474c719d891b282858a4509fa8292f7ac22
- based on https://github.com/log4js-node/log4js-node/pull/1182
- based on https://github.com/log4js-node/log4js-node/pull/1181
2022-05-12 00:54:58 +08:00
Lam Wei Li
92e84db7df
chore(types): LogEvent types 2022-04-13 00:49:11 +08: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
Lam Wei Li
9e896aedce
fix(types): Logger constructor 2022-01-27 22:40:58 +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
Lam Wei Li
53248cd564
Merge pull request #1149 from log4js-node/migrate-daysToKeep-to-numBackups
chore(deps): migrated from daysToKeep to numBackups due to streamroller@^3.0.0
2022-01-19 23:33:19 +08:00
Lam Wei Li
d6b017e720
chore(docs): updated fileSync.md and misc comments 2022-01-19 23:30:10 +08:00
Lam Wei Li
d4617a730d
chore(deps): migrated from daysToKeep to numBackups due to streamroller@^3.0.0 2022-01-19 23:24:14 +08:00
Lam Wei Li
51ac865bef
Merge pull request #1103 from polo-language/recording-typescript
Expose recording in typescript
2022-01-19 02:04:45 +08:00
Lam Wei Li
653a20f1f1
Merge pull request #1028 from techmunk/master
Fix TCP appender with Webpack and Typescript
2022-01-19 02:02:43 +08:00
Lam Wei Li
c13915587d
Merge pull request #1079 from nicobao/improve-typedefs
feat(typing): improving @types for AppenderModule
2022-01-19 01:52:37 +08:00
Lam Wei Li
29e6949fc8
Merge pull request #1115 from ZLundqvist/improve-typedefs
fix(types): add level parameter declaration to Logger.log function
2022-01-12 02:35:26 +08:00
Zack Lundqvist
e7f6784e88 fix(formatting): remove spacing 2022-01-10 16:40:36 +01:00
Lam Wei Li
a9dc485e71
fix(types): logger level types 2022-01-10 11:25:20 +08:00
Lam Wei Li
82e38b212d
Merge pull request #1072 from saulzhong/master
fix(types): add defaultLevel parameter declaration to the function ge…
2022-01-10 11:16:58 +08:00
Lam Wei Li
b521274b0b
fix(types): logger _log() types 2022-01-10 10:46:41 +08:00
Lam Wei Li
d5dcf974d9
fix(types): union level type (Level | string) to the function getLevel 2022-01-10 10:41:35 +08:00
Lam Wei Li
855143b45c
Merge pull request #1031 from vdmtrv/fix/file-appender-types
fix: file appender types
2022-01-10 10:32:28 +08:00
Lam Wei Li
abecb0816e
fix: fileSync appender types 2022-01-10 10:28:39 +08:00
ZLundqvist
0a2e0da5ed fix(types): add level parameter declaration to Logger.log function 2022-01-07 14:24:20 +01:00
Angelo Polo
c5ea84764d test: Add typescript recording usage example 2021-11-11 11:50:24 +01:00
Angelo Polo
5b320e3b2f fix: Expose recording in typescript types 2021-11-11 10:51:57 +01:00
Nicolas Gimenez
03484d63a3 fix(typing): use any for Config for now 2021-06-20 22:29:57 +02:00
Richard Hinkamp
fc1ccbeb41 Shutdown cb arg can be undefined + always return null 2021-06-09 21:19:38 +02:00
Nicolas Gimenez
92666bf609 fix(formatting): rollback formatting changes 2021-05-13 17:13:52 +02:00
Nicolas Gimenez
5a45e75d5d feat(typing): improving @types for AppenderModule 2021-05-13 16:48:43 +02:00
saulzhong
db1a26556b fix(types): add defaultLevel parameter declaration to the function getLevel 2021-04-23 13:36:22 +08:00
Ventsislav Dimitrov
e14876a147 chore: remove duplicate backups type 2020-07-11 22:41:03 +01:00
Ventsislav Dimitrov
1cb9893a50 fix: file appender types 2020-07-11 22:38:54 +01:00
Techmunk
4075ec5b82 fix: tcp appender was missing from typescript typings 2020-06-16 20:39:42 +10:00
Gareth Jones
e231c04f13
Merge branch 'master' into feature/change_indentation_to_soft_tabs 2020-05-25 08:36:57 +10: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
Denys Rtveliashvili
d65cc3b21b Access to 'category' field of logger objects in TS 2020-05-06 18:02:58 +01:00