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

Feature/proxied caller config #192

Merged
merged 3 commits into from
Feb 19, 2021
Merged

Feature/proxied caller config #192

merged 3 commits into from
Feb 19, 2021

Conversation

romanhuba
Copy link
Contributor

I have added configuration option called proxiedCaller, if this option is set to true then the caller information is resolved with an offset of +1.

This is useful when using an abstraction over the NGXLogger such as a custom LoggerService, that uses an injected NGXLogger. In this scenario the caller information would always point to the LoggerService file, which is not very useful. With proxiedCaller: true configuration the caller information will be resolved to that which is calling the LoggerService and not the NGXLogger.

Default value of undefined does not change the current behavior, user must opt-in with a value of true to enable the new behavior.

amilor and others added 2 commits April 17, 2020 23:45
… trace to obtain the caller information (for example when using custom LoggerService instead of injecting the NGXLogger)
Copy link

@JanProchy JanProchy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

Copy link

@rattkin rattkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok!

@qortex qortex self-assigned this Jun 19, 2020
qortex
qortex previously requested changes Jun 24, 2020
Copy link
Contributor

@qortex qortex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

I think it would be a nice addition. It would make sense to let the user choose how many steps should be skipped (in the PR, it is assumed this number is always 1).

Could you update the PR to a proxiedSteps: number and use that number instead of the boolean?

…teps

When looking in stack trace, the user can now, the user is now allowed to specify a number of lines that will be ignored
The parameter is proxiedSteps in LoggerConfig
@bmtheo
Copy link
Collaborator

bmtheo commented Jul 30, 2020

@qortex I just updated the PR so that we have a number instead of a boolean, also added a comment on the config

Copy link

@JanProchy JanProchy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super useful. Thanks

@EbvcRM
Copy link

EbvcRM commented Feb 18, 2021

Can this PR be merged in @qortex ? it looks like @bmtheo addressed the change request and this would be really helpful. Cheers

@dbfannin dbfannin requested review from qortex and removed request for qortex February 18, 2021 20:15
@bmtheo bmtheo merged commit d0d548f into dbfannin:master Feb 19, 2021
@qortex
Copy link
Contributor

qortex commented Feb 19, 2021

sorry guys, slept on the job!

@EbvcRM
Copy link

EbvcRM commented Feb 24, 2021

Thanks for sorting 👍

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

Successfully merging this pull request may close these issues.

8 participants