Boost C++ Libraries: Ticket #13594: init_from_settings does not allow repeated calls https://svn.boost.org/trac10/ticket/13594 <p> I have an application that causes init_from_settings to be called repeatedly, which does not quite work as I expected. I noticed that this causes memory use to grow, presumably because old sinks are not removed and new sinks are added which each call, which (to me) is unexpected behaviour. I understand that sinks can be removed by calling remove_all_sinks() before (re)initialization, but it would be much nicer when init_from_settings would just configure the logging system 'from scratch' (I am not currently sure that I can fully revert the system to an uninitialized state before calling init_from_settings). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13594 Trac 1.4.3 Andrey Semashev Wed, 13 Jun 2018 10:24:38 GMT <link>https://svn.boost.org/trac10/ticket/13594#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/13594#comment:1</guid> <description> <p> The current behavior is by design as the library does not discriminate between sinks added by init_from_settings or by the user manually. Removing all sinks from init_from_settings would remove sinks that might not have been added by that call previously, which is not quite the expected behavior either. </p> <p> Calling remove_all_sinks from the application does remove all sinks, so if that is what you want then this is the way to go. The only other thing init_from_settings does is configuration of the logging core by setting the global filter and enabling/disabling logging completely, which replaces the previous configuration. </p> </description> <category>Ticket</category> </item> </channel> </rss>