Files
teleport/lib/utils/syslog_windows.go
T
rosstimothy 08b8f335b0 Update slog handlers to support configured extra_fields (#36372) (#36376)
In addition to configuring output format users can configure the
fields which are included in log messages. Prior to this our slog
handlers didn't support this feature and always output the default
fields. Now, both the slog and logrus output is identical no matter
the extra_fields configuration as verified by TestExtraFields. It
was also found that due to the way the logurs json formatter was
configuring itself in CheckAndSetDefaults the timestamp was always
included in the final output even if it was not included in the
configured extra_fields.
2024-01-08 17:04:44 +00:00

37 lines
1.1 KiB
Go

/*
* Teleport
* Copyright (C) 2023 Gravitational, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package utils
import (
"io"
"github.com/gravitational/trace"
"github.com/sirupsen/logrus"
)
// NewSyslogHook always returns an error on Windows.
func NewSyslogHook(io.Writer) (logrus.Hook, error) {
return nil, trace.NotImplemented("cannot use syslog on Windows")
}
// NewSyslogWriter always returns an error on Windows.
func NewSyslogWriter() (io.Writer, error) {
return nil, trace.NotImplemented("cannot use syslog on Windows")
}