Multiline logs entry stays multiline when it is written to a file.
bastienbc opened this issue · 2 comments
Hi,
It used to work because I referenced it in another issue #9 (which was not one).
But it does not work anymore:
time="2017-06-12T17:36:43+02:00" level=error msg="Command failed" ... Msg="raidcom: [EX_CMDRJE] An order to the control/command device was rejected
It was rejected due to SKEY=0x05, ASC=0x26, ASCQ=0x00, SSB=0xB958,0x0233 on Serial#(358702)
CAUSE : It cannot be deleted because the operation object LU is executing host I/O.
" Nature=Locked RequestID=2eebe597-e33a-55be-bd78-35d7ef6db86f Status=221 Subcommand=delete ....
I noticed that you use %v method for quoting, but as shown here that does not work as intended.
You may use fmt.Fprintf(b, "%q", value) instead but you'll need to strip the first and final character to remove the quotes.
Do you want me to do a pull request of any kind?
Removing quotes seems to be wrong but if there's no other way I'll accept that. PR would be welcomed.
I think that I'll remove QuoteCharacter
option like they did for logrus
sirupsen/logrus#580