Skip to content

Commit

Permalink
Use ProgramData for Windows service logs (elastic#4765) (elastic#4847)
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
(cherry picked from commit 47d3db4)
  • Loading branch information
andrewkroh authored and tsg committed Aug 9, 2017
1 parent c076104 commit 695f923
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ https://github.com/elastic/beats/compare/v6.0.0-beta1...master[Check the HEAD di
==== Breaking changes

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

*Auditbeat*

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 695f923

Please sign in to comment.