diff --git a/lang/csharp/Continental.eCAL.Core/ecal_clr.cpp b/lang/csharp/Continental.eCAL.Core/ecal_clr.cpp index 80aeece79a..8d380fbd90 100644 --- a/lang/csharp/Continental.eCAL.Core/ecal_clr.cpp +++ b/lang/csharp/Continental.eCAL.Core/ecal_clr.cpp @@ -124,7 +124,7 @@ void Logger::SetLogLevel(LogLevel level_) void Logger::Log(System::String^ message_) { - ::eCAL::Logging::Log(StringToStlString(message_)); + ::eCAL::Logging::Log(log_level_info, StringToStlString(message_)); } diff --git a/lang/python/core/ecal/core/core.py b/lang/python/core/ecal/core/core.py index 990e7f37c9..10eba7002c 100644 --- a/lang/python/core/ecal/core/core.py +++ b/lang/python/core/ecal/core/core.py @@ -148,7 +148,8 @@ def log_setlevel(level): :type level: int """ - return _ecal.log_setlevel(level) + print("[WARNING] 'log_setlevel(int)' is deprecated. All logs will have the log level 'all' until the new API is introduced.") + return None def log_setcoretime(time): diff --git a/lang/python/core/src/ecal_clang.cpp b/lang/python/core/src/ecal_clang.cpp index a1e73e3a02..13a29efa3e 100644 --- a/lang/python/core/src/ecal_clang.cpp +++ b/lang/python/core/src/ecal_clang.cpp @@ -273,20 +273,12 @@ bool ecal_get_description(const char* topic_name_, const char** topic_desc_, int return(ret); } -/****************************************/ -/* log_setlevel */ -/****************************************/ -void log_setlevel(const int level_) -{ - eCAL::Logging::SetLogLevel(eCAL_Logging_eLogLevel(level_)); -} - /****************************************/ /* log_message */ /****************************************/ -void log_message(const char* message_) +void log_message(const int level_, const char* message_) { - eCAL::Logging::Log(message_); + eCAL::Logging::Log(eCAL_Logging_eLogLevel(level_), message_); } diff --git a/lang/python/core/src/ecal_clang.h b/lang/python/core/src/ecal_clang.h index a42fd52f05..d426b4af7f 100644 --- a/lang/python/core/src/ecal_clang.h +++ b/lang/python/core/src/ecal_clang.h @@ -193,22 +193,12 @@ bool ecal_get_type_encoding(const char* topic_name_, const char** topic_encoding **/ bool ecal_get_description(const char* topic_name_, const char** topic_desc_, int* topic_desc_len_); -/*************************************************************************/ -/* logging */ -/*************************************************************************/ -/** - * @brief Sets the log level. - * - * @param level_ The level. -**/ -void log_setlevel(int level_); - /** * @brief Log a message (with current log level). * * @param message_ The log message string. **/ -void log_message(const char* message_); +void log_message(int level_, const char* message_); /*************************************************************************/ /* publisher */ diff --git a/lang/python/core/src/ecal_wrap.cxx b/lang/python/core/src/ecal_wrap.cxx index 56e00d5698..dc0f5e3690 100644 --- a/lang/python/core/src/ecal_wrap.cxx +++ b/lang/python/core/src/ecal_wrap.cxx @@ -227,21 +227,6 @@ PyObject* shutdown_processes(PyObject* /*self*/, PyObject* /*args*/) Py_RETURN_NONE; } -/****************************************/ -/* log_setlevel */ -/****************************************/ -PyObject* log_setlevel(PyObject* /*self*/, PyObject* args) -{ - int level = 0; - - if (!PyArg_ParseTuple(args, "i", &level)) - return nullptr; - - log_setlevel(level); - - Py_RETURN_NONE; -} - /****************************************/ /* log_message */ /****************************************/ @@ -252,12 +237,11 @@ PyObject* log_message(PyObject* /*self*/, PyObject* args) if (!PyArg_ParseTuple(args, "s", &message)) return nullptr; - log_message(message); + log_message(255, message); Py_RETURN_NONE; } - /****************************************/ /* pub_create */ /****************************************/ @@ -1322,7 +1306,6 @@ static PyMethodDef _ecal_methods[] = {"shutdown_process_uname", shutdown_process_uname, METH_VARARGS, "shutdown_process_uname(unit_name)"}, {"shutdown_processes", shutdown_processes, METH_NOARGS, "shutdown_processes()"}, - {"log_setlevel", log_setlevel, METH_VARARGS, "log_setlevel(level)"}, {"log_message", log_message, METH_VARARGS, "log_message(message)"}, {"pub_create", pub_create, METH_VARARGS, "pub_create(topic_name, topic_type, topic_encoding, topic_desc)"},