summaryrefslogtreecommitdiff
path: root/pkg/config
diff options
context:
space:
mode:
authorkali <kali@win>2020-10-09 12:39:27 +0200
committerRuben Pollan <meskio@sindominio.net>2020-10-13 19:08:52 +0200
commite4a2efb527fb09b548c14b13d28d0780941ca72d (patch)
tree8527fb1678d1f8d4465cb7cee02d32a45a688ae8 /pkg/config
parent4d9d578902aae37d62ea3218efa2b062cb7f893f (diff)
[pkg] windows fixes
Several fixes for missing paths. Refactor qt installer; fetch pre-built binaries from an existing installation on build system (needs to be automated); add windows icon. - Resolves: #362
Diffstat (limited to 'pkg/config')
-rw-r--r--pkg/config/logger.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/config/logger.go b/pkg/config/logger.go
index 09d96b7..cb78349 100644
--- a/pkg/config/logger.go
+++ b/pkg/config/logger.go
@@ -19,10 +19,16 @@ import (
"io"
"log"
"os"
+ "path"
)
//ConfigureLogger to write logs into a file as well as the stderr
func ConfigureLogger(logPath string) (io.Closer, error) {
+ dir := path.Dir(logPath)
+ err := os.MkdirAll(dir, 0700)
+ if err == nil {
+ log.Println("ERROR: cannot create data dir")
+ }
logFile, err := os.OpenFile(logPath, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if err == nil {
log.SetOutput(io.MultiWriter(logFile, os.Stderr))