home *** CD-ROM | disk | FTP | other *** search
- #include "logfile.h"
-
- void main()
- {
- zLog pb("PROBOARD.LOG", zLog::proboard);
- zLog im("IMAIL.LOG", zLog::intermail);
- zLog bt("BINKLEY.LOG", zLog::binkley);
-
- pb.SetPID("Log.Cpp - Testing Logging Class v1.0");
- im.SetPID("Log.Cpp - Testing Logging Class v1.0");
- bt.SetPID("Log.Cpp - Testing Logging Class v1.0");
-
- pb.Write(zLog::normal, "This is a normal message: %s", "good");
- pb.Write(zLog::mesg, "This is a 'message' text");
- pb.Write(zLog::error, "This is a non-fatal error");
- pb.Write(zLog::fatal, "This is a fatal error");
- im.Write(zLog::normal, "This is a normal message: %s", "good");
- im.Write(zLog::mesg, "This is a 'message' text");
- im.Write(zLog::error, "This is a non-fatal error");
- im.Write(zLog::fatal, "This is a fatal error");
- bt.Write(zLog::normal, "This is a normal message: %s", "good");
- bt.Write(zLog::mesg, "This is a 'message' text");
- bt.Write(zLog::error, "This is a non-fatal error");
- bt.Write(zLog::fatal, "This is a fatal error");
-
- pb.Write(zLog::normal, "Normal message %s", "(default)");
-
- bt.Close();
- bt.Write(zLog::error, "Should not be in the file");
- bt.Open();
- bt.Write(zLog::normal, "This should be there");
-
- im.SetPID("Changing the PID v1.0a");
- }