Loading...
Searching...
No Matches
enablesZone.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "clog/common.hpp"
5
6namespace by {
7
8 typedef std::map<std::string, nbool> enables;
9
39 class _nout enablesZone {
40 BY(ME(enablesZone))
41
42 public:
49 enablesZone(nbool newVal);
51
52 public:
53 const enables& getPrev() const;
59 me& setPrev();
64 me& rel();
65
71 me& setEnable(nbool newVal);
78 me& setEnable(const std::string& streamName, nbool newVal);
79
80 private:
81 enables _enables;
82 };
83}
Temporary scope-based enable/disable zone for logging streams.
Definition enablesZone.hpp:39
enablesZone(nbool newVal)
Constructs an enablesZone and immediately sets all logging streams to the specified enable state,...
me & setEnable(const std::string &streamName, nbool newVal)
Sets the enable state for a specific named stream.
me & setPrev()
Captures the current enable states of all streams as the new "previous" state. This state will be res...
me & setEnable(nbool newVal)
Sets the enable state for all streams managed by the logger.
me & rel()
Manually releases the enablesZone, preventing restoration of stream states on destruction.