View Raw SPL
/*****************************************************************************
*                                                                            *
*   VIEWLOG.SPL  Copyright (C) 2017 DSP Development Corporation              *
*                               All Rights Reserved                          *
*                                                                            *
*   Author:      Randy Race                                                  *
*                                                                            *
*   Synopsis:    Displays log file                                           *
*                                                                            *
*   Revisions:   25 Oct 2017  RRR  Creation                                  *
*                                                                            *
*****************************************************************************/


#if @HELP_VIEWLOG

    VIEWLOG

    Purpose:
             Displays the log file.

    Format:
             VIEWLOG("logfile")

              "logfile" - Optional. A string, the name of the log file to
                          view. Defaults to current log file.

    Returns:
             Nothing, the log file is displayed.

    Example:
             setconfig("message_logging", 1);

             W1: rand(10);
             W2: integ(w1)

             viewlog

             Message logging is enabled for the session. The current
             contents of the current log file is displayed.

    Remarks:
             VIEWLOG requires that message logging is enabled with the
             MESSAGE_LOGGING configuration parameter.

             See MONITOR to monitor messages in real time.

    See Also:
             Monitor
             Viewfile
#endif


/* display log file */
viewlog(logfile)
{
        if (argc < 1)
        {
                logfile = getconf("message_logname");
        }

        viewfile(logfile);
}