]> git.cworth.org Git - apitrace/blobdiff - formatter.hpp
Allow to disable ANSI escape codes on tracedump.
[apitrace] / formatter.hpp
index 040d06d49084feafa191c8232ad708dea3d1e3bb..181e2d1539d5c14bc14e070db1325a31d2593ad4 100644 (file)
@@ -155,12 +155,16 @@ public:
 #endif
 
 
-inline Formatter *defaultFormatter(void) {
+inline Formatter *defaultFormatter(bool color = true) {
+    if (color) {
 #ifdef _WIN32
-    return new WindowsFormatter;
+        return new WindowsFormatter;
 #else
-    return new AnsiFormatter;
+        return new AnsiFormatter;
 #endif
+    } else {
+        return new Formatter;
+    }
 }