-#ifndef __DALI_INTEGRATION_DEBUG_H__
-#define __DALI_INTEGRATION_DEBUG_H__
+#ifndef DALI_INTEGRATION_DEBUG_H
+#define DALI_INTEGRATION_DEBUG_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// EXTERNAL INCLUDES
#include <string>
#include <sstream>
+#include <iostream>
#include <list>
#include <stdint.h>
+
#include <dali/public-api/common/vector-wrapper.h>
#include <dali/public-api/object/property-map.h>
/**
* Provides unfiltered logging for release
*/
-#define DALI_LOG_RELEASE_INFO(format, args, ...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, format, ## __VA_ARGS__)
+#define DALI_LOG_RELEASE_INFO(format, ...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, format, ## __VA_ARGS__)
#ifdef DEBUG_ENABLED
#define DALI_LOG_INFO(filter, level, format, ...) \
if(filter && filter->IsEnabledFor(level)) { filter->Log(level, format, ## __VA_ARGS__); }
+#define DALI_LOG_STREAM( filter, level, stream ) \
+ if(filter && filter->IsEnabledFor(level)) \
+ { \
+ std::ostringstream o; \
+ o << stream << std::endl; \
+ filter->Log(level, "%s", o.str().c_str()); \
+ }
+
#else // DEBUG_ENABLED
#define DALI_LOG_INFO(filter, level, format, ...)
+#define DALI_LOG_STREAM( filter, level, stream )
#endif // DEBUG_ENABLED
} // Dali
-#endif // __DALI_INTEGRATION_DEBUG_H__
+#endif // DALI_INTEGRATION_DEBUG_H