tmp: add log files
This commit is contained in:
parent
8bf6292a4b
commit
fc19e3659f
2 changed files with 4 additions and 0 deletions
|
@ -28,9 +28,11 @@ func main() {
|
|||
|
||||
log.Print("- - - - - - - - - - - - - - -")
|
||||
log.Print("daemon started")
|
||||
log.Print("log1")
|
||||
|
||||
for true {
|
||||
Info()
|
||||
log.Print("log2")
|
||||
time.Sleep(100 * time.Millisecond)
|
||||
}
|
||||
|
||||
|
|
|
@ -21,11 +21,13 @@ func checkExists(path string) (bool, error) {
|
|||
}
|
||||
|
||||
func Info() {
|
||||
log.Print("log3")
|
||||
// A SAMPLE COMMAND FOR LOGGING OS INFORMATION TO A DEDICATED FILE
|
||||
userhome, err := os.UserHomeDir() // TODO $HOME is not defined while running as daemon !!!
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
log.Print("log4")
|
||||
|
||||
// userhome := "/home/asandikci" // TEMPORARY
|
||||
configDir := userhome + "/.config/" + ProgramName + "/"
|
||||
|
|
Loading…
Reference in a new issue