From 27c2e3e571f3289e61729b920004bdb84bd70d0e Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Tue, 8 Jul 2014 11:53:28 -0400 Subject: [PATCH] introduced br_log --- openbr/universal_template.cpp | 5 +++++ openbr/universal_template.h | 5 +++++ 2 files changed, 10 insertions(+), 0 deletions(-) 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 -- libgit2 0.21.4