repo_description: Parse Server for Node.js / Express
repo_topics: baas backend file-storage graphql graphql-api graphql-relay graphql-server hacktoberfest mbaas mongodb nodejs notifications object-storage parse-platform parse-server postgres relay rest-api
code: 'use strict';
  import defaults from './defaults';
  import { WinstonLoggerAdapter } from './Adapters/Logger/WinstonLoggerAdapter';
  import { LoggerController } from './Controllers/LoggerController';
  
  // Used for Separate Live Query Server
  function defaultLogger() {
    const options = {
      logsFolder: defaults.logsFolder,
      jsonLogs: defaults.jsonLogs,
      verbose: defaults.verbose,
      silent: defaults.silent,
    };
    const adapter = new WinstonLoggerAdapter(options);
    return new LoggerController(adapter, null, options);
  }
  
  let logger = defaultLogger();
  
  export function setLogger(aLogger) {
    logger = aLogger;
  }
  
  export function getLogger() {
    return logger;
  }
  
  // for: `import logger from './logger'`
  Object.defineProperty(module.exports, 'default', {
    get: getLogger,
  });
  
  // for: `import { logger } from './logger'`
  Object.defineProperty(module.exports, 'logger', {
    get: getLogger,
  });
  