Skip to content

Commit

Permalink
Use ProgramData for Windows service logs (elastic#4765)
Browse files Browse the repository at this point in the history
The logs for Beats that are running as Windows services are currently written to `C:\Program Files\[beatname]\logs` (or the extract path which is `path.home`). Our Getting Started guides say that the logs go to `C:\ProgramData\[beatname]\Logs`. This PR sets `path.log` for the Windows service to `C:\ProgramData\[beatname]\logs`.

See elastic#4764
  • Loading branch information
andrewkroh authored and exekias committed Jul 27, 2017
1 parent 38eb3eb commit 47d3db4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ https://github.com/elastic/beats/compare/v6.0.0-beta1...master[Check the HEAD di

*Affecting all Beats*

- The log directory (`path.log`) for Windows services is now set to `C:\ProgramData\[beatname]\logs`. {issue}4764[4764]

*Filebeat*

*Heartbeat*
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/packer/platforms/windows/install-service.ps1.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ $workdir = Split-Path $MyInvocation.MyCommand.Path
# create new service
New-Service -name {{.beat_name}} `
-displayName {{.beat_name}} `
-binaryPathName "`"$workdir\\{{.beat_name}}.exe`" -c `"$workdir\\{{.beat_name}}.yml`" -path.home `"$workdir`" -path.data `"C:\\ProgramData\\{{.beat_name}}`""
-binaryPathName "`"$workdir\\{{.beat_name}}.exe`" -c `"$workdir\\{{.beat_name}}.yml`" -path.home `"$workdir`" -path.data `"C:\\ProgramData\\{{.beat_name}}`" -path.logs `"C:\\ProgramData\\{{.beat_name}}\logs`""

0 comments on commit 47d3db4

Please sign in to comment.