refactoring: change logError parameter type 08/201108/1
authorMateusz Moscicki <m.moscicki2@partner.samsung.com>
Fri, 8 Mar 2019 09:50:30 +0000 (10:50 +0100)
committerMateusz Moscicki <m.moscicki2@partner.samsung.com>
Fri, 8 Mar 2019 09:50:30 +0000 (10:50 +0100)
Change-Id: I4fcaf121159d9a503a44e69d281bfd1147b8c5d1

src/internal/tslog.cpp
src/internal/tslog.hpp

index b71e513..7034a27 100644 (file)
@@ -22,10 +22,10 @@ void tslog::init() {
 bool tslog::enabled() { return g_verbosity >= 0; }
 bool tslog::verbose() { return g_verbosity > 0; }
 
-void tslog::logError(const char *error)
+void tslog::logError(const std::string &error)
 {
        log(error, "\n");
-       LOGE("%s", error);
+       LOGE("%s", error.c_str());
 }
 
 void tslog::logWarning(const std::string &warning)
index ec45407..690ee74 100644 (file)
@@ -43,7 +43,7 @@ namespace tslog
        /** Checks if verbosity is enabled */
        bool verbose();
 
-       void logError(const char *error);
+       void logError(const std::string &error);
        void logWarning(const std::string &warning);
 
        template <typename ...Args>