1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef LogModulePrefWatcher_h
8 #define LogModulePrefWatcher_h
10 #include "nsIObserver.h"
15 * Watches for changes to "logging.*" prefs and then updates the appropriate
16 * LogModule's log level. Both the integer and string versions of the LogLevel
19 * For example setting the pref "logging.Foo" to "Verbose" will set the
20 * LogModule for "Foo" to the LogLevel::Verbose level. Setting "logging.Bar" to
21 * 4 would set the LogModule for "Bar" to the LogLevel::Debug level.
23 class LogModulePrefWatcher
: public nsIObserver
{
29 * Starts observing logging pref changes.
31 static void RegisterPrefWatcher();
34 LogModulePrefWatcher();
35 virtual ~LogModulePrefWatcher() = default;
37 } // namespace mozilla
39 #endif // LogModulePrefWatcher_h