Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot add loggly transport to the newest winston #52

Open
piotr-s-brainhub opened this issue Jan 5, 2018 · 1 comment
Open

cannot add loggly transport to the newest winston #52

piotr-s-brainhub opened this issue Jan 5, 2018 · 1 comment

Comments

@piotr-s-brainhub
Copy link

Node: 8.6.0
npm: 5.2.0
OS: Mac OS X 10.12.6
winston: 3.0.0-rc1
winston-loggly: 1.3.1

I'm trying to use winston-loggly as in the README.md and it doesn't work.

const winston = require('winston');
require('winston-loggly');

const options = {
  inputToken: process.env.LOGGLY_TOKEN,
  subdomain: process.env.LOGGLY_ORG,
};
winston.add(winston.transports.Loggly, options);

I obtain:

/Users/foo/programming/my-logger/node_modules/winston-transport/legacy.js:17
    throw new Error('Invalid transport, must be an object with a log method.');
    ^

Error: Invalid transport, must be an object with a log method.
    at new LegacyTransportStream (/Users/foo/programming/my-logger/node_modules/winston-transport/legacy.js:17:11)
    at DerivedLogger.add (/Users/foo/programming/my-logger/node_modules/winston/lib/winston/logger.js:277:7)
    at Object.winston.(anonymous function) [as add] (/Users/foo/programming/my-logger/node_modules/winston/lib/winston.js:84:34)
    at Object.<anonymous> (/Users/foo/programming/my-logger/1.js:8:9)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)
@piotr-s-brainhub
Copy link
Author

Fixed in #53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant