Skip to content

CPP17 branch example logging config #566

Answered by elbeno
tunguskar asked this question in Q&A
Discussion options

You must be logged in to vote

See how the fmt logger does it: https://github.com/intel/compile-time-init-build/blob/cpp17/include/log/fmt/logger.hpp#L29

That pack of Ts... contains several arguments:
Ts = {const char (&)[73], int, sc::lazy_string_format<sc::string_constant<char, 'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd'>, cib::tuple_impl<> >}

  • const char (&)[73] is __FILE__
  • int is __LINE__
  • sc::lazy_string_format<sc::string_constant<char, 'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd'>, cib::tuple_impl<> > is the format string and any runtime arguments to put into it (in this case none)

puts isn't going to handle this in general (other than possibly outputting the __FILE__ and the format string unal…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@tunguskar
Comment options

Answer selected by tunguskar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants