2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Added const qualifier to argument Exception& e.
	* src/Logger.h
	* src/SimpleLogger.cc
	* src/SimpleLogger.h
pull/1/head
Tatsuhiro Tsujikawa 2008-05-10 05:16:16 +00:00
parent e71b09a9dc
commit a780fcacc4
4 changed files with 22 additions and 15 deletions

View File

@ -1,3 +1,10 @@
2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added const qualifier to argument Exception& e.
* src/Logger.h
* src/SimpleLogger.cc
* src/SimpleLogger.h
2008-05-10 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Pool connection when CWD, SIZE command fails.

View File

@ -45,15 +45,15 @@ class Logger {
public:
virtual ~Logger() {}
virtual void debug(const char* msg, ...) = 0;
virtual void debug(const char* msg, Exception& ex, ...) = 0;
virtual void debug(const char* msg, const Exception& ex, ...) = 0;
virtual void info(const char* msg, ...) = 0;
virtual void info(const char* msg, Exception& ex, ...) = 0;
virtual void info(const char* msg, const Exception& ex, ...) = 0;
virtual void notice(const char* msg, ...) = 0;
virtual void notice(const char* msg, Exception& ex, ...) = 0;
virtual void notice(const char* msg, const Exception& ex, ...) = 0;
virtual void warn(const char* msg, ...) = 0;
virtual void warn(const char* msg, Exception& ex, ...) = 0;
virtual void warn(const char* msg, const Exception& ex, ...) = 0;
virtual void error(const char* msg, ...) = 0;
virtual void error(const char* msg, Exception& ex, ...) = 0;
virtual void error(const char* msg, const Exception& ex, ...) = 0;
enum LEVEL {
DEBUG = 1 << 0,

View File

@ -176,7 +176,7 @@ void SimpleLogger::debug(const char* msg, ...) {
WRITE_LOG(DEBUG, msg);
}
void SimpleLogger::debug(const char* msg, Exception& e, ...) {
void SimpleLogger::debug(const char* msg, const Exception& e, ...) {
WRITE_LOG_EX(DEBUG, msg, e);
}
@ -184,7 +184,7 @@ void SimpleLogger::info(const char* msg, ...) {
WRITE_LOG(INFO, msg);
}
void SimpleLogger::info(const char* msg, Exception& e, ...) {
void SimpleLogger::info(const char* msg, const Exception& e, ...) {
WRITE_LOG_EX(INFO, msg, e);
}
@ -192,7 +192,7 @@ void SimpleLogger::notice(const char* msg, ...) {
WRITE_LOG(NOTICE, msg);
}
void SimpleLogger::notice(const char* msg, Exception& e, ...) {
void SimpleLogger::notice(const char* msg, const Exception& e, ...) {
WRITE_LOG_EX(INFO, msg, e);
}
@ -200,7 +200,7 @@ void SimpleLogger::warn(const char* msg, ...) {
WRITE_LOG(WARN, msg);
}
void SimpleLogger::warn(const char* msg, Exception& e, ...) {
void SimpleLogger::warn(const char* msg, const Exception& e, ...) {
WRITE_LOG_EX(WARN, msg, e);
}
@ -208,7 +208,7 @@ void SimpleLogger::error(const char* msg, ...) {
WRITE_LOG(ERROR, msg);
}
void SimpleLogger::error(const char* msg, Exception& e, ...) {
void SimpleLogger::error(const char* msg, const Exception& e, ...) {
WRITE_LOG_EX(ERROR, msg, e);
}

View File

@ -66,15 +66,15 @@ public:
void openFile(const std::string& filename);
void closeFile();
virtual void debug(const char* msg, ...);
virtual void debug(const char* msg, Exception& ex, ...);
virtual void debug(const char* msg, const Exception& ex, ...);
virtual void info(const char* msg, ...);
virtual void info(const char* msg, Exception& ex, ...);
virtual void info(const char* msg, const Exception& ex, ...);
virtual void notice(const char* msg, ...);
virtual void notice(const char* msg, Exception& ex, ...);
virtual void notice(const char* msg, const Exception& ex, ...);
virtual void warn(const char* msg, ...);
virtual void warn(const char* msg, Exception& ex, ...);
virtual void warn(const char* msg, const Exception& ex, ...);
virtual void error(const char* msg, ...);
virtual void error(const char* msg, Exception& ex, ...);
virtual void error(const char* msg, const Exception& ex, ...);
void setStdout(Logger::LEVEL level, bool enabled);
};