mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-09 13:14:02 +02:00
Added "const" to CLoggerBase methods
This commit is contained in:
parent
f06e9c8538
commit
afa9de47e9
@ -33,7 +33,7 @@ namespace vstd
|
|||||||
virtual void log(ELogLevel::ELogLevel level, const std::string & message) const = 0;
|
virtual void log(ELogLevel::ELogLevel level, const std::string & message) const = 0;
|
||||||
|
|
||||||
template<typename T, typename ... Args>
|
template<typename T, typename ... Args>
|
||||||
void log(ELogLevel::ELogLevel level, const std::string & format, T t, Args ... args)
|
void log(ELogLevel::ELogLevel level, const std::string & format, T t, Args ... args) const
|
||||||
{
|
{
|
||||||
boost::format fmt(format);
|
boost::format fmt(format);
|
||||||
makeFormat(fmt, t, args...);
|
makeFormat(fmt, t, args...);
|
||||||
@ -47,7 +47,7 @@ namespace vstd
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<typename T, typename ... Args>
|
template<typename T, typename ... Args>
|
||||||
void error(const std::string & format, T t, Args ... args)
|
void error(const std::string & format, T t, Args ... args) const
|
||||||
{
|
{
|
||||||
log(ELogLevel::ERROR, format, t, args...);
|
log(ELogLevel::ERROR, format, t, args...);
|
||||||
}
|
}
|
||||||
@ -58,7 +58,7 @@ namespace vstd
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<typename T, typename ... Args>
|
template<typename T, typename ... Args>
|
||||||
void warn(const std::string & format, T t, Args ... args)
|
void warn(const std::string & format, T t, Args ... args) const
|
||||||
{
|
{
|
||||||
log(ELogLevel::WARN, format, t, args...);
|
log(ELogLevel::WARN, format, t, args...);
|
||||||
}
|
}
|
||||||
@ -69,7 +69,7 @@ namespace vstd
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<typename T, typename ... Args>
|
template<typename T, typename ... Args>
|
||||||
void info(const std::string & format, T t, Args ... args)
|
void info(const std::string & format, T t, Args ... args) const
|
||||||
{
|
{
|
||||||
log(ELogLevel::INFO, format, t, args...);
|
log(ELogLevel::INFO, format, t, args...);
|
||||||
}
|
}
|
||||||
@ -81,7 +81,7 @@ namespace vstd
|
|||||||
|
|
||||||
|
|
||||||
template<typename T, typename ... Args>
|
template<typename T, typename ... Args>
|
||||||
void debug(const std::string & format, T t, Args ... args)
|
void debug(const std::string & format, T t, Args ... args) const
|
||||||
{
|
{
|
||||||
log(ELogLevel::DEBUG, format, t, args...);
|
log(ELogLevel::DEBUG, format, t, args...);
|
||||||
}
|
}
|
||||||
@ -92,20 +92,20 @@ namespace vstd
|
|||||||
};
|
};
|
||||||
|
|
||||||
template<typename T, typename ... Args>
|
template<typename T, typename ... Args>
|
||||||
void trace(const std::string & format, T t, Args ... args)
|
void trace(const std::string & format, T t, Args ... args) const
|
||||||
{
|
{
|
||||||
log(ELogLevel::TRACE, format, t, args...);
|
log(ELogLevel::TRACE, format, t, args...);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void makeFormat(boost::format & fmt, T t)
|
void makeFormat(boost::format & fmt, T t) const
|
||||||
{
|
{
|
||||||
fmt % t;
|
fmt % t;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T, typename ... Args>
|
template <typename T, typename ... Args>
|
||||||
void makeFormat(boost::format & fmt, T t, Args ... args)
|
void makeFormat(boost::format & fmt, T t, Args ... args) const
|
||||||
{
|
{
|
||||||
fmt % t;
|
fmt % t;
|
||||||
makeFormat(fmt, args...);
|
makeFormat(fmt, args...);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user