diff options
author | lawl <github@dumbinter.net> | 2020-07-06 21:39:18 +0200 |
---|---|---|
committer | lawl <github@dumbinter.net> | 2020-07-06 21:39:18 +0200 |
commit | f0a73d3ff7c9bffd4d99655570071c185a33ab4f (patch) | |
tree | df7e034eae8f33d7a92cb6a8987a268be8ebe226 /main.go | |
parent | 35c4aa79a293496e52608d15a6010b55dba9bbb2 (diff) | |
download | noisetorch-f0a73d3ff7c9bffd4d99655570071c185a33ab4f.tar.gz noisetorch-f0a73d3ff7c9bffd4d99655570071c185a33ab4f.zip |
Log to file and stdout, instead of just file
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2,6 +2,7 @@ package main import ( "image" + "io" "io/ioutil" "log" "os" @@ -31,7 +32,9 @@ func main() { log.Fatalf("error opening file: %v\n", err) } defer f.Close() - log.SetOutput(f) + + logwriter := io.MultiWriter(os.Stdout, f) + log.SetOutput(logwriter) log.Printf("Application starting. Version: %s", version) initializeConfigIfNot() |