Yes, the easiest way is to reload the config file. However, you can do this several ways: 1. Instead of using PropertyConfigurator::configure(), use PropertyConfigurator::configureAndWatch(), which will start a new thread that will periodically check the config file for changes. 2. Watch the file using some sort of system file notification API(inotify on Linux; look at QFileSystemWatcher if you use Qt) and then call PropertyConfigurator::configure(). 3. Completely ignore the config file and change settings via code. This is more complicated, but you can do things like change log levels and add/remove appenders via the API, which is essentially what PropertyConfigurator::configure() does in the first place.
-Robert Middleton On Fri, Nov 13, 2020 at 7:33 PM xpetrl <xpe...@beepc.ch> wrote: > > Hi List, > > As a general question, do I have to reload the config file to change > properties on the the fly, when my app runs ? > > PropertyConfigurator::configure("log4cxx.properties"); > > something à la monitorInterval exist for c++? > > Thanks > > xpetrl > >