Skip to content

Commit

Permalink
fix reference in python/change default logging level (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmrichard authored May 31, 2024
1 parent c33ccb7 commit 88a38cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/parallelzone/logging/detail_/spdlog/spdlog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ inline auto map_severity_levels(Logger::severity s) {
// -----------------------------------------------------------------------------

SpdlogPIMPL::SpdlogPIMPL(spdlog_type logger) : m_logger_(std::move(logger)) {
m_logger_.set_level(spdlog::level::trace);
m_logger_.set_level(spdlog::level::info);
}

SpdlogPIMPL::pimpl_ptr SpdlogPIMPL::clone_() const {
Expand All @@ -89,4 +89,4 @@ bool SpdlogPIMPL::are_equal_(const LoggerPIMPL& other) const noexcept {
return m_logger_.name() == p->m_logger_.name();
}

} // namespace parallelzone::detail_
} // namespace parallelzone::detail_
3 changes: 2 additions & 1 deletion src/python/runtime/runtime_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ void export_runtime_view(pybind11::module_& m) {
.def("has_me", &RuntimeView::has_me)
.def("my_resource_set", &RuntimeView::my_resource_set)
.def("count", &RuntimeView::count)
.def("logger", &RuntimeView::logger)
.def("logger", &RuntimeView::logger,
pybind11::return_value_policy::reference_internal)
.def("stack_callback", &RuntimeView::stack_callback)
.def(pybind11::self == pybind11::self)
.def(pybind11::self != pybind11::self);
Expand Down

0 comments on commit 88a38cf

Please sign in to comment.