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

docs: Add log.file argument to README #1702

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

PolygonError
Copy link
Contributor

@PolygonError PolygonError commented Oct 22, 2024

Adds a line which explains the log.file argument, and explains how the MSI installer adds an argument which defaults this to eventlog.

Description taken from log flag setup under internal/log/flag/flag.go

@PolygonError PolygonError requested a review from a team as a code owner October 22, 2024 06:38
@jkroepke
Copy link
Member

Thanks a lot!

Background: MSI installer has set it to eventlog, since in a Windows Service context stderr is piped to null.

@jkroepke jkroepke changed the title Add log.file argument to README docs: Add log.file argument to README Oct 22, 2024
@PolygonError
Copy link
Contributor Author

Thanks a lot!

Background: MSI installer has set it to eventlog, since in a Windows Service context stderr is piped to null.

Thanks for the info, I never realised until I went to look for an issue and found a bunch of events from it which I don't care about, so I just changed it to log to a text file in the installation directory.

@jkroepke jkroepke merged commit bad8ba2 into prometheus-community:master Oct 23, 2024
5 of 7 checks passed
@Zeeeeta
Copy link

Zeeeeta commented Nov 22, 2024

Thanks a lot!
Background: MSI installer has set it to eventlog, since in a Windows Service context stderr is piped to null.

Thanks for the info, I never realised until I went to look for an issue and found a bunch of events from it which I don't care about, so I just changed it to log to a text file in the installation directory.

May I know how do you set it to a text file?

I use the installer MSI change the setting to
--log.file "C:\Program Files\windows_exporter\log.txt"
but it stuck there and cant start the service. (everyone has full control on folder, stuck no matter log.txt exists or not)
image

Thanks.

@jkroepke
Copy link
Member

please create a new issue for that! thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants