Uploaded image for project: 'Apache NiFi MiNiFi C++'
  1. Apache NiFi MiNiFi C++
  2. MINIFICPP-199

Allow std::string to be used in log messages

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 0.2.0
    • None

    Description

      In order to log strings, currently you must access the c style string from the std::string object
      std::string world = "world";
      logger->log_error("hello %s", world.c_str());

      It would be much cleaner to allow :

      std::string world = "world";
      logger->log_error("hello %s", world);

      The cost is miniscule. On the order of .1 to .01 seconds per 10M log messages.

      Attachments

        Issue Links

          Activity

            People

              phrocker Marc Parisi
              phrocker Marc Parisi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: