home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 25 / nopv25.iso / 040A / PBL30SAM.ZIP / LOGTEST.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-06  |  1.2 KB  |  34 lines

  1. #include "logfile.h"
  2.  
  3. void main()
  4. {
  5.     zLog pb("PROBOARD.LOG", zLog::proboard);
  6.     zLog im("IMAIL.LOG", zLog::intermail);
  7.     zLog bt("BINKLEY.LOG", zLog::binkley);
  8.  
  9.     pb.SetPID("Log.Cpp - Testing Logging Class v1.0");
  10.     im.SetPID("Log.Cpp - Testing Logging Class v1.0");
  11.     bt.SetPID("Log.Cpp - Testing Logging Class v1.0");
  12.  
  13.     pb.Write(zLog::normal, "This is a normal message: %s", "good");
  14.     pb.Write(zLog::mesg, "This is a 'message' text");
  15.     pb.Write(zLog::error, "This is a non-fatal error");
  16.     pb.Write(zLog::fatal, "This is a fatal error");
  17.     im.Write(zLog::normal, "This is a normal message: %s", "good");
  18.     im.Write(zLog::mesg, "This is a 'message' text");
  19.     im.Write(zLog::error, "This is a non-fatal error");
  20.     im.Write(zLog::fatal, "This is a fatal error");
  21.     bt.Write(zLog::normal, "This is a normal message: %s", "good");
  22.     bt.Write(zLog::mesg, "This is a 'message' text");
  23.     bt.Write(zLog::error, "This is a non-fatal error");
  24.     bt.Write(zLog::fatal, "This is a fatal error");
  25.  
  26.     pb.Write(zLog::normal, "Normal message %s", "(default)");
  27.  
  28.     bt.Close();
  29.     bt.Write(zLog::error, "Should not be in the file");
  30.     bt.Open();
  31.     bt.Write(zLog::normal, "This should be there");
  32.  
  33.     im.SetPID("Changing the PID v1.0a");
  34. }