-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
parameter to set log file location #367
Comments
Hey @fsiler, Writing logs to the Windows Event log requires direct interaction with this subsystem as well, which is also undesired. Current workaround to keep things in the file would be to use There might be better alternatives for passing stdout stream to files in Windows, but unfortunately I don't have enough domain knowledge to suggest anything at this time. |
I appreciate the desire to not be involved in handling files. However, the link you sent me just flat out doesn't work. I have tried several variations and can't get this to work. I'm wondering if I need to wrap in powershell or something to get this to function. If I get it to work, would you accept a pull request showing the working method? |
Hey @fsiler, I'm sorry it didn't work. I need to find a Windows box somewhere to try things out myself. I also agree that you might need to use Powershell (e.g. As for the contribution, I'd be interested in the prior discussion first, of course. Any recipe that solves the problem without writing files from the service is really appreciated, but I also assume that our options are limited. Let me have a look at it. I'm currently busy for delivering some other features, so I don't have any ETA at the moment. |
I think it's probably possible to use a Powershell wrapper as described here to capture STDOUT and STDERR. Of course, that doesn't require code changes, so if I can get that to work I'll do a writeup and contribute a PR against the README :). |
Yeah, that'd be fantastic and a valuable contribution for many Windows users. If not, I think it's still essential for Windows users to have some insights on what's going on with the app, so I'll try to find a way to do this. |
I did get this working, but annoyingly it involves NSSM. I'm using Chocolatey to install NSSM. Do you want me to prepare Powershell to fetch and install NSSM, or are you okay with a quick guide based on what I have now? |
Hey @fsiler, I think just a quick guide should be enough for starters. Feel free to open a PR and we'll discuss the details, I'm happy to assist as well. 👍 |
It looks like the issue has been resolved. We can use Writing logs directly to the file or EventLog in Windows might be considered after the planned log library change. |
Is your feature request related to a problem? Please describe.
I'm trying to run as a Windows service and I can't find events in the Log Viewer or the log file.
Describe the solution you'd like
Parameters, ideally both in the config file and command line, to set log file path.
Describe alternatives you've considered
Looked in Event Viewer and on disk, can't find log file.
The text was updated successfully, but these errors were encountered: