diff --git a/openbr/universal_template.cpp b/openbr/universal_template.cpp index fc72586..2919b2f 100644 --- a/openbr/universal_template.cpp +++ b/openbr/universal_template.cpp @@ -96,3 +96,8 @@ void br_iterate_utemplates_file(FILE *file, br_utemplate_callback callback, br_c } futures.waitForFinished(); } + +void br_log(const char *message) +{ + qDebug() << qPrintable(QTime::currentTime().toString("hh:mm:ss.zzz")) << "-" << message; +} diff --git a/openbr/universal_template.h b/openbr/universal_template.h index f7fc9bd..c4b4271 100644 --- a/openbr/universal_template.h +++ b/openbr/universal_template.h @@ -83,6 +83,11 @@ BR_EXPORT void br_iterate_utemplates(br_const_utemplate begin, br_const_utemplat */ BR_EXPORT void br_iterate_utemplates_file(FILE *file, br_utemplate_callback callback, br_callback_context context, bool parallel); +/*! + * \brief Write a message annotated with the current time to stderr. + */ +BR_EXPORT void br_log(const char *message); + #ifdef __cplusplus } #endif