fix logging
parent
418e4a4a14
commit
17d39483fb
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue