Commit 27c2e3e571f3289e61729b920004bdb84bd70d0e
1 parent
7bde150a
introduced br_log
Showing
2 changed files
with
10 additions
and
0 deletions
openbr/universal_template.cpp
| @@ -96,3 +96,8 @@ void br_iterate_utemplates_file(FILE *file, br_utemplate_callback callback, br_c | @@ -96,3 +96,8 @@ void br_iterate_utemplates_file(FILE *file, br_utemplate_callback callback, br_c | ||
| 96 | } | 96 | } |
| 97 | futures.waitForFinished(); | 97 | futures.waitForFinished(); |
| 98 | } | 98 | } |
| 99 | + | ||
| 100 | +void br_log(const char *message) | ||
| 101 | +{ | ||
| 102 | + qDebug() << qPrintable(QTime::currentTime().toString("hh:mm:ss.zzz")) << "-" << message; | ||
| 103 | +} |
openbr/universal_template.h
| @@ -83,6 +83,11 @@ BR_EXPORT void br_iterate_utemplates(br_const_utemplate begin, br_const_utemplat | @@ -83,6 +83,11 @@ BR_EXPORT void br_iterate_utemplates(br_const_utemplate begin, br_const_utemplat | ||
| 83 | */ | 83 | */ |
| 84 | BR_EXPORT void br_iterate_utemplates_file(FILE *file, br_utemplate_callback callback, br_callback_context context, bool parallel); | 84 | BR_EXPORT void br_iterate_utemplates_file(FILE *file, br_utemplate_callback callback, br_callback_context context, bool parallel); |
| 85 | 85 | ||
| 86 | +/*! | ||
| 87 | + * \brief Write a message annotated with the current time to stderr. | ||
| 88 | + */ | ||
| 89 | +BR_EXPORT void br_log(const char *message); | ||
| 90 | + | ||
| 86 | #ifdef __cplusplus | 91 | #ifdef __cplusplus |
| 87 | } | 92 | } |
| 88 | #endif | 93 | #endif |