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

info/warn level messages not showing... am I doing this right? #13

Open
fschwiet opened this issue Apr 2, 2014 · 3 comments
Open

info/warn level messages not showing... am I doing this right? #13

fschwiet opened this issue Apr 2, 2014 · 3 comments

Comments

@fschwiet
Copy link

fschwiet commented Apr 2, 2014

I am able to log errors via winston to both the console and Loggly fine. When I log warnings or info level messages, only the console receives them. Any idea what I am doing wrong? Here is how I configure winston-loggly:

transports.push(new winston.transports.Loggly({
    level: 'info',
    token: config.get("loggly_token"),
    subdomain: config.get("loggly_subdomain"),
    auth: {
        username: config.get("loggly_username"),
        password: config.get("loggly_password")
    },
    json: true,
    tags: config.get('is_production') ? ['production'] : []
}));
@fschwiet
Copy link
Author

fschwiet commented Apr 2, 2014

I haven't seen any level-related configuration on the loggly side. I believe I'm looking at all events on (on Loggly).

@sgb-io
Copy link

sgb-io commented Apr 3, 2015

+1, can't tell what I'm missing!
EDIT: I realised later that my winston config was being overwritten at some point, doh!

@snowinferno
Copy link

I had the same problem when I started up with Winston-loggly. I solved it by adding the following to the configuration object passed in to new winston.transports.loggly(config):
levels: Winston.config.npm.levels

For your configuration this would become:
{
levels: winston.config.npm.levels, // configure the transport to have a set of log levels
level: 'info',
token: config.get("loggly_token"),
subdomain: config.get("loggly_subdomain"),
auth: {
username: config.get("loggly_username"),
password: config.get("loggly_password")
},
json: true,
tags: config.get('is_production') ? ['production'] : []
}

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

3 participants