Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active May 25, 2017 14:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/377048fa407049c79b5c9667614c12ee to your computer and use it in GitHub Desktop.
Save deque-blog/377048fa407049c79b5c9667614c12ee to your computer and use it in GitHub Desktop.
template <typename Fct, typename ...Args>
auto wrap_with_logs(std::string const& fct_name,
Fct fct, Args && ...args)
{
log_trace(get_logger(), log_prefix(fct_name), args...);
return fct(std::forward<Args>(args)...);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment