Add errorlog.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
tastytea 2020-01-05 20:39:05 +01:00
parent 3c6c56d973
commit cb7dee1ab7
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07

View File

@ -39,12 +39,14 @@ constexpr auto shorten_filename(const string_view &filename)
return filename; return filename;
} }
#define commonlog cerr << '[' << shorten_filename(__FILE__) \
<< ':' << __LINE__ << ']'
#ifndef NDEBUG #ifndef NDEBUG
#define debuglog cerr << "[" << shorten_filename(__FILE__) \ #define debuglog commonlog << " DEBUG: "
<< ':' << __LINE__ << "] DEBUG: "
#else #else
#define debuglog false && cerr #define debuglog false && cerr
#endif #endif
#define errorlog commonlog << " ERROR: "
} // namespace mastodonpp } // namespace mastodonpp