Change syslog format and facility

This patch changes two things

1. Set facility to LOG_DAEMON
2. Remove ": " from tag so that the tag + pid become a single column in
   the log

Signed-off-by: Darren Shepherd <darren@rancher.com>
(cherry picked from commit 05641ccffc)
This commit is contained in:
Darren Shepherd 2015-04-15 00:16:43 -07:00 committed by Jessica Frazelle
parent 24cb9df189
commit d9a0c05208

View file

@ -17,7 +17,7 @@ type Syslog struct {
} }
func New(tag string) (logger.Logger, error) { func New(tag string) (logger.Logger, error) {
log, err := syslog.New(syslog.LOG_USER, fmt.Sprintf("%s: <%s> ", path.Base(os.Args[0]), tag)) log, err := syslog.New(syslog.LOG_DAEMON, fmt.Sprintf("%s/%s", path.Base(os.Args[0]), tag))
if err != nil { if err != nil {
return nil, err return nil, err
} }