Skip to content

Commit

Permalink
Allow config to specify a directory for debug output.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Oct 7, 2008
1 parent 69e31bb commit d45d1cd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nph-offload.c
Expand Up @@ -198,7 +198,7 @@ static FILE *getDebugFilePointer(void)
if (GDebugFilePointer == NULL)
{
char buf[PATH_MAX];
snprintf(buf, sizeof(buf), GOFFLOADDIR "/debug-%d", (int) getpid());
snprintf(buf, sizeof(buf), GDEBUGDIR "/debug-%d", (int) getpid());
GDebugFilePointer = fopen(buf, "a");
} // if
return GDebugFilePointer;
Expand Down
8 changes: 7 additions & 1 deletion offload_server_config.h
Expand Up @@ -7,12 +7,18 @@
#define GDEBUG 0
#endif

// Set GDEBUGTOFILE to write all debug info to files in GOFFLOADDIR, if
// Set GDEBUGTOFILE to write all debug info to files in GDEBUGDIR, if
// GDEBUG is also true. You probably want this to be true most cases.
#ifndef GDEBUGTOFILE
#define GDEBUGTOFILE 1
#endif

// Ignore this if either GDEBUG or GDEBUGTOFILE are zero.
// Set GDEBUGDIR to where debug logs should be written.
#ifndef GDEBUGDIR
#define GDEBUGDIR "/usr/local/apache/logs"
#endif

// Set this to non-zero to provide a listen server that serves HTTP requests
// directly. Set this to zero and you need to run as a cgi-bin program
// through another webserver. Obviously, you can't listen on port 80 if
Expand Down

0 comments on commit d45d1cd

Please sign in to comment.