Sails version: 0.12.13
Node version: 6.10.2
NPM version: 3.10.10
DB adapter name: N/A
DB adapter version: N/A
Operating system: Ubuntu 16.04
I'm unable to run Sails along with Winston. Looks that Sails is executing a sort of binding.
The main error is:
Uncaught TypeError: this.write is not a function
I found a workaround doing the following:
let winstonLogger = createLogger(loggerSettings);
let logger = {
'info': function () {
winstonLogger.info(...arguments);
},
'debug': function () {
winstonLogger.debug(...arguments);
},
'error': function () {
winstonLogger.error(...arguments);
},
'warn': function () {
winstonLogger.warn(...arguments);
},
'log': function () {
winstonLogger.log(...arguments);
}
};
// End of workaround
module.exports.log = {
custom: logger,
inspect: false
};
Sails version: 0.12.13
Node version: 6.10.2
NPM version: 3.10.10
DB adapter name: N/A
DB adapter version: N/A
Operating system: Ubuntu 16.04
I'm unable to run Sails along with Winston. Looks that Sails is executing a sort of binding.
The main error is:
Uncaught TypeError: this.write is not a functionI found a workaround doing the following: