Skip to content

Commit

Permalink
Merge pull request #747 from log4js-node/deprecate-logfaces-http
Browse files Browse the repository at this point in the history
deprecated logFaces-HTTP appender
  • Loading branch information
nomiddlename committed Jul 5, 2018
2 parents 83440fa + 29a238a commit 111fced
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 33 deletions.
2 changes: 1 addition & 1 deletion docs/appenders.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ The following appenders are included with log4js. Some require extra dependencie
* [dateFile](dateFile.md)
* [file](file.md)
* [fileSync](fileSync.md)
* [logFaces-HTTP](logFaces-HTTP.md)
* [logFaces-UDP](logFaces-UDP.md)
* [logLevelFilter](logLevelFilter.md)
* [multiFile](multiFile.md)
Expand All @@ -39,6 +38,7 @@ The following appenders are supported by log4js, but will issue deprecation warn

* [gelf](https://github.com/log4js-node/gelf)
* [hipchat](https://github.com/log4js-node/hipchat)
* [logFaces-HTTP](https://github.com/log4js-node/logFaces-HTTP)
* [loggly](https://github.com/log4js-node/loggly)
* [logstashHTTP](https://github.com/log4js-node/logstashHTTP)
* [logstashUDP](https://github.com/log4js-node/logstashUDP)
Expand Down
31 changes: 0 additions & 31 deletions docs/logFaces-HTTP.md

This file was deleted.

8 changes: 7 additions & 1 deletion lib/appenders/logFaces-HTTP.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/**
* This appender is deprecated. All bugfixes and improvements should be made in
* https://github.com/log4js-node/logFaces-HTTP
*
* logFaces appender sends JSON formatted log events to logFaces receivers.
* There are two types of receivers supported - raw UDP sockets (for server side apps),
* and HTTP (for client side apps). Depending on the usage, this appender
Expand Down Expand Up @@ -33,7 +36,7 @@ function logFacesAppender(config) {
withCredentials: true
});

return function log(event) {
const appender = function log(event) {
// convert to logFaces compact json format
const lfsEvent = {
a: config.application || '', // application name
Expand All @@ -58,6 +61,9 @@ function logFacesAppender(config) {
console.error(`log4js.logFaces-HTTP Appender error: ${error.message}`);
});
};

appender.deprecated = '@log4js-node/logfaces-http';
return appender;
}

function configure(config) {
Expand Down

0 comments on commit 111fced

Please sign in to comment.