Skip to content

Commit

Permalink
Tweaks
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Agüero <[email protected]>
  • Loading branch information
caguero committed Aug 19, 2024
1 parent be88966 commit 0ac9ddd
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
4 changes: 2 additions & 2 deletions log/include/gz/utils/log/Logger.hh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include <memory>
#include <string>
#include <gz/utils/config.hh>
#include <gz/utils/Export.hh>
#include <gz/utils/ImplPtr.hh>
#include <gz/utils/log/Export.hh>

namespace gz
{
Expand Down Expand Up @@ -60,7 +60,7 @@ class GZ_UTILS_LOG_VISIBLE Logger
/// \brief Implementation Pointer.
GZ_UTILS_UNIQUE_IMPL_PTR(dataPtr)
};
} // namespace GZ_UTILS_VERSION_NAMESPACE
} // namespace GZ_UTILS_LOG_VERSION_NAMESPACE
} // namespace log
} // namespace utils
} // namespace gz
Expand Down
17 changes: 15 additions & 2 deletions log/include/gz/utils/log/SplitSink.hh
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,24 @@
#include <utility>
#include <vector>

#include <gz/utils/config.hh>
#include <gz/utils/log/Export.hh>

#include <spdlog/details/log_msg.h>
#include <spdlog/details/null_mutex.h>
#include <spdlog/pattern_formatter.h>
#include <spdlog/sinks/base_sink.h>
#include <spdlog/sinks/ringbuffer_sink.h>
#include <spdlog/sinks/stdout_color_sinks.h>

namespace gz::utils::log
namespace gz
{
namespace utils
{
namespace log
{
inline namespace GZ_UTILS_LOG_VERSION_NAMESPACE {

/// \brief Logging sink for spdlog that logs in Gazebo-conventions.
///
/// This will route messages with severity (warn, err, critical) to stderr,
Expand Down Expand Up @@ -207,5 +216,9 @@ class SplitRingBufferSink: public spdlog::sinks::base_sink<Mutex>
template <size_t numItems>
using SplitRingBufferSinkMt = SplitRingBufferSink<std::mutex, numItems>;

} // namespace gz::utils::log
} // namespace GZ_UTILS_LOG_VERSION_NAMESPACE
} // namespace log
} // namespace utils
} // namespace gz

#endif // GZ_UTILS_LOG_SPLITSINK_HH__
1 change: 0 additions & 1 deletion log/src/SplitSink_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/

#include <gtest/gtest.h>

#include <spdlog/logger.h>
#include <gz/utils/log/SplitSink.hh>

Expand Down

0 comments on commit 0ac9ddd

Please sign in to comment.