Logrus: How to using log.Info("%s", s) like?

Created on 11 Mar 2018  路  2Comments  路  Source: sirupsen/logrus

Thanks for this lib, I have a simple question:

How to using log.Info("%s", s) like?

Does logrus provide this?

question

Most helpful comment

Use Infof instead

All 2 comments

Use Infof instead

@jinfagang, you can use Infof or any other f method but the recommended way is to add a field to your entry.

logrus.WithField("fieldname", value).Info("my trace")
Was this page helpful?
0 / 5 - 0 ratings

Related issues

salvador-dali picture salvador-dali  路  5Comments

vagruchi picture vagruchi  路  5Comments

UnAfraid picture UnAfraid  路  5Comments

Integralist picture Integralist  路  3Comments

drewwells picture drewwells  路  3Comments