43 #define DEFAULT_LOG_FOLDER "/tmp/" 44 #define DEFAULT_LOGFILE_PREFIX "am_dump_" 45 #define DEFAULT_LOGFILE_EXT ".log" 47 #define DEL( aPointer ) delete aPointer, aPointer = NULL; 61 std::ostream* mOutputStream;
65 virtual void log(
const std::string& _s)
67 (*mOutputStream) << _s;
68 mOutputStream->flush();
73 (*mOutputStream) << t;
80 std::string mFilename;
82 static void generateLogFilename(std::string &result);
83 explicit CAmFileLogger(
const std::string& _s) :
CAmLogger()
86 mOutputStream =
new std::ofstream(mFilename.c_str());
96 mOutputStream = &std::cout;
120 assert(mLogger!=NULL);
126 #define CAmLogger (*CAmLog::getDefaultLog())
CAmLog & operator<<(const T &t)
static CAmLog * getDefaultLog()
void log(DltContext *const context, DltLogLevelType loglevel, T value, TArgs...args)
logs given values with a given context (register first!) and given loglevel
void setLogType(const eCAmLogType type)
void instantiateLogger(const eCAmLogType type)
eCAmLogType getLogType() const