fix a small logging issue
This commit is contained in:
parent
5d739b4993
commit
ec86bc0345
|
@ -77,7 +77,7 @@ void FileLogger::addMessage(string file,int line,int loglevel,string logmessage)
|
||||||
if(cfg.getLogRotationFrequency()>0&&last_rotation+(cfg.getLogRotationFrequency()*60)<time(NULL))
|
if(cfg.getLogRotationFrequency()>0&&last_rotation+(cfg.getLogRotationFrequency()*60)<time(NULL))
|
||||||
{
|
{
|
||||||
rotateLog();
|
rotateLog();
|
||||||
addMessage(__FILE__,__LINE__,LOG_DEBUG,"Rotated log to file " + getProcessedRotateFilename() + " at " + Utils::ulongtostr(time(NULL)) + " with a last rotation of " + Utils::ulongtostr(last_rotation));
|
addMessage(__FILE__,__LINE__,HERMES_LOG_DEBUG,"Rotated log to file " + getProcessedRotateFilename() + " at " + Utils::ulongtostr(time(NULL)) + " with a last rotation of " + Utils::ulongtostr(last_rotation));
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
10
src/Logger.h
10
src/Logger.h
|
@ -38,11 +38,11 @@ class Logger
|
||||||
#include "UnixLogger.h"
|
#include "UnixLogger.h"
|
||||||
#endif //WIN32
|
#endif //WIN32
|
||||||
|
|
||||||
#ifndef LOG_INFO
|
#ifndef HERMES_LOG_INFO
|
||||||
#define LOG_ERR 0
|
#define HERMES_LOG_ERR 0
|
||||||
#define LOG_INFO 1
|
#define HERMES_LOG_INFO 1
|
||||||
#define LOG_DEBUG 2
|
#define HERMES_LOG_DEBUG 2
|
||||||
#endif //LOG_INFO
|
#endif //HERMES_LOG_INFO
|
||||||
#include "FileLogger.h"
|
#include "FileLogger.h"
|
||||||
#include "NullLogger.h"
|
#include "NullLogger.h"
|
||||||
|
|
||||||
|
|
|
@ -27,9 +27,9 @@
|
||||||
|
|
||||||
#define _(x) (x)
|
#define _(x) (x)
|
||||||
#define LOG(x,y) hermes_log.addMessage(__FILE__,__LINE__,x,y)
|
#define LOG(x,y) hermes_log.addMessage(__FILE__,__LINE__,x,y)
|
||||||
#define LERR(x) LOG(LOG_ERR,x)
|
#define LERR(x) LOG(HERMES_LOG_ERR,x)
|
||||||
#define LINF(x) LOG(LOG_INFO,x)
|
#define LINF(x) LOG(HERMES_LOG_INFO,x)
|
||||||
#define LDEB(x) LOG(LOG_DEBUG,x)
|
#define LDEB(x) LOG(HERMES_LOG_DEBUG,x)
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
Loading…
Reference in a new issue