summaryrefslogtreecommitdiff
path: root/logging.go
diff options
context:
space:
mode:
authorAbdelmalek Ihdene <52615297+AbdelmalekIhdene@users.noreply.github.com>2019-12-15 14:58:01 -0500
committerMatt Holt <mholt@users.noreply.github.com>2019-12-15 12:58:01 -0700
commitc3bcd967bd3be85c41ac5f630d496f0dc0d18115 (patch)
tree8bb555badd890eb1713dcc20d99ab81a3e98367f /logging.go
parent6ea121ddf8c5be6de892971782d6f0fe2938ebbf (diff)
logging: Implement net writer (#2884)
* Implement UDP writer * Implement Net Writer * Utilize Caddy's address parsing functions * A couple little fixes (see #2884)
Diffstat (limited to 'logging.go')
-rw-r--r--logging.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/logging.go b/logging.go
index a4a1473..790f700 100644
--- a/logging.go
+++ b/logging.go
@@ -225,10 +225,11 @@ func (logging *Logging) openWriter(opener WriterOpener) (io.WriteCloser, bool, e
w, err := opener.OpenWriter()
return writerDestructor{w}, err
})
- if err == nil {
- logging.writerKeys = append(logging.writerKeys, key)
+ if err != nil {
+ return nil, false, err
}
- return writer.(io.WriteCloser), !loaded, err
+ logging.writerKeys = append(logging.writerKeys, key)
+ return writer.(io.WriteCloser), !loaded, nil
}
// WriterOpener is a module that can open a log writer.