Skip to content

Commit

Permalink
iox-eclipse-iceoryx#1345 Change todo issue number from 1345 to 1755 f…
Browse files Browse the repository at this point in the history
…or remaining logger todos
  • Loading branch information
elBoberido committed Nov 3, 2022
1 parent 64223e5 commit 609f868
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ inline void ConsoleLogger::logArithmetic(const T value, const char* format) noex
value);
if (retVal < 0)
{
/// @todo iox-#1345 this path should never be reached since we ensured the correct encoding of the character
/// @todo iox-#1755 this path should never be reached since we ensured the correct encoding of the character
/// conversion specifier; nevertheless, we might want to call the error handler after the error handler
/// refactoring was merged
return;
Expand All @@ -86,7 +86,7 @@ inline void ConsoleLogger::logArithmetic(const T value, const char* format) noex
}
else
{
/// @todo iox-#1345 currently we don't support log messages larger than the log buffer and everything larger
/// @todo iox-#1755 currently we don't support log messages larger than the log buffer and everything larger
/// that the log buffer will be truncated;
/// it is intended to flush the buffer and create a new log message later on
data.bufferWriteIndex = ThreadLocalData::BUFFER_SIZE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ namespace internal
template <typename BaseLogger>
inline Logger<BaseLogger>& Logger<BaseLogger>::get() noexcept
{
/// @todo iox-#1345 use the PolymorphicHandler for the handling with the logger exchange once available
/// @todo iox-#1755 use the PolymorphicHandler for the handling with the logger exchange once available

// NOLINTJUSTIFICATION needed for the functionality
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
Expand Down Expand Up @@ -91,7 +91,7 @@ inline Logger<BaseLogger>& Logger<BaseLogger>::activeLogger(Logger<BaseLogger>*
newLogger->createLogMessageHeader(__FILE__, __LINE__, __FUNCTION__, LogLevel::ERROR);
logger->logString("Trying to replace logger after already initialized!");
newLogger->flush();
/// @todo iox-#1345 call error handler after the error handler refactoring was merged
/// @todo iox-#1755 call error handler after the error handler refactoring was merged
}
else
{
Expand All @@ -118,7 +118,7 @@ inline void Logger<BaseLogger>::initLoggerInternal(const LogLevel logLevel) noex
BaseLogger::createLogMessageHeader(__FILE__, __LINE__, __FUNCTION__, LogLevel::ERROR);
BaseLogger::logString("Multiple initLogger calls");
BaseLogger::flush();
/// @todo iox-#1345 call error handler after the error handler refactoring was merged
/// @todo iox-#1755 call error handler after the error handler refactoring was merged
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ inline constexpr LogOct<T> oct(const T value) noexcept
return LogOct<T>(value);
}

/// @todo iox-#1345 use something like 'source_location'
/// @todo iox-#1755 use something like 'source_location'
// AXIVION Next Construct AutosarC++19_03-A3.9.1 : See at declaration in header
// NOLINTNEXTLINE(readability-function-size)
inline LogStream::LogStream(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class ConsoleLogger
/// @return the current log level
/// @note In case this class is used as template for a custom logger implementation keep in mind that this method
/// must not have any side effects
/// @todo iox-#1345 update the design document with the requirement that this method must not have side effects
/// @todo iox-#1755 update the design document with the requirement that this method must not have side effects
static LogLevel getLogLevel() noexcept;

/// @brief Sets a new log level
Expand Down Expand Up @@ -113,7 +113,7 @@ class ConsoleLogger
ThreadLocalData& operator=(const ThreadLocalData&) = delete;
ThreadLocalData& operator=(ThreadLocalData&&) = delete;

/// @todo iox-#1345 this could be made a compile time option
/// @todo iox-#1755 this could be made a compile time option
static constexpr uint32_t BUFFER_SIZE{1024};
static constexpr uint32_t NULL_TERMINATED_BUFFER_SIZE{BUFFER_SIZE + 1};

Expand All @@ -123,7 +123,7 @@ class ConsoleLogger
// NOLINTNEXTLINE(hicpp-avoid-c-arrays, cppcoreguidelines-avoid-c-arrays)
char buffer[NULL_TERMINATED_BUFFER_SIZE];
uint32_t bufferWriteIndex; // initialized in corresponding cpp file
/// @todo iox-#1345 add thread local storage with thread id and print it in the log messages
/// @todo iox-#1755 add thread local storage with thread id and print it in the log messages
};

static ThreadLocalData& getThreadLocalData() noexcept;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ namespace log
{
class LogStream;

/// @todo iox-#1345 move this to e.g. helplets once we are able to depend on on it
/// @todo iox-#1755 move this to e.g. helplets once we are able to depend on on it
/// @brief Compares C-style strings with a char array, i.g. string literal for equality
/// @tparam[in] N size of the char array
/// @param[in] lhs C-style string to compare
Expand Down
4 changes: 2 additions & 2 deletions iceoryx_hoofs/include/iceoryx_hoofs/log/logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
//
// SPDX-License-Identifier: Apache-2.0

/// @todo iox-#1345 the content of this file should be customizable;
/// @todo iox-#1755 the content of this file should be customizable;
/// in order to achieve this, this file will be moved to
/// iceoryx_hoofs
/// |- customization
Expand All @@ -39,7 +39,7 @@ namespace log
using Logger = internal::Logger<ConsoleLogger>;
using TestingLoggerBase = internal::Logger<ConsoleLogger>;

/// @todo iox-#1345 make this a option a cmake argument and use via a compile define
/// @todo iox-#1755 make this a option a cmake argument and use via a compile define
/// @brief If set to true, the IOX_LOG macro will ignore the the configured log level and forward all messages to the
/// logger. This is useful in cases the default ConsoleLogger is replaced by a custom logger which does the filtering by
/// itself
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_hoofs/include/iceoryx_hoofs/log/logging.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ inline bool isLogLevelActive(LogLevel logLevel) noexcept
// intended lazy evaluation technique with the if statement
// NOLINTBEGIN(cppcoreguidelines-macro-usage)
#define IOX_LOG_INTERNAL(file, line, function, level) \
/* if (iox::log::internal::isLogLevelActive(level)) @todo iox-#1345 lazy evaluation causes issues with Axivion */ \
/* if (iox::log::internal::isLogLevelActive(level)) @todo iox-#1755 lazy evaluation causes issues with Axivion */ \
iox::log::internal::SelectedLogStream(file, line, function, level, iox::log::internal::isLogLevelActive(level)) \
.self()

Expand Down
8 changes: 4 additions & 4 deletions iceoryx_hoofs/include/iceoryx_hoofs/log/logstream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class LogOct
template <typename T, typename = std::enable_if_t<std::is_integral<T>::value>>
inline constexpr LogOct<T> oct(const T value) noexcept;

/// @todo iox-#1345 implement LogBin and LogRawBuffer
/// @todo iox-#1755 implement LogBin and LogRawBuffer

/// @brief This class provides the public interface to the logger and is used with the 'IOX_LOG' macro. In order to add
/// support for custom data types 'operator<<' needs to be implement for the custom type.
Expand Down Expand Up @@ -122,7 +122,7 @@ class LogStream
/// @param[in] line the line of the log message. Please use the '__LINE__' compiler intrinsic
/// @param[in] function the function of the log message. Please use the '__FUNCTION__' compiler intrinsic
/// @param[in] logLevel is the log level for the log message
/// @todo iox-#1345 temporary workaround due to lazy evaluation issues with Axivion; should be removed when the
/// @todo iox-#1755 temporary workaround due to lazy evaluation issues with Axivion; should be removed when the
/// lazy evaluation can be implemented in an way Axivion does not complain
// AXIVION Next Construct AutosarC++19_03-A3.9.1 : file, line and function are used in conjunction with '__FILE__',
// '__LINE__' and '__FUNCTION__'; these are compiler intrinsic and cannot be changed to fixed width types in a
Expand Down Expand Up @@ -152,7 +152,7 @@ class LogStream
/// @brief Logging support for std::string
/// @param[in] str is the std::string to log
/// @return a reference to the LogStream instance
/// @todo iox-#1345 instead of using std::string we could also accept everything with a c_str() method
/// @todo iox-#1755 instead of using std::string we could also accept everything with a c_str() method
/// and avoid the std::string dependency; alternatively this could be implemented as free function
LogStream& operator<<(const std::string& str) noexcept;

Expand Down Expand Up @@ -223,7 +223,7 @@ class LogStream
Logger& m_logger;
bool m_isFlushed{false};

/// @todo iox-#1345 workaround due to deactivation of lazy evaluation
/// @todo iox-#1755 workaround due to deactivation of lazy evaluation
bool m_doFlush{true};
};

Expand Down
16 changes: 8 additions & 8 deletions iceoryx_hoofs/source/log/building_blocks/console_logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void ConsoleLogger::createLogMessageHeader(const char* file,

const time_t time{timestamp.tv_sec};

/// @todo iox-#1345 since this will be part of the platform at one point, we might not be able to handle this via the
/// @todo iox-#1755 since this will be part of the platform at one point, we might not be able to handle this via the
/// platform abstraction; re-evaluate this when the move to the platform happens
#if defined(_WIN32)
// seems to be thread-safe on Windows
Expand Down Expand Up @@ -109,10 +109,10 @@ void ConsoleLogger::createLogMessageHeader(const char* file,
constexpr uint32_t MILLISECS_PER_SECOND{1000};
const auto milliseconds = static_cast<int32_t>(timestamp.tv_nsec % MILLISECS_PER_SECOND);

/// @todo iox-#1345 do we also want to always log the iceoryx version and commit sha? Maybe do that only in
/// @todo iox-#1755 do we also want to always log the iceoryx version and commit sha? Maybe do that only in
/// 'initLogger' with LogDebug

/// @todo iox-#1345 add an option to also print file, line and function
/// @todo iox-#1755 add an option to also print file, line and function
unused(file);
unused(line);
unused(function);
Expand All @@ -136,7 +136,7 @@ void ConsoleLogger::createLogMessageHeader(const char* file,
COLOR_RESET);
if (retVal < 0)
{
/// @todo iox-#1345 this path should never be reached since we ensured the correct encoding of the character
/// @todo iox-#1755 this path should never be reached since we ensured the correct encoding of the character
/// conversion specifier; nevertheless, we might want to call the error handler after the error handler
/// refactoring was merged
}
Expand All @@ -149,7 +149,7 @@ void ConsoleLogger::createLogMessageHeader(const char* file,
}
else
{
/// @todo iox-#1345 currently the buffer is large enough that this does not happen but once the file or
/// @todo iox-#1755 currently the buffer is large enough that this does not happen but once the file or
/// function will also be printed, they might be too long to fit into the buffer and will be truncated; once
/// that feature is implemented, we need to take care of it
getThreadLocalData().bufferWriteIndex = ThreadLocalData::BUFFER_SIZE;
Expand All @@ -161,7 +161,7 @@ void ConsoleLogger::flush() noexcept
{
if (std::puts(&getThreadLocalData().buffer[0]) < 0)
{
/// @todo iox-#1345 printing to the console failed; call the error handler after the error handler refactoring
/// @todo iox-#1755 printing to the console failed; call the error handler after the error handler refactoring
/// was merged
}
assumeFlushed();
Expand Down Expand Up @@ -204,7 +204,7 @@ void ConsoleLogger::logString(const char* message) noexcept

if (retVal < 0)
{
/// @todo iox-#1345 this path should never be reached since we ensured the correct encoding of the character
/// @todo iox-#1755 this path should never be reached since we ensured the correct encoding of the character
/// conversion specifier; nevertheless, we might want to call the error handler after the error handler
/// refactoring was merged
}
Expand All @@ -218,7 +218,7 @@ void ConsoleLogger::logString(const char* message) noexcept
}
else
{
/// @todo iox-#1345 currently we don't support log messages larger than the log buffer and everything larger
/// @todo iox-#1755 currently we don't support log messages larger than the log buffer and everything larger
/// that the log buffer will be truncated;
/// it is intended to flush the buffer and create a new log message later on
data.bufferWriteIndex = ThreadLocalData::BUFFER_SIZE;
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_hoofs/test/moduletests/test_console_logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class LoggerSUT : public iox::log::ConsoleLogger
using iox::log::ConsoleLogger::logString;
};

/// @todo iox-#1345 this test will be done via the integration tests with launch testing once "RouDi is ready for
/// @todo iox-#1755 this test will be done via the integration tests with launch testing once "RouDi is ready for
/// clients" will be printed via the logger
#if 0
TEST(ConsoleLogger_test, TestOutput)
Expand Down
4 changes: 2 additions & 2 deletions iceoryx_hoofs/test/moduletests/test_logstream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ TEST_F(IoxLogStream_test, StreamOperatorLogLevel)
}

#if 0
/// @todo iox-#1345 re-enable when LogRawBuffer will be re-implemented
/// @todo iox-#1755 re-enable when LogRawBuffer will be re-implemented

TEST_F(IoxLogStream_test, StreamOperatorLogRawBuffer)
{
Expand Down Expand Up @@ -249,7 +249,7 @@ TYPED_TEST(IoxLogStreamHexOctBinIntegral_test, StreamOperatorLogOct_ValueMax)
}

#if 0
/// @todo iox-#1345 re-enable when LogBin will be re-implemented
/// @todo iox-#1755 re-enable when LogBin will be re-implemented

template <typename LogType>
void testStreamOperatorLogBin(Logger_Mock& loggerMock, LogType logValue)
Expand Down
2 changes: 1 addition & 1 deletion iceoryx_hoofs/test/stresstests/test_hoofs_stress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

using namespace ::testing;

/// @todo iox-#1345 init testing logger
/// @todo iox-#1755 init testing logger
int main(int argc, char* argv[])
{
::testing::InitGoogleTest(&argc, argv);
Expand Down
4 changes: 2 additions & 2 deletions iceoryx_hoofs/testing/testing_logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ void LogPrinter::OnTestStart(const ::testing::TestInfo&)
dynamic_cast<TestingLogger&>(log::Logger::get()).clearLogBuffer();
TestingLogger::setLogLevel(log::LogLevel::TRACE);

/// @todo iox-#1345 register signal handler for sigterm to flush to logger;
/// @todo iox-#1755 register signal handler for sigterm to flush to logger;
/// there might be tests to register a handler itself and when this is
/// done at each start of the test only the tests who use their
/// own signal handler are affected and don't get an log output on termination
Expand All @@ -120,7 +120,7 @@ void LogPrinter::OnTestPartResult(const ::testing::TestPartResult& result)
dynamic_cast<TestingLogger&>(log::Logger::get()).printLogBuffer();
}

/// @todo iox-#1345 de-register the signal handler from 'OnTestStart'
/// @todo iox-#1755 de-register the signal handler from 'OnTestStart'
}

} // namespace testing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#ifndef IOX_POSH_LOG_POSH_LOGGING_HPP
#define IOX_POSH_LOG_POSH_LOGGING_HPP

// @todo iox-#1345 for transition only; delete this file
// @todo iox-#1755 for transition only; delete this file

#include "iceoryx_hoofs/log/logging.hpp"

Expand Down

0 comments on commit 609f868

Please sign in to comment.