accessors to levels ; typofix on _contextLevel
This commit is contained in:
parent
8dc13bbaff
commit
f39183b8d7
1 changed files with 18 additions and 3 deletions
|
|
@ -143,9 +143,24 @@ public:
|
||||||
|
|
||||||
virtual std::string className() const;
|
virtual std::string className() const;
|
||||||
|
|
||||||
void addLevel(std::string name, eo::Levels level);
|
//! Print the available levels on the standard output
|
||||||
void printLevels() const;
|
void printLevels() const;
|
||||||
|
|
||||||
|
/*! Returns the selected levels, that is the one asked by the user
|
||||||
|
*
|
||||||
|
* Use this function if you want to be able to compare selected levels to a given one, like:
|
||||||
|
* if( eo::log.getLevelSelected() >= eo::progress ) {...}
|
||||||
|
*/
|
||||||
|
eo::Levels getLevelSelected() const { return _selectedLevel; }
|
||||||
|
|
||||||
|
/*! Returns the current level of the context
|
||||||
|
* the one given when you output message with the logger
|
||||||
|
*/
|
||||||
|
eo::Levels getLevelContext() const { return _contextLevel; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void addLevel(std::string name, eo::Levels level);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/**
|
/**
|
||||||
* outbuf
|
* outbuf
|
||||||
|
|
@ -161,7 +176,7 @@ private:
|
||||||
virtual int overflow(int_type c);
|
virtual int overflow(int_type c);
|
||||||
private:
|
private:
|
||||||
const int& _fd;
|
const int& _fd;
|
||||||
const eo::Levels& _contexLevel;
|
const eo::Levels& _contextLevel;
|
||||||
const eo::Levels& _selectedLevel;
|
const eo::Levels& _selectedLevel;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -197,7 +212,7 @@ private:
|
||||||
* _selectedLevel is the member storing verbose level setted by the user thanks to operator()
|
* _selectedLevel is the member storing verbose level setted by the user thanks to operator()
|
||||||
*/
|
*/
|
||||||
eo::Levels _selectedLevel;
|
eo::Levels _selectedLevel;
|
||||||
eo::Levels _contexLevel;
|
eo::Levels _contextLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* _fd in storing the file descriptor at this place we can disable easily the buffer in
|
* _fd in storing the file descriptor at this place we can disable easily the buffer in
|
||||||
|
|
|
||||||
Reference in a new issue