Skip to content

Commit 111fced

Browse files
authored
Merge pull request #747 from log4js-node/deprecate-logfaces-http
deprecated logFaces-HTTP appender
2 parents 83440fa + 29a238a commit 111fced

File tree

3 files changed

+8
-33
lines changed

3 files changed

+8
-33
lines changed

docs/appenders.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ The following appenders are included with log4js. Some require extra dependencie
2424
* [dateFile](dateFile.md)
2525
* [file](file.md)
2626
* [fileSync](fileSync.md)
27-
* [logFaces-HTTP](logFaces-HTTP.md)
2827
* [logFaces-UDP](logFaces-UDP.md)
2928
* [logLevelFilter](logLevelFilter.md)
3029
* [multiFile](multiFile.md)
@@ -39,6 +38,7 @@ The following appenders are supported by log4js, but will issue deprecation warn
3938

4039
* [gelf](https://github.com/log4js-node/gelf)
4140
* [hipchat](https://github.com/log4js-node/hipchat)
41+
* [logFaces-HTTP](https://github.com/log4js-node/logFaces-HTTP)
4242
* [loggly](https://github.com/log4js-node/loggly)
4343
* [logstashHTTP](https://github.com/log4js-node/logstashHTTP)
4444
* [logstashUDP](https://github.com/log4js-node/logstashUDP)

docs/logFaces-HTTP.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

lib/appenders/logFaces-HTTP.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
/**
2+
* This appender is deprecated. All bugfixes and improvements should be made in
3+
* https://github.com/log4js-node/logFaces-HTTP
4+
*
25
* logFaces appender sends JSON formatted log events to logFaces receivers.
36
* There are two types of receivers supported - raw UDP sockets (for server side apps),
47
* and HTTP (for client side apps). Depending on the usage, this appender
@@ -33,7 +36,7 @@ function logFacesAppender(config) {
3336
withCredentials: true
3437
});
3538

36-
return function log(event) {
39+
const appender = function log(event) {
3740
// convert to logFaces compact json format
3841
const lfsEvent = {
3942
a: config.application || '', // application name
@@ -58,6 +61,9 @@ function logFacesAppender(config) {
5861
console.error(`log4js.logFaces-HTTP Appender error: ${error.message}`);
5962
});
6063
};
64+
65+
appender.deprecated = '@log4js-node/logfaces-http';
66+
return appender;
6167
}
6268

6369
function configure(config) {

0 commit comments

Comments
 (0)