change path for logs
This commit is contained in:
parent
d7e6f84fe5
commit
2c67bde970
6
main.go
6
main.go
|
|
@ -20,7 +20,7 @@ const (
|
|||
MyDB = "beieliscaledb"
|
||||
username = "beieli"
|
||||
password = "beieli4president"
|
||||
outputfile = "/home/beieli/mini-beieli-lorahandler/mini-beieli-lorahandler.log"
|
||||
outputfile = "/data/mini-beieli-lorahandler.log"
|
||||
NOT_PLAUSIBLE_16 = 65535
|
||||
NOT_PLAUSIBLE_32 = 2147483647
|
||||
)
|
||||
|
|
@ -610,9 +610,9 @@ func WriteStringToFile(s string, deveui string, implausible bool) {
|
|||
|
||||
// Also write to individual files
|
||||
datestr := time.Now().Format("2006-01")
|
||||
individual_file := "/home/beieli/mini-beieli-lorahandler/logs/" + deveui + "-" + datestr + ".log"
|
||||
individual_file := "/data/logs/" + deveui + "-" + datestr + ".log"
|
||||
if implausible {
|
||||
individual_file = "/home/beieli/mini-beieli-lorahandler/logs/" + "implausible" + "-" + datestr + ".log"
|
||||
individual_file = "/data/logs/" + "implausible" + "-" + datestr + ".log"
|
||||
}
|
||||
|
||||
fi, err := os.OpenFile(individual_file, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644)
|
||||
|
|
|
|||
Loading…
Reference in New Issue