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

Loggers cannot be reused #37

Closed
romandres opened this issue Apr 17, 2023 · 1 comment · Fixed by #38
Closed

Loggers cannot be reused #37

romandres opened this issue Apr 17, 2023 · 1 comment · Fixed by #38

Comments

@romandres
Copy link
Owner

romandres commented Apr 17, 2023

Loggers are disposed after calling Invoke-CommandWithLogging. Calling the command multiple times with the same loggers does not cause errors but will only log the first execution to the configured loggers since they are disposed after first use.

The console logger is the only one this working after being disposed.

@romandres romandres linked a pull request Apr 18, 2023 that will close this issue
@romandres
Copy link
Owner Author

It is important that loggers are disposed so rather than not disposing them, using the Invoke-CommandWithLogging command now fails if any loggers are disposed.

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 a pull request may close this issue.

1 participant