summaryrefslogtreecommitdiffstats
path: root/logging/logging.go
diff options
context:
space:
mode:
Diffstat (limited to 'logging/logging.go')
-rw-r--r--logging/logging.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/logging/logging.go b/logging/logging.go
index 7bc1f9e..5195b82 100644
--- a/logging/logging.go
+++ b/logging/logging.go
@@ -15,6 +15,10 @@ const (
LOGFILE = "errors.log"
)
+// New creates a new logger in the default cache directory; the returned
+// WriteCloser should be closed when the program exits. If an error is
+// encountered during file creation, a nil WriteCloser and appropriate
+// error are returned.
func New(c gotop.Config) (io.WriteCloser, error) {
// create the log directory
cache := c.ConfigDir.QueryCacheFolder()