Browse Prior Art Database

Object Oriented Approach to Handling Multiple Log Files

IP.com Disclosure Number: IPCOM000117516D
Original Publication Date: 1996-Mar-01
Included in the Prior Art Database: 2005-Mar-31
Document File: 2 page(s) / 46K

Publishing Venue

IBM

Related People

Ibanez, JG: AUTHOR [+4]

Abstract

Configuration, Installation and Distribution (CID) enabled programs are required to support multiple levels of log files, which results in a cumbersome interface for programs needing to enter log information.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 67% of the total text.

Object Oriented Approach to Handling Multiple Log Files

      Configuration, Installation and Distribution (CID) enabled
programs are required to support multiple levels of log files, which
results in a cumbersome interface for programs needing to enter log
information.

      This problem is solved by using a MULTILOG object to handle
the entering of information into the selected files.

      When a program needs to handle multiple log files, it
instantiates a MultiLog object.
    MultiLog *pMyLog;
      pMyLog = new
           MultiLog(150,2,"\\my\\error.log",LOG_ENTRY_ERROR,
             "\\my\\trace.log",LOG_ENTRY_TRACE);
      /* allow up to 150 entries between writing the files,
      errors
       * be written to \my\error.log; trace to be written to
       * \my\trace.log  */
  The program can then add its messages to the MultiLog:
    ...
    pMyLog->AddTrace(TRACE_IN,__FILE__,__LINE__,"function name");
    ...
      pMyLog->AddEntry
    ...
    pMyLog->AddTrace(TRACE_OUT,__FILE__,__LINE__,"function name");
    ...
    pMyLog->AddFile("local.trc",LOG_ENTRY_TRACE | LOG_ENTRY_ERROR);
    ...
    pMyLog->RemoveFile("local.trc");
    ...
    pMyLog->AddMessage(LOG_ENTRY_INFORMATION,pszMyMsg);

      The MULTILOG object acts as a manager of LOG objects as well as
a filter for messages to the LOG objects.  This allows the developer
to instantiate one object which...