github.com/atc0005/elbow@v0.8.8/internal/logging/logging_windows.go (about) 1 //go:build windows 2 // +build windows 3 4 // Copyright 2020 Adam Chalkley 5 // 6 // https://github.com/atc0005/elbow 7 // 8 // Licensed under the Apache License, Version 2.0 (the "License"); 9 // you may not use this file except in compliance with the License. 10 // You may obtain a copy of the License at 11 // 12 // https://www.apache.org/licenses/LICENSE-2.0 13 // 14 // Unless required by applicable law or agreed to in writing, software 15 // distributed under the License is distributed on an "AS IS" BASIS, 16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 // See the License for the specific language governing permissions and 18 // limitations under the License. 19 20 package logging 21 22 import ( 23 "github.com/sirupsen/logrus" 24 ) 25 26 // EnableSyslogLogging attempts to enable local syslog logging for non-Windows 27 // systems. For Windows systems the attempt is skipped. 28 func EnableSyslogLogging(_ *logrus.Logger, logBuffer *LogBuffer, _ string) error { 29 30 logBuffer.Add(LogRecord{ 31 // TODO: Not sure what log level is appropriate here. We are already 32 // reporting failures enabling syslog logging from the caller, but are 33 // not noting elsewhere that Windows syslog support is not available. 34 Level: logrus.WarnLevel, 35 Message: "This is a Windows build. Syslog support is not currently supported for this platform.", 36 }) 37 38 return nil 39 40 }