update logging to put all logs in one folder
This commit is contained in:
parent
259ef4a3d2
commit
45520c9513
@ -20,8 +20,9 @@ func directory() string {
|
||||
// Enable turns logging on for the StreamDeck API client as well as the global
|
||||
// log object. It sends both to a temp file that contains <project_directory>.log.
|
||||
func Enable() {
|
||||
os.Mkdir("./logs/", 0775)
|
||||
d := directory()
|
||||
f, err := os.CreateTemp("./", fmt.Sprintf("%s.log", d))
|
||||
f, err := os.CreateTemp("./logs/", fmt.Sprintf("%s.log", d))
|
||||
if err != nil {
|
||||
log.Fatalf("error creating temp file: %v", err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user