Commit c1693978 by apatrick@chromium.org

Made debug log filename compile time configurable.

Define TRACE_OUTPUT_FILE macro to change filename. Default remains "debug.txt" for Visual Studio solution based build. Gyp based build uses "angle-debug.txt". Review URL: http://codereview.appspot.com/2327043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@445 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent b2bdd06c
......@@ -3,6 +3,11 @@
# found in the LICENSE file.
{
'target_defaults': {
'defines': [
'TRACE_OUTPUT_FILE="angle-debug.txt"',
],
},
'targets': [
{
'target_name': 'translator_common',
......
......@@ -11,6 +11,10 @@
#include <stdio.h>
#include <stdarg.h>
#ifndef TRACE_OUTPUT_FILE
#define TRACE_OUTPUT_FILE "debug.txt"
#endif
static bool trace_on = true;
namespace gl
......@@ -21,7 +25,7 @@ void trace(const char *format, ...)
{
if (format)
{
FILE *file = fopen("debug.txt", "a");
FILE *file = fopen(TRACE_OUTPUT_FILE, "a");
if (file)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment