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("- - - - - - - - - - - - - - -")
|
||||||
log.Print("daemon started")
|
log.Print("daemon started")
|
||||||
|
log.Print("log1")
|
||||||
|
|
||||||
for true {
|
for true {
|
||||||
Info()
|
Info()
|
||||||
|
log.Print("log2")
|
||||||
time.Sleep(100 * time.Millisecond)
|
time.Sleep(100 * time.Millisecond)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,11 +21,13 @@ func checkExists(path string) (bool, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func Info() {
|
func Info() {
|
||||||
|
log.Print("log3")
|
||||||
// A SAMPLE COMMAND FOR LOGGING OS INFORMATION TO A DEDICATED FILE
|
// A SAMPLE COMMAND FOR LOGGING OS INFORMATION TO A DEDICATED FILE
|
||||||
userhome, err := os.UserHomeDir() // TODO $HOME is not defined while running as daemon !!!
|
userhome, err := os.UserHomeDir() // TODO $HOME is not defined while running as daemon !!!
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
log.Print("log4")
|
||||||
|
|
||||||
// userhome := "/home/asandikci" // TEMPORARY
|
// userhome := "/home/asandikci" // TEMPORARY
|
||||||
configDir := userhome + "/.config/" + ProgramName + "/"
|
configDir := userhome + "/.config/" + ProgramName + "/"
|
||||||
|
|
Loading…
Reference in a new issue