Implement parsing browser requests and sending errors (#9)
This commit is contained in:
@@ -11,11 +11,9 @@ import (
|
||||
|
||||
// AddPersistentLogHook configures persisting logs in syslog
|
||||
func AddPersistentLogHook() {
|
||||
hook, err := logSyslog.NewSyslogHook("", "", syslog.LOG_INFO, "browserpass")
|
||||
|
||||
if err == nil {
|
||||
log.AddHook(hook)
|
||||
if hook, err := logSyslog.NewSyslogHook("", "", syslog.LOG_INFO, "browserpass"); err != nil {
|
||||
log.Warn("Unable to connect to syslog, logs will NOT be persisted: ", err)
|
||||
} else {
|
||||
log.Warn("Unable to connect to syslog, logs will NOT be persisted")
|
||||
log.AddHook(hook)
|
||||
}
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@ func AddPersistentLogHook() {
|
||||
}
|
||||
logFolderPath := filepath.Join(appDataPath, "browserpass")
|
||||
if err := os.MkdirAll(logFolderPath, os.ModePerm); err != nil {
|
||||
log.Warn("Unable to create browserpass folder in %%APPDATA%%, logs will NOT be persisted")
|
||||
log.Warn("Unable to create browserpass folder in %%APPDATA%%, logs will NOT be persisted: ", err)
|
||||
return
|
||||
}
|
||||
logFilePath := filepath.Join(logFolderPath, "browserpass.log")
|
||||
|
Reference in New Issue
Block a user