00001
00002
00003
00004
00005
00006
00007 #pragma once
00008
00009 #include <iostream>
00010
00011 #include <Swiften/Base/API.h>
00012
00013 namespace Swift {
00014 extern SWIFTEN_API bool logging;
00015 namespace LogDetail {
00016
00017 namespace Severity {
00018 enum {
00019 debug, info, warning, error
00020 };
00021 }
00022 }
00023 }
00024
00025 #define SWIFT_LOG(severity) \
00026 if (!Swift::logging) {} else (void) LogDetail::Severity::severity, std::cerr << "[" << #severity << "] " << __FILE__ << ":" << __LINE__ << " " << __FUNCTION__ << ": "