Skip to content
  • Lorenzo Villani's avatar
    Add error handling to `ServiceLogHook.Fire()` · bdd47556
    Lorenzo Villani authored
    `entry.String()` returns both the string representation of the log entry
    and a possible error. Before this patch we were sending both to the log
    writer, which accepts a varargs `interface{}` ending up with spurious
    `<nil>` lines in syslog.
    
    With this patch we try to get to the string representation and perform
    an early return in case of errors, then pass only the string to the
    underlying `service.Logger`.
    
    Ref #2453
    bdd47556