Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions confgenerator/confgenerator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ var (
defaultStateDir: `C:\ProgramData\Google\Cloud Operations\Ops Agent\run`,
platform: platform.Platform{
Type: platform.Windows,
WindowsBuildNumber: "1", // Is2012 == false, Is2016 == false
WindowsBuildNumber: "1", // Is2016 == false
WinlogV1Channels: winlogv1channels,
HostInfo: &host.InfoStat{
OS: "windows",
Expand All @@ -129,12 +129,12 @@ var (
},
},
{
name: "windows-2012",
name: "windows-2016",
defaultLogsDir: `C:\ProgramData\Google\Cloud Operations\Ops Agent\log`,
defaultStateDir: `C:\ProgramData\Google\Cloud Operations\Ops Agent\run`,
platform: platform.Platform{
Type: platform.Windows,
WindowsBuildNumber: "9200", // Windows Server 2012
WindowsBuildNumber: "14393", // Windows Server 2016
WinlogV1Channels: winlogv1channels,
HostInfo: &host.InfoStat{
OS: "windows",
Expand Down
4 changes: 2 additions & 2 deletions confgenerator/logging_receivers.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,12 +596,12 @@ func (r LoggingReceiverWindowsEventLog) Components(ctx context.Context, tag stri
},
}}

// On Windows Server 2012/2016, there is a known problem where most log fields end
// On Windows Server 2016, there is a known problem where most log fields end
// up blank. The Use_ANSI configuration is provided to work around this; however,
// this also strips Unicode characters away, so we only use it on affected
// platforms. This only affects the newer API.
p := platform.FromContext(ctx)
if !r.IsDefaultVersion() && (p.Is2012() || p.Is2016()) {
if !r.IsDefaultVersion() && p.Is2016() {
input[0].Config["Use_ANSI"] = "True"
}

Expand Down
Loading
Loading