Skip to content

HowTo needed: CPP17 branch -> replac log messages and generate json file #564

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

You must be logged in to vote

Thanks @elbeno, sorry for so much questions. I added now several configs. Just for others which have the same question than me:

Target Logger (replace the cout statements with a uart, or whatever write routine)

struct loggerOnTarget : logging::null::config
{

  static auto terminate() noexcept -> void
  {
    puts("Terminating...\n");
  }

  struct
  {

    template <logging::level Level, typename FilenameStringType,
              typename LineNumberType, typename MsgType>
    auto log(FilenameStringType, LineNumberType,
                               MsgType const &msg) -> void 
    {
      using Message = message<Level, MsgType>;
      const uint32_t msg_id = catalog<Message>();

      …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@tunguskar
Comment options

@tunguskar
Comment options

@elbeno
Comment options

@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