On Darwin (OS X) the default syslog.log log level is >=NOTICE so the service logger.Info() did no visible logging at all. I promoted "Info" to "Notice" to make the logging visible in console.log without modification of /etc/asl.conf (the system logging configuration file)

This commit is contained in:
Hans Raaf
2014-03-15 00:17:40 +01:00
parent a89deee1d5
commit 8ed815943c
+2 -1
View File
@@ -112,7 +112,8 @@ func (s *darwinLaunchdService) Warning(format string, a ...interface{}) error {
return s.logger.Warning(fmt.Sprintf(format, a...))
}
func (s *darwinLaunchdService) Info(format string, a ...interface{}) error {
return s.logger.Info(fmt.Sprintf(format, a...))
// on Darwin syslog.log defaults to loggint >= Notice (see /etc/asl.conf)
return s.logger.Notice(fmt.Sprintf(format, a...))
}
var launchdConfig = `<?xml version='1.0' encoding='UTF-8'?>