feat: implement syslog logging (#181)
* feat: implement syslog logging With this functionality in tree, macOS users could easily access ooniprobe logs by filtering by process name in the console app. Part of https://github.com/ooni/probe/issues/1289 * fix: build on windows * fix: all build issues
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
// commands
|
||||
|
||||
"github.com/apex/log"
|
||||
"github.com/ooni/probe-cli/internal/cli/app"
|
||||
_ "github.com/ooni/probe-cli/internal/cli/geoip"
|
||||
_ "github.com/ooni/probe-cli/internal/cli/info"
|
||||
_ "github.com/ooni/probe-cli/internal/cli/list"
|
||||
@@ -15,13 +14,10 @@ import (
|
||||
_ "github.com/ooni/probe-cli/internal/cli/upload"
|
||||
_ "github.com/ooni/probe-cli/internal/cli/version"
|
||||
"github.com/ooni/probe-cli/internal/crashreport"
|
||||
|
||||
"github.com/ooni/probe-cli/internal/cli/app"
|
||||
)
|
||||
|
||||
func main() {
|
||||
err, _ := crashreport.CapturePanic(app.Run, nil)
|
||||
if err != nil {
|
||||
if err, _ := crashreport.CapturePanic(app.Run, nil); err != nil {
|
||||
log.WithError(err.(error)).Error("panic in app.Run")
|
||||
crashreport.Wait()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user