SLIMMER
Public Member Functions | Public Attributes | Static Public Attributes
SimpleGlobalLog Class Reference

Keep a text file log for command line programs. More...

#include <SimpleGlobalLog.h>

List of all members.

Public Member Functions

 SimpleGlobalLog ()
 Default Constructor.
 SimpleGlobalLog (char *fname, int argc, char **argv, int numLog=SGL_LOG_MAX)
 Main Constructor for start of program.
 ~SimpleGlobalLog ()
 Destructor.
FILE * FreeLog (char *fname)
 Check for Free Log File Name and Number.
void ShiftLogs (char *fname)
 Shift Numbered logs down to preserve most recent.
void LogToFile (const char *entry, const char *entry2=NULL)
 Store a String of Info in the Log.
void LogFileInfo (char *filename)
 Store a String of Info in the Log.
void LogTime ()
 Log Current Time Count to Log File.
FILE * LogFP ()
 Return File Pointer to Log.

Public Attributes

int _timestamp

Static Public Attributes

static FILE * _fplog
static int _noLog
static int _numLog

Detailed Description

Keep a text file log for command line programs.

Simple Class to do logging of info to a text file and handle records of different runs of a command line program

Keeps a series of log files to record how commands were run with arguments
Also logs versions of source code of classes into file
Can be then be used to store runtime info (eg iterations etc)
Time Stamp also saves a current time counter into the log file.

Options on Command line: -NoLog -LogFile file.log

Author:
Colin Studholme 1998-
Id:
SimpleGlobalLog.h,v 1.14 2011/06/21 16:46:02 bicg Exp
 All Classes Functions Variables Typedefs