// ------------------------------- //
// -------- Start of File -------- //
// ------------------------------- //
// ----------------------------------------------------------- //
// C++ Source Code File Name: testprog.cpp 
// C++ Compiler Used: MSVC40, egcs-2.90.29, HP CPP 10.24
// Produced By: Doug Gaer  
// File Creation Date: 11/17/1995
// Date Last Modified: 07/12/2000
// ----------------------------------------------------------- // 
// ------------- Program description and details ------------- // 
// ----------------------------------------------------------- // 
/*
The VBS C++ classes are copyright (c) 2000, by Douglas M. Gaer.
All those who put this code or its derivatives in a commercial
product MUST mention this copyright in their documentation for
users of the products in which this code or its derivative
classes are used. Otherwise, you have the freedom to redistribute
verbatim copies of this source code, adapt it to your specific
needs, or improve the code and release your improvements to the
public provided that the modified files carry prominent notices
stating that you changed the files and the date of any change.

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND.
THE ENTIRE RISK OF THE QUALITY AND PERFORMANCE OF THIS SOFTWARE
IS WITH YOU. SHOULD ANY ELEMENT OF THIS SOFTWARE PROVE DEFECTIVE,
YOU WILL ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR
CORRECTION.

This is a test program for the LogFile and ProgramLog classes.
*/
// ----------------------------------------------------------- //   
#include <iostream.h>
#include "logfile.h"

static LogFile *SysLog;

int main()
{
  SysLog = new LogFile;
  char *fname = "logfile.log";
  
  cout << "Writing to logfile.log" << endl;
  if(SysLog->OverWrite(fname) != 0) {
    cout << "Could not write to log file" << endl;
    return 0;
  }
  *(SysLog) << "Writing to log file.";
  SysLog->WriteSysTime();
  *(SysLog) << endl;

  SysLog->Flush();
  
  cout << "Appending 10 entries to logfile.log" << endl;
  for(int i = 0; i < 10; i++) {
    *(SysLog) << "Appending to log file [" << i << "]" << endl;
  }
  
  cout << "Appending two strings to logfile" << endl;
  *(SysLog) << "Appending string " << 1 << " and " << 2 << endl;
  
  cout << "Appending three strings to logfile" << endl;
  *(SysLog) << "Appending string " << 1.5 << ' ' << 2.5 << " and " << 3.5
	    << endl;

 return 0;
}
// ----------------------------------------------------------- // 
// ------------------------------- //
// --------- End of File --------- //
// ------------------------------- //