Hi! I have some logging package and after memory profiling saw that for
disabled log levels i'm allocate memory for message.
For example i'm send in logger only Info level. So i want to avoid
Debug/Trace stuff.
but memory profiling says that for call log.Tracef("my message %v", msg)
i'm allocate memory.
I don't want to guard all calls to check enabled log level to
avoid allocation. How can i do zero allocation log in such case?
Thanks!

-- 
Vasiliy Tolstov,
e-mail: v.tols...@selfip.ru

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CACaajQswqK3DGHESCFd4pCdxndFpOFyKXhO25UDKgEsxYeK3SA%40mail.gmail.com.

Reply via email to