#ifndef ORBIT_LINUX_TRACING_LOGGING_H_
#define ORBIT_LINUX_TRACING_LOGGING_H_

// TODO: Move logging to OrbitBase once we have clearer plans for such module.

#include <cstdio>

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"

#define LOG(format, ...) fprintf(stderr, format "\n", ##__VA_ARGS__)

#define ERROR(format, ...) LOG("Error: " format, ##__VA_ARGS__)

#pragma clang diagnostic pop

#endif  // ORBIT_LINUX_TRACING_LOGGING_H_

#ifndef ORBIT_LINUX_TRACING_LOGGING_H_
#define ORBIT_LINUX_TRACING_LOGGING_H_

// TODO: Move logging to OrbitBase once we have clearer plans for such module.

#include <cstdio>

#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
#endif

#define LOG(format, ...) fprintf(stderr, format "\n", ##__VA_ARGS__)

#define ERROR(format, ...) LOG("Error: " format, ##__VA_ARGS__)

#ifdef __clang__
#pragma clang diagnostic pop
#endif

#endif  // ORBIT_LINUX_TRACING_LOGGING_H_

Disable clang diagnostics pragma on windows
Disable clang diagnostics pragma on windows

Use clang diagnostics pragma only if it project is compiled with clang.

Bug: http://b/150575491
Test: ninja
