summaryrefslogtreecommitdiff
path: root/2004/i/nono/src/logger/log.h
diff options
context:
space:
mode:
authorschodet2004-04-16 16:46:46 +0000
committerschodet2004-04-16 16:46:46 +0000
commita3a3a4d6d183b22036a606cda8553192c98321cd (patch)
tree37d158408eabfbb8524d1214a985a44e376ee333 /2004/i/nono/src/logger/log.h
parente68b824329a537eddddd5b59b9bdf498698ee604 (diff)
Logger fonctionne.
MovementRotation aussi. Ajout de Serial::wait. Ajout de commentaires.
Diffstat (limited to '2004/i/nono/src/logger/log.h')
-rw-r--r--2004/i/nono/src/logger/log.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/2004/i/nono/src/logger/log.h b/2004/i/nono/src/logger/log.h
index d2add57..2d919cd 100644
--- a/2004/i/nono/src/logger/log.h
+++ b/2004/i/nono/src/logger/log.h
@@ -30,26 +30,26 @@
class Logger;
-class Log : public std::ostream, protected std::streambuf
+class Log : protected std::streambuf, public std::ostream
{
public:
enum Level
{
- none,
- fatal,
- error,
- warning,
- info,
- debug,
- verydebug,
- nbLevel
+ none = 0x00,
+ fatal = 0x01,
+ error = 0x02,
+ warning = 0x04,
+ info = 0x08,
+ debug = 0x10,
+ verydebug = 0x20,
+ levelReserved = 0xffff
};
private:
std::string module_;
std::string instance_;
std::string buffer_;
static Logger logger_;
- Level maxLevel_;
+ Level levelMask_;
Level curLevel_;
public:
/// Constructeur.
@@ -62,6 +62,8 @@ class Log : public std::ostream, protected std::streambuf
static void toString (Level level, std::string &s);
/// Traduit le niveau de log.
static Level toLevel (const std::string &level);
+ /// Traduit le masque de niveau de log.
+ static Level toLevelMask (const std::string &level);
protected:
/// Appellé lorsque le tampon streambuf déborde.
int overflow (int c);