// Writes to syslog-ng for a logging event. // // ident is used to persist you different log events to different files. // tag is can be used for your own purpose. func Dlog(ident string, tag string, jsonStr string) (err error) { _, err = syslogng.Printf(":%s,%s,%d,%s\n", ident, tag, time.Now().UTC().Unix(), jsonStr) return }
func (this *FunServantImpl) Dlog(ctx *rpc.Context, ident string, tag string, json string) (intError error) { // add newline and timestamp here if _, intError = syslogng.Printf(":%s,%s,%d,%s\n", ident, tag, time.Now().UTC().Unix(), json); intError != nil { log.Error("dlog %v", intError) } return nil }
func (this *FunServantImpl) Dlog(category string, tag string, json string) (err error) { this.t1 = time.Now() // add newline and timestamp here syslogng.Printf(":%s,%s,%d,%s\n", category, tag, time.Now().UTC().Unix(), json) log.Debug("dlog tag:%s %s", tag, time.Since(this.t1)) return nil }