Invalid transport, must be an object with a log method.
khaitranhq opened this issue · 1 comments
khaitranhq commented
Hi, I'm new to winston-logtash
.
I run demo code :
var winston = require('winston');
//
// Requiring `winston-logstash` will expose
// `winston.transports.Logstash`
//
require('winston-logstash');
winston.add(winston.transports.Logstash, {
port: 28777,
node_name: 'my node name',
host: '127.0.0.1'
});
and I got:
Error: Invalid transport, must be an object with a log method.
at new LegacyTransportStream (/mnt/01D5E4BA635766E0/Coding/Projects/offshorevn/offshorevn-log-analysis/node_modules/winston-transport/legacy.js:18:11)
at DerivedLogger.add (/mnt/01D5E4BA635766E0/Coding/Projects/offshorevn/offshorevn-log-analysis/node_modules/winston/lib/winston/logger.js:345:11)
at Object.winston.<computed> [as add] (/mnt/01D5E4BA635766E0/Coding/Projects/offshorevn/offshorevn-log-analysis/node_modules/winston/lib/winston.js:110:68)
at Object.<anonymous> (/mnt/01D5E4BA635766E0/Coding/Projects/offshorevn/offshorevn-log-analysis/index.js:9:9)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47
Versions:
"winston": "^3.2.1",
"winston-logstash": "^0.4.0"
Thanks for any helps
jaakkos commented
Please see the updated README.md