1 #ifndef _LOG4SX_LOG4SX_H_
2 #define _LOG4SX_LOG4SX_H_
9 #include <export/Export.h>
10 #include <sx/Exception.h>
15 #include <boost/timer.hpp>
67 EXL Level(
const Level &l);
72 EXL Level &operator = (
const Level &l);
126 EXL
string getMessage()
const;
158 EXL Annotation(
const Annotation &a);
163 EXL Annotation &operator = (
const Annotation &a);
168 EXL
string getAnnotation()
const;
193 static map<string,Logger *> loggers;
201 static Logger *defaultLogger;
212 static Logger *initDefaultLogger();
252 bool takeMessage()
const;
259 EXL
static string newLine();
271 EXL
static void addLogger(
string ID,
Logger *logger);
281 EXL
static void setDefaultLogger(
string ID);
288 EXL
static Logger &
get();
297 EXL
static void deleteLogger(
string ID);
307 EXL
void setMinLevel(
LogLevel level);
358 EXL
virtual Logger & operator << (
char value) = 0;
364 EXL
virtual Logger & operator << (
unsigned char value) = 0;
370 EXL
virtual Logger & operator << (
short value) = 0;
376 EXL
virtual Logger & operator << (
unsigned short value) = 0;
382 EXL
virtual Logger & operator << (
int value) = 0;
388 EXL
virtual Logger & operator << (
unsigned int value) = 0;
394 EXL
virtual Logger & operator << (
long value) = 0;
400 EXL
virtual Logger & operator << (
unsigned long value) = 0;
406 EXL
virtual Logger & operator << (
float value) = 0;
412 EXL
virtual Logger & operator << (
double value) = 0;
418 EXL
virtual Logger & operator << (
string value) = 0;
452 EXL ~ConsoleLogger();
480 EXL
Logger & operator << (
char value);
487 EXL
Logger & operator << (
unsigned char value);
494 EXL
Logger & operator << (
short value);
501 EXL
Logger & operator << (
unsigned short value);
508 EXL
Logger & operator << (
int value);
515 EXL
Logger & operator << (
unsigned int value);
522 EXL
Logger & operator << (
long value);
529 EXL
Logger & operator << (
unsigned long value);
536 EXL
Logger & operator << (
float value);
543 EXL
Logger & operator << (
double value);
550 EXL
Logger & operator << (
string value);
570 vector<unsigned char> uchars;
575 vector<short> shorts;
580 vector<unsigned short> ushorts;
590 vector<unsigned int> uints;
600 vector<unsigned long> ulongs;
605 vector<float> floats;
610 vector<double> doubles;
615 vector<string> strings;
620 vector<Annotation> annotations;
634 EXL ListMarkup(
const ListMarkup &m);
639 EXL ListMarkup &operator = (
const ListMarkup &m);
649 EXL vector<char> & getChars();
654 EXL vector<unsigned char> & getUchars();
659 EXL vector<short> & getShorts();
664 EXL vector<unsigned short> & getUshorts();
669 EXL vector<int> & getInts();
674 EXL vector<unsigned int> & getUints();
679 EXL vector<long> & getLongs();
684 EXL vector<unsigned long> & getUlongs();
689 EXL vector<float> & getFloats();
694 EXL vector<double> & getDoubles();
699 EXL vector<string> & getStrings();
704 EXL vector<Annotation> & getAnnotations();
731 map<string,ListMarkup> markups;
781 EXL
Logger & operator << (
char value);
789 EXL
Logger & operator << (
unsigned char value);
797 EXL
Logger & operator << (
short value);
805 EXL
Logger & operator << (
unsigned short value);
813 EXL
Logger & operator << (
int value);
821 EXL
Logger & operator << (
unsigned int value);
829 EXL
Logger & operator << (
long value);
837 EXL
Logger & operator << (
unsigned long value);
845 EXL
Logger & operator << (
float value);
853 EXL
Logger & operator << (
double value);
861 EXL
Logger & operator << (
string value);
871 EXL map<string,ListMarkup> & getMarkups();
883 EXL
Annotation getAnnotationEntry(
string ID,
unsigned int index);
895 EXL
char getCharEntry(
string ID,
unsigned int index);
907 EXL
unsigned char getUcharEntry(
string ID,
unsigned int index);
919 EXL
short getShortEntry(
string ID,
unsigned int index);
931 EXL
unsigned short getUshortEntry(
string ID,
unsigned int index);
943 EXL
int getIntEntry(
string ID,
unsigned int index);
955 EXL
unsigned int getUintEntry(
string ID,
unsigned int index);
967 EXL
long getLongEntry(
string ID,
unsigned int index);
979 EXL
unsigned long getUlongEntry(
string ID,
unsigned int index);
991 EXL
float getFloatEntry(
string ID,
unsigned int index);
1003 EXL
double getDoubleEntry(
string ID,
unsigned int index);
1015 EXL
string getStringEntry(
string ID,
unsigned int index);
1087 boost::timer timeMeasurement;
1092 string INTERNAL_TABLE_PRINT_FUNCTION();
1093 string INTERNAL_SEPARATE_ANNOTATION();
1094 string INTERNAL_FINISH_TABLE();
1124 EXL
bool hasErrors()
const;
1159 EXL
Logger & operator << (
char value);
1166 EXL
Logger & operator << (
unsigned char value);
1173 EXL
Logger & operator << (
short value);
1180 EXL
Logger & operator << (
unsigned short value);
1187 EXL
Logger & operator << (
int value);
1194 EXL
Logger & operator << (
unsigned int value);
1201 EXL
Logger & operator << (
long value);
1208 EXL
Logger & operator << (
unsigned long value);
1215 EXL
Logger & operator << (
float value);
1222 EXL
Logger & operator << (
double value);
1229 EXL
Logger & operator << (
string value);
1241 #define SXout(MSG) sx::Logger::get() << MSG;
LogLevel
Definition: Log4SX.h:30
LogLevel minLevel
Definition: Log4SX.h:233
LogLevel level
Definition: Log4SX.h:240
Definition: Log4SX.h:1062
Definition: Log4SX.h:1049
FileLoggerState
Definition: Log4SX.h:1022
Definition: Log4SX.h:1034
Definition: Log4SX.h:1042
string message
Definition: Log4SX.h:94
Definition: Exception.h:13