Skip to content

Commit

Permalink
chore: added loggly deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Gareth Jones committed Feb 25, 2018
1 parent 9700cf5 commit 42249dc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 38 deletions.
2 changes: 1 addition & 1 deletion docs/appenders.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ The following appenders are included with log4js. Some require extra dependencie
* [hipchat](hipchat.md)
* [logFaces-HTTP](logFaces-HTTP.md)
* [logFaces-UDP](logFaces-UDP.md)
* [loggly](loggly.md)
* [logLevelFilter](logLevelFilter.md)
* [logstashHTTP](logstashHTTP.md)
* [logstashUDP](logstashUDP.md)
Expand All @@ -47,6 +46,7 @@ The following appenders are included with log4js. Some require extra dependencie
The following appenders are supported by log4js, but will issue deprecation warnings from version 2.6 onwards - they will be removed from the log4js core in version 3. If you are using these appenders, you should alter your dependencies to include them explicitly.

* [gelf](https://github.com/log4js-node/gelf)
* [loggly](https://github.com/log4js-node/loggly)

For example, if you were previously using the gelf appender (`type: 'gelf'`) then you should add `@log4js-node/gelf` to your dependencies and change the type to `type: '@log4js-node/gelf'`.

Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ There have been a few changes between log4js 1.x and 2.x (and 0.x too). You shou
* [file appender](file.md), with configurable log rolling based on file size or [date](dateFile.md)
* [SMTP appender](smtp.md)
* [GELF appender](https://github.com/log4js-node/gelf)
* [Loggly appender](loggly.md)
* [Loggly appender](https://github.com/log4js-node/loggly)
* [Logstash UDP appender](logstashUDP.md)
* logFaces ([UDP](logFaces-UDP.md) and [HTTP](logFaces-HTTP.md)) appender
* [multiprocess appender](multiprocess.md) (useful when you've got multiple servers but want to centralise logging)
Expand Down
36 changes: 0 additions & 36 deletions docs/loggly.md

This file was deleted.

7 changes: 7 additions & 0 deletions lib/appenders/loggly.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

'use strict';

/**
* This appender has been deprecated.
* Updates and bug fixes should be made against https://github.com/log4js-node/loggly
*/
const debug = require('debug')('log4js:loggly');
const loggly = require('loggly');
const os = require('os');
Expand Down Expand Up @@ -105,6 +109,9 @@ function logglyAppender(config, layout) {
}
};

// trigger a deprecation warning, with a pointer to the replacement lib
app.deprecated = '@log4js-node/loggly';

return app;
}

Expand Down

0 comments on commit 42249dc

Please sign in to comment.