remove -pg compile flag (commited by mistake)
Don't create logger object if corresponding log level is ignored.
remove shared_ptr for performance