Skip to content
Yohan edited this page May 9, 2017 · 2 revisions

Wiring the internal logging mechanism

You may want to trace Hypodermic's activity by wiring your own logging mechanism to it. You have to implement ILoggerSink and configure the singleton of Logger like so:

// You will intercept every messages but at no 0 cost.
// Warn might be a little less aggressive.
Logger::configureLogLevel(LogLevels::Debug);

Logger::configureSink(std::make_shared< MyVeryOwnLog4cxxLoggerSink >());

Note: The log level defaults to LogLevels::Error which means your application performances will feel the cost of logging only when errors occur.