17 #if defined(OIIO_ERRORHANDLER_HIDE_PRINTF) || defined(OIIO_INTERNAL)
18 # define OIIO_ERRORHANDLER_PRINTF_DEPRECATED \
20 "old style (printf-like) formatting version of this function is deprecated")
22 # define OIIO_ERRORHANDLER_PRINTF_DEPRECATED
77 int verbosity() const noexcept {
return m_verbosity; }
83 virtual void operator()(
int errcode,
const std::string& msg);
86 void info(
const std::string& msg) { (*this)(EH_INFO, msg); }
87 void warning(
const std::string& msg) { (*this)(EH_WARNING, msg); }
88 void error(
const std::string& msg) { (*this)(EH_ERROR, msg); }
89 void severe(
const std::string& msg) { (*this)(EH_SEVERE, msg); }
90 void message(
const std::string& msg) { (*this)(EH_MESSAGE, msg); }
92 void debug(
const std::string& msg) { (*this)(EH_DEBUG, msg); }
94 void debug(
const std::string&) {}
100 template<
typename... Args>
103 if (verbosity() >= VERBOSE)
110 template<
typename... Args>
113 if (verbosity() >=
NORMAL)
119 template<
typename... Args>
127 template<
typename... Args>
136 template<
typename... Args>
139 if (verbosity() > QUIET)
146 template<
typename... Args>
148 const Args&...
args OIIO_MAYBE_UNUSED)
160 template<
typename... Args>
164 if (verbosity() >= VERBOSE)
168 template<
typename... Args>
172 if (verbosity() >=
NORMAL)
176 template<
typename... Args>
183 template<
typename... Args>
190 template<
typename... Args>
194 if (verbosity() > QUIET)
198 template<
typename... Args>
201 const Args&...
args OIIO_MAYBE_UNUSED)
213 template<
typename... Args>
216 if (verbosity() >= VERBOSE)
220 template<
typename... Args>
223 if (verbosity() >=
NORMAL)
227 template<
typename... Args>
233 template<
typename... Args>
239 template<
typename... Args>
242 if (verbosity() > QUIET)
246 template<
typename... Args>
GLuint GLsizei const GLchar * message
OIIO_ERRORHANDLER_PRINTF_DEPRECATED void errorf(const char *format, const Args &...args)
void error(const std::string &msg)
void messagefmt(const char *format, const Args &...args)
OIIO_FORMAT_DEPRECATED void error(const char *format, const Args &...args)
OIIO_FORMAT_DEPRECATED void debug(const char *format OIIO_MAYBE_UNUSED, const Args &...args OIIO_MAYBE_UNUSED)
OIIO_NODISCARD std::string format(const Str &fmt, Args &&...args)
OIIO_ERRORHANDLER_PRINTF_DEPRECATED void messagef(const char *format, const Args &...args)
void warning(const std::string &msg)
void severe(const std::string &msg)
String-related utilities, all in namespace Strutil.
OIIO_ERRORHANDLER_PRINTF_DEPRECATED void debugf(const char *format OIIO_MAYBE_UNUSED, const Args &...args OIIO_MAYBE_UNUSED)
void debug(const std::string &msg)
void debugfmt(const char *format, const Args &...args)
OIIO_FORMAT_DEPRECATED void message(const char *format, const Args &...args)
GLint GLint GLsizei GLint GLenum format
void verbosity(int v) noexcept
Set desired verbosity level.
void warningfmt(const char *format, const Args &...args)
OIIO_ERRORHANDLER_PRINTF_DEPRECATED void infof(const char *format, const Args &...args)
OIIO_ERRORHANDLER_PRINTF_DEPRECATED void warningf(const char *format, const Args &...args)
OIIO_FORMAT_DEPRECATED void warning(const char *format, const Args &...args)
void infofmt(const char *format, const Args &...args)
OIIO_FORMAT_DEPRECATED void info(const char *format, const Args &...args)
**If you just want to fire and args
#define OIIO_ERRORHANDLER_PRINTF_DEPRECATED
#define OIIO_FORMAT_DEPRECATED
void info(const std::string &msg)
#define OIIO_NAMESPACE_END
auto sprintf(const S &fmt, const T &...args) -> std::basic_string< Char >
OIIO_ERRORHANDLER_PRINTF_DEPRECATED void severef(const char *format, const Args &...args)
int verbosity() const noexcept
Return the current verbosity level.
void message(const std::string &msg)
void severefmt(const char *format, const Args &...args)
void errorfmt(const char *format, const Args &...args)
#define OIIO_NAMESPACE_BEGIN
OIIO_FORMAT_DEPRECATED void severe(const char *format, const Args &...args)