Skip to content

Commit

Permalink
chore: simplify audit log default stdout logic
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Phelps <[email protected]>
  • Loading branch information
markphelps committed May 26, 2024
1 parent 47c3608 commit a4f41e1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/server/audit/log/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,9 @@ func NewSink(logger *zap.Logger, path string) (audit.Sink, error) {

// newSink is the constructor for a Sink visible for testing.
func newSink(logger *zap.Logger, path string, fs filesystem) (audit.Sink, error) {
var f file
var f file = os.Stdout

if path == "" {
f = os.Stdout
} else {
if path != "" {
// check if path exists, if not create it
dir := filepath.Dir(path)
if _, err := fs.Stat(dir); err != nil {
Expand Down

0 comments on commit a4f41e1

Please sign in to comment.