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

Adding custom logger is not working #289

Closed
watson opened this issue Mar 22, 2018 · 4 comments
Closed

Adding custom logger is not working #289

watson opened this issue Mar 22, 2018 · 4 comments
Assignees
Labels
Projects

Comments

@watson
Copy link
Member

watson commented Mar 22, 2018

Expected behavior

When using the logger config option it should be possible to overwrite the default logger.

Actual behavior

The logger config option just seems to be ignored (as pointed out in #232 (comment))

Steps to reproduce

  1. npm install pino
  2. Create a file just containing this:
    require('elastic-apm-node').start({
      logger: require('pino')()
    })
  3. The output in the console should be some like this:
    {"level":50,"time":1521726287091,"msg":"Elastic APM isn't correctly configured: Missing serviceName","pid":7540,"hostname":"watson.local","v":1}
    
    But because the custom logger isn't picked up, it's just:
    Elastic APM isn't correctly configured: Missing serviceName
    
@watson watson added the bug label Mar 22, 2018
@watson watson added this to Scheduled in Schedule Mar 23, 2018
@Qard Qard self-assigned this Apr 16, 2018
@Qard Qard closed this as completed in #299 Apr 25, 2018
Schedule automation moved this from Scheduled to Done Apr 25, 2018
Qard added a commit that referenced this issue Apr 25, 2018
@alvarolobato alvarolobato added this to the 1.5 milestone May 8, 2018
@prashant-shahi
Copy link

Can this logger configuration be used to save all the debug/info logs into a separate file?

@watson
Copy link
Member Author

watson commented Jan 7, 2019

@coolboi567 No, you need to supply a custom logger for that purpose. In the future, could you please ask questions in our Discuss forum or open a new issue?

@prashant-shahi
Copy link

@watson Sure would do from now on. Sorry for this but I saw that forum was not that active, and it took days before anyone reponds, that's why I choose to ask question in related issues like these.

@watson
Copy link
Member Author

watson commented Jan 8, 2019

@coolboi567 We respond just as fast here as in the forums. It was probably just because it was during the Christmas holiday 😃

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

No branches or pull requests

4 participants