[go-nuts] Re: log: why print prefix before the timestamp?

2016-07-16 Thread Diego Cena
I agree with Jacek and Matt. Write an own logger? Isn't log package purpose NOT to write just another logger library? On Tuesday, June 17, 2014 at 6:24:21 PM UTC-3, Jacek Masiulaniec wrote: > > Hi Nuts, > > The below code: > > log.SetPrefix("debug: ") > log.Print("foo bar ...") > > produces

[go-nuts] Re: log: why print prefix before the timestamp?

2016-07-14 Thread farshid . tavakoli
I managed to do this by creating a custom io.Writer, adding prefix after the timestamp. Here is the code: https://gist.github.com/farshidtz/a64cb850e0a0c544823628ca4bc0e995 On Tuesday, June 17, 2014 at 11:24:21 PM UTC+2, Jacek Masiulaniec wrote: > > Hi Nuts, > > The below code: > > log.SetPref