Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
fix(logger): cleaning up unused parameters in logger setup (#1521)
Browse files Browse the repository at this point in the history
  • Loading branch information
lirantal authored Sep 19, 2016
1 parent 015a430 commit 89e8d13
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions config/lib/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@ logger.stream = {
/**
* Instantiate a winston's File transport for disk file logging
*
* @param logger a valid winston logger object
*/
logger.setupFileLogger = function setupFileLogger(options) {
logger.setupFileLogger = function setupFileLogger() {

var fileLoggerTransport = this.getLogOptions();
if (!fileLoggerTransport) {
Expand Down Expand Up @@ -72,13 +71,9 @@ logger.setupFileLogger = function setupFileLogger(options) {
*
* Returns a Winston object for logging with the File transport
*/
logger.getLogOptions = function getLogOptions(configOptions) {
logger.getLogOptions = function getLogOptions() {

var _config = _.clone(config, true);
if (configOptions) {
_config = configOptions;
}

var configFileLogger = _config.log.fileLogger;

if (!_.has(_config, 'log.fileLogger.directoryPath') || !_.has(_config, 'log.fileLogger.fileName')) {
Expand Down Expand Up @@ -141,6 +136,6 @@ logger.getLogFormat = function getLogFormat() {
return format;
};

logger.setupFileLogger({});
logger.setupFileLogger();

module.exports = logger;

0 comments on commit 89e8d13

Please sign in to comment.