2019-08-31 04:07:25 +05:00
|
|
|
/**
|
|
|
|
* Built-in Log Configuration
|
|
|
|
* (sails.config.log)
|
|
|
|
*
|
|
|
|
* Configure the log level for your app, as well as the transport
|
|
|
|
* (Underneath the covers, Sails uses Winston for logging, which
|
|
|
|
* allows for some pretty neat custom transports/adapters for log messages)
|
|
|
|
*
|
|
|
|
* For more information on the Sails logger, check out:
|
|
|
|
* https://sailsjs.com/docs/concepts/logging
|
|
|
|
*/
|
|
|
|
|
2022-08-22 18:42:56 -04:00
|
|
|
const { customLogger } = require('../utils/logger');
|
|
|
|
|
2019-08-31 04:07:25 +05:00
|
|
|
module.exports.log = {
|
2019-11-05 18:01:42 +05:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Valid `level` configs: i.e. the minimum log level to capture with
|
|
|
|
* sails.log.*()
|
|
|
|
*
|
|
|
|
* The order of precedence for log levels from lowest to highest is:
|
|
|
|
* silly, verbose, info, debug, warn, error
|
|
|
|
*
|
|
|
|
* You may also set the level to "silent" to suppress all logs.
|
|
|
|
*
|
|
|
|
*/
|
2022-08-22 18:42:56 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Passthrough plain log message(s) to
|
|
|
|
* custom Winston console and file logger.
|
|
|
|
*
|
|
|
|
* Note that Winston's log levels override Sails' log levels.
|
|
|
|
* Refer: https://github.com/winstonjs/winston#logging
|
|
|
|
*/
|
|
|
|
custom: customLogger,
|
|
|
|
inspect: false,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Removes the Sail.js init success logs
|
|
|
|
* (ASCII ship art) for production instances.
|
|
|
|
*/
|
|
|
|
noShip: process.env.NODE_ENV === 'production',
|
2019-08-31 04:07:25 +05:00
|
|
|
};
|