From 6bebcbff9800dafa5208d590ecb3a6781e36b6d2 Mon Sep 17 00:00:00 2001 From: Andrew Kroh Date: Thu, 27 Jul 2017 09:18:45 -0400 Subject: [PATCH] Use ProgramData for Windows service logs (#4765) 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 #4764 (cherry picked from commit 47d3db437b41a575a2790297959f3762d96cd306) --- CHANGELOG.asciidoc | 1 + dev-tools/packer/platforms/windows/install-service.ps1.j2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc index a68697e64b49..2b9e2f3f4256 100644 --- a/CHANGELOG.asciidoc +++ b/CHANGELOG.asciidoc @@ -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* diff --git a/dev-tools/packer/platforms/windows/install-service.ps1.j2 b/dev-tools/packer/platforms/windows/install-service.ps1.j2 index 9ba8db5b3298..556d7a4e0bfa 100644 --- a/dev-tools/packer/platforms/windows/install-service.ps1.j2 +++ b/dev-tools/packer/platforms/windows/install-service.ps1.j2 @@ -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`""