Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove static Log::log() and Log::logMsg() methods (DM-6978). #19

Merged
merged 1 commit into from
Oct 15, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 0 additions & 6 deletions include/lsst/log/Log.h
Original file line number Diff line number Diff line change
Expand Up @@ -778,15 +778,9 @@ class Log {
static void MDCRemove(std::string const& key);
static int MDCRegisterInit(std::function<void()> function);

static void log(Log logger, log4cxx::LevelPtr level,
log4cxx::spi::LocationInfo const& location,
char const* fmt, ...);
void log(log4cxx::LevelPtr level,
log4cxx::spi::LocationInfo const& location,
char const* fmt, ...);
static void logMsg(Log logger, log4cxx::LevelPtr level,
log4cxx::spi::LocationInfo const& location,
std::string const& msg);
void logMsg(log4cxx::LevelPtr level,
log4cxx::spi::LocationInfo const& location,
std::string const& msg);
Expand Down
28 changes: 1 addition & 27 deletions src/Log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -391,23 +391,7 @@ void Log::log(log4cxx::LevelPtr level, ///< message level
logMsg(level, location, msg);
}

/** Method used by LOG_INFO and similar macros to process a log message
* with variable arguments along with associated metadata.
*/
void Log::log(Log logger, ///< the logger
log4cxx::LevelPtr level, ///< message level
log4cxx::spi::LocationInfo const& location, ///< message origin location
char const* fmt, ///< message format string
... ///< message arguments
) {
va_list args;
va_start(args, fmt);
char msg[MAX_LOG_MSG_LEN];
vsnprintf(msg, MAX_LOG_MSG_LEN, fmt, args);
logger.logMsg(level, location, msg);
}

/** Method used by LOGS_INFO and similar macros to process a log message..
/** Method used by LOGS_INFO and similar macros to process a log message.
*/
void Log::logMsg(log4cxx::LevelPtr level, ///< message level
log4cxx::spi::LocationInfo const& location, ///< message origin location
Expand All @@ -434,16 +418,6 @@ void Log::logMsg(log4cxx::LevelPtr level, ///< message level
_logger->forcedLog(level, msg, location);
}

/** Method used by LOGS_INFO and similar macros to process a log message..
*/
void Log::logMsg(Log logger, ///< the logger
log4cxx::LevelPtr level, ///< message level
log4cxx::spi::LocationInfo const& location, ///< message origin location
std::string const& msg ///< message string
) {
logger.logMsg(level, location, msg);
}

unsigned lwpID() {
return detail::lwpID();
}
Expand Down