diff --git a/include/slimlog/sink-inl.h b/include/slimlog/sink-inl.h index f800d7d..aac2202 100644 --- a/include/slimlog/sink-inl.h +++ b/include/slimlog/sink-inl.h @@ -33,18 +33,16 @@ namespace SlimLog { template -auto Sink::set_pattern(StringViewType pattern) -> std::shared_ptr> +auto Sink::set_pattern(StringViewType pattern) -> void { m_pattern.set_pattern(std::move(pattern)); - return this->shared_from_this(); } template auto Sink::set_levels(std::initializer_list> levels) - -> std::shared_ptr> + -> void { m_pattern.set_levels(std::move(levels)); - return this->shared_from_this(); } template diff --git a/include/slimlog/sink.h b/include/slimlog/sink.h index 997bb64..e5ca07d 100644 --- a/include/slimlog/sink.h +++ b/include/slimlog/sink.h @@ -30,7 +30,7 @@ namespace SlimLog { * @tparam Logger The logger class type intended for use with this sink. */ template -class Sink : public std::enable_shared_from_this> { +class Sink { public: /** @brief String type for log messages. */ using StringType = typename Logger::StringType; @@ -97,7 +97,7 @@ class Sink : public std::enable_shared_from_this> { * @param pattern Log message pattern. * @return Pointer to the self sink object. */ - virtual auto set_pattern(StringViewType pattern) -> std::shared_ptr>; + virtual auto set_pattern(StringViewType pattern) -> void; /** * @brief Sets the log level names. @@ -111,8 +111,7 @@ class Sink : public std::enable_shared_from_this> { * @param levels List of log levels with corresponding names. * @return Pointer to the self sink object. */ - virtual auto set_levels(std::initializer_list> levels) - -> std::shared_ptr>; + virtual auto set_levels(std::initializer_list> levels) -> void; /** * @brief Processes a log record.