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

Allow overriding log in plugins/audit #1947

Open
juneidy opened this issue Mar 15, 2023 · 0 comments
Open

Allow overriding log in plugins/audit #1947

juneidy opened this issue Mar 15, 2023 · 0 comments

Comments

@juneidy
Copy link

juneidy commented Mar 15, 2023

  • [ x] Used appropriate template for the issue type
  • [ x] Searched both open and closed issues for duplicates of this issue
  • [ x] Title adequately and concisely reflects the feature or the bug

Feature Request

Use Case

So the change in 528ecbc means that whatever log I passed into auditLogger is not prioritised over the log from createServer.

I would imagine that whatever new log passed to auditLogger should take precedence.

Example API

const server = restify.createServer({ log: loggerA , ... });
server.on('after', restify.plugins.auditLogger({ log: loggerB, ... }));

I would expect loggerB would be used instead of loggerA.

Are you willing and able to implement this?

I can quickly do the fix, but not sure about the tests.

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