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

application name not prepended to logs #10

Closed
pkoniu opened this issue May 18, 2018 · 1 comment
Closed

application name not prepended to logs #10

pkoniu opened this issue May 18, 2018 · 1 comment

Comments

@pkoniu
Copy link

pkoniu commented May 18, 2018

Found another one (this time on 2.3.0). So I have a file in my project that looks exactly like this:

const roarr = require('roarr').default;

global.ROARR.prepend = {
  ...global.ROARR.prepend,
  application: 'test-app',
};

module.exports = settings => roarr.child(settings);

And then I require that file everywhere where needed and create a child with additional property namespace. Like this:

const loggerFactory = require('./logger-factory');
const logger = loggerFactory({ namespace: 'test-namespace' });
logger.info('lorem ipsum');

On 2.0.2 it worked perfectly I had application name prepended to every log and namespace accrodingly. Unfortunately on 2.3.0 it does not work, roarr does not add application property to context.

I did look through readme this time before posting an issue but didn't find any related information about this.

@gajus
Copy link
Owner

gajus commented May 18, 2018

dffac37

Sorry.

@gajus gajus closed this as completed May 18, 2018
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

2 participants