fix logging

trunk
vilmibm 2023-10-25 17:52:04 +00:00
parent 418e4a4a14
commit 17d39483fb
1 changed files with 2 additions and 1 deletions

View File

@ -118,9 +118,10 @@ func (p *Prompter) Select(prompt string, opts []string) (int, error) {
}
func _main(cs colorScheme) error {
logFilename := fmt.Sprintf("/town/var/log/help/%d", time.Now().Unix)
logFilename := fmt.Sprintf("/town/var/log/help/%d", time.Now().Unix())
logFile, err := os.OpenFile(logFilename, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0600)
l := log.New(logFile, "", log.Ldate|log.Ltime|log.LUTC|log.Lshortfile)
defer logFile.Close()
db, err := connectDB()
if err != nil {