-
Notifications
You must be signed in to change notification settings - Fork 150
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
win_nssm: Configure NSSM to preserve log files on service restart/crash #536
Comments
drfuzzyness
changed the title
Allow configuring NSSM to preserve log files on service restart/crash
win_nssm: Configure NSSM to preserve log files on service restart/crash
Oct 16, 2023
+1 for this suggestion please. I'm using nssm to install hashicorp vault agent which requires redirection of stdout and stderr to get logging. If the service crashes and restarts, the previous logs are lost which makes debugging very hard. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SUMMARY
It would be helpful if the
community.windows.win_nssm
module can expose NSSM'sAppStdoutCreationDisposition
andAppStderrCreationDisposition
properties so that logs can be preserved when a service restarts. See "File Rotation Tab" on the NSSM usage page for a small amount of extra information.ISSUE TYPE
COMPONENT NAME
community.windows.win_nssm
ADDITIONAL INFORMATION
This would pass an integer (2 or 4 are known valid options) directly to NSSM's service configuration.
AppStdoutCreationDisposition
andAppStderrCreationDisposition
can be set independently, but follow similar logic. They should default to the current behavior of setting the -value to2
(replace log files on restart).Current behavior:
community.windows/plugins/modules/win_nssm.ps1
Lines 494 to 495 in 03e3af7
Proposed configuration example:
The text was updated successfully, but these errors were encountered: