Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TCP appender with Webpack and Typescript #1028

Merged
merged 2 commits into from Jan 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/appenders/index.js
Expand Up @@ -17,6 +17,7 @@ coreAppenders.set('noLogFilter', require('./noLogFilter'));
coreAppenders.set('file', require('./file'));
coreAppenders.set('dateFile', require('./dateFile'));
coreAppenders.set('fileSync', require('./fileSync'));
coreAppenders.set('tcp', require('./tcp'));

const appenders = new Map();

Expand Down
18 changes: 18 additions & 0 deletions types/log4js.d.ts
Expand Up @@ -236,6 +236,23 @@ export interface StandardOutputAppender {
layout?: Layout;
}

/**
* TCP Appender
*
* @see https://log4js-node.github.io/log4js-node/tcp.html
*/
export interface TCPAppender {
type: 'tcp';
// defaults to 5000
port?: number
// defaults to localhost
host?: string
// default to __LOG4JS__
endMsg?: string
// defaults to a serialized log event
layout?: Layout;
}

export interface CustomAppender {
type: string | AppenderModule;
[key: string]: any;
Expand All @@ -257,6 +274,7 @@ export type Appender = CategoryFilterAppender
| RecordingAppender
| StandardErrorAppender
| StandardOutputAppender
| TCPAppender
| CustomAppender;

export interface Levels {
Expand Down