Previous Page | Next Page

Configuring SAS Web Report Studio

Configuring Logging for SAS Web Report Studio


Overview of Logging for SAS Web Report Studio

The SAS 9.2 Intelligence Platform uses a standard logging facility to perform logging for SAS servers. In SAS Management Console, the Logging Service dialog box enables you to manage performance, track security enforcement, and analyze specific situations.

For information about how to use logging for SAS Web applications, see Administering Logging for SAS Web Applications.

SAS Web Report Studio records events in two log files. By default, both log files are created in the SAS-configuration-directory \Lev1\Web\Logs directory. The directory path for the SASWebReportStudio4.3.log file can be changed within SAS Management Console.

The following table summarizes the log files:

Log Files
Log Context and Default Filename Description
General Purpose Log

(SASWebReportStudio4.3.log)

Logs events such as serious errors, application restarts, and users logging on.
Key User Action Log

(SASWebReportStudio4.3_KeyActions.log)

Logs events such as application use, failed attempts to log on, report access, and batch report activities. For a list of all events, see Understand Key User Action Log Output.

Note:   There are similar log files for SAS Web Report Viewer in the directory.  [cautionend]


Change the Logging Levels

To change the logging levels, see Administering Logging for SAS Web Applications.

Also, see "Administering Logging for SAS Servers" in the SAS Intelligence Platform: System Administration Guide.


Configure Debug Logging Dynamically

You can change the logging level for debugging in the Logging Service Properties dialog box as described in Change the Logging Levels. However, that procedure requires you to redeploy and restart SAS Web Report Studio. As an alternative, you can configure debug logging dynamically without restarting SAS Web Report Studio. You can do the following:

To implement this functionality, you manually edit the URL for SAS Web Report Studio in your browser. In order to perform this task, you must belong to the Advanced Role with the Manage Distribution List capability for SAS Web Report Studio

There is no browser-based feedback for this debugging feature. All relevant information about events is placed in the General Purpose Log file.

To edit the URL, do either or both of the following:


Manage the Key User Action Log File

For the Key User Action Log, SAS uses a rollover mechanism to manage the size and age of the log. SAS periodically archives the current log and creates a new one. To archive a log, SAS saves the log with a new name that includes the current date and time. SAS archives the current log based on configurable settings related to the size of the file and the duration since the last archive. SAS can also delete files after the number of archived files reaches a particular limit.

The following table shows the default values for rollover properties.

Rollover Properties and Default Values
Rollover Properties Default Values
sas.wrs.keyUserActionLog.rollover.max -1
sas.wrs.keyUserActionLog.rollover.sizeKBytes 4000
sas.wrs.keyUserActionLog.rollover.ageHours 24

To manage the Key User Action Log and modify the values for rollover properties, follow these steps:

  1. In SAS Management Console on the Plug-ins tab, navigate to Application Management [arrow] Configuration Manager [arrow] Web Report Studio 4.3 and right-click to display the Web Report Studio 4.3 Properties dialog box.

  2. Select the Advanced Tab.

  3. Click Add to display the Define New Property dialog box.

  4. Enter the property name and property value and click OK in the Define New Property dialog box:

    Property Name: sas.wrs.keyUserActionLog.rollover.max

    Property Value: Max Rollovers

    Property Name: sas.wrs.keyUserActionLog.rollover.sizeKBytes

    Property Value: Threshold Size for Rollovers

    Property Name: sas.wrs.keyUserActionLog.rollover.ageHours

    Property Value: Threshold Age for Rollovers

  5. Click Add in the Web Report Studio 4.3 Properties dialog box.

  6. Click OK to exit the Web Report Studio 4.3 Properties dialog box.

  7. To enable these properties to take effect, restart your Web application server.

If you are using SAS Web Report Viewer to render reports, then make similar changes for SAS Web Report Viewer. Periodically move or delete outdated archived log files.


Understand Key User Action Log Output

Events are logged to the WebReportStudio4.3_KeyActions.log file in an XML format. Each event has a numeric code value that uniquely identifies the event.

Beginning with SAS Web Report Studio 4.3, an event is logged in the WebReportStudio4.3_KeyActions.log file when a user creates, edits, or deletes a distribution list. In order to perform these tasks, the user must belong to the Advanced Role with the Manage Distribution List capability for SAS Web Report Studio. For information about SAS Web Report Studio Roles, see Predefined Roles.

The following table lists the events and their respective codes.

Log Events and Their Codes
Event Code
User logged on. 0
User attempted to log on but failed. 1
User logged off. 2
User saved a report. 3
User opened a report. 4
User deleted a report. 5
User moved a report. 6
User copied a report. 7
User renamed a report. 8
System start. 9
User scheduled a report. If the user scheduled a folder of reports, then the log file lists the folder. 10
User distributed a scheduled report. 11
User created, edited, or deleted a distribution list. 12

Here are some entries from a sample log file for SAS Web Report Studio 4.3:

<wrskeyuseractions>
<event><javaDate>1124136823696</javaDate><date>5/15/10</date><time>4:13PM</
time><code>9</code><description>System Startup</description></event> 

<event><javaDate>1124136826633</javaDate><date>5/15/10</date><time>4:13PM/
</time><user>sastrust@saspw</user><session>1</session>
<sasSession>a70abab74efe542e:-526869f2:1279155b649:-7f92 </sasSession>
<code>0</code><description>Logon</description></event>

<event><javaDate>1124136992808</javaDate><date>5/15/10</date><time>4:15PM/
</time><user>dolson</user><session>2</session>
<sasSession>a70abab74efe542e:-526869f2:1279155b649:-7f55<sasSession>
<code>0</code> <description>Logon</description></event>

<event><javaDate>1124136923432</javaDate><date>5/15/10</date><time>4:16PM/
</time><user>dolson</user><session>2</session>
<code>4</code><description>Open</description>
<report>/ReportStudio/Shared/Reports/Deanna/Bursting/Orion 2 level bygroup -3
</report></event> 

<event><javaDate>1124136977261</javaDate><date>5/15/10</date><time>4:17PM/
</time><user>dolson</user><session>2</session>
<code>3</code><description>Save</description>
<report>/ReportStudio/Shared/Reports/Deanna/Bursting/testReport</report></event> 

<event><javaDate>1124136992808</javaDate><date>5/15/10</date><time>4:18PM/
</time><user>dolson</user><session>2</session><code>2</code>
<description>Logoff</description></event></event>

<event><javaDate>1124136826633</javaDate><date>5/15/10</date><time>4:19PM/
</time><user>sastrust@saspw</user><session>1</session>
<code>2</code><description>Logoff</description></event>
</wrskeyuseractions>

Note that a log file for SAS Web Report Studio 4.2 will not contain the session and sasSession elements because they were introduced with SAS Web Report Studio 4.3.


View Details of Users' Sessions in the Key User Action File

Beginning with SAS Web Report Studio 4.3, the WebReportStudio4.3_KeyActions.log file enables you to obtain useful details about SAS Web Report Studio users' sessions.

Here are some key features of the unique session number assigned to events associated with users' tasks:

The sasSession number is a globally unique and lengthy string that is associated only with a code value of 0. A code value of 0 indicates a logon session by a user. When a key event is listed in the WebReportStudio4.3_KeyActions.log file with a session number and a unique string for sasSession, you can correlate this key event with the sasSession ID number listed in the SASWebReportStudio4.3.log file.

In this example from the WebReportStudio4.3_KeyActions.log file, the session for the user has a value of 3 that uniquely identifies this user's session. The code value of 0 and the description indicate that this is a logon session. Because this is a logon session, the sasSession element is listed with the globally unique string that correlates with the session ID number listed in the standard log.

<event><javaDate>1124136992808</javaDate><date>5/15/10</date><time>4:16PM/
</time><user>dolson</user><session>3</session>
<sasSession>a70abab74efe542e:-526869f2:1279155b649:-7f55<sasSession>
<code>0</code> <description>Logon</description></event>

In this example, the same user opens a SAS Web Report Studio report. This user's session value of 3 indicates that this is the same user whose logon session was identified with a value of 3 earlier. Here, the code value of 4 and the description indicate that the user opened a report.

<event><javaDate>1124136923432</javaDate><date>5/15/10</date><time>4:17PM/
</time><user>dolson</user><session>3</session>
<code>4</code><description>Open</description>
<report>/ReportStudio/Shared/Reports/Deanna/Bursting/Orion 2 level bygroup -3
</report></event> 

In this example, the user logs off from SAS Web Report Studio. The code value of 2 and the description indicate that logoff occurred for this user whose sessions were associated with the value of 3.

<event><javaDate>1124136992808</javaDate><date>5/15/10</date><time>5:00PM/
</time><user>dolson</user><session>3</session>
<code>2</code> <description>Logoff</description></event>


Report Events in the Key User Action Log

The information in the Key User Action Log can be imported into SAS data sets and presented in reports. To report the data, follow these steps:

  1. Import the WebReportStudio4.3_KeyActions.log data into a SAS data set. Here are the main steps:

    1. Assign a libref to an XML file that contains log data, and specify the XML engine.

      In the following example, MyFile.xml is a copy of a Key User Action Log file:

      libname myxml xml 'C:\My Files\XML\MyFile.xml';

    2. Use the SAS data sets procedure to import the XML file into a SAS data set.

      Here is an example:

      proc data sets library=myxml;

      This code creates a data set named EVENT in the MYXML library.

      For more information, see SAS online Help and documentation.

  2. In SAS Information Map Studio, create an information map based on the data set that you created in the preceding step. For the information map, you might want to provide the ability to filter based on the event code (<code> tag), the user name (<user> tag), the report name (<report> tag), or the date (<date> tag). For information about using SAS Information Map Studio, see the product Help.

  3. In SAS Web Report Studio, define a report based on the information map that you created in the previous step. You can define the report to be refreshed manually, and then schedule the report to run at regular intervals.


Redirect Key User Action Files to a Different Directory

By default, the Key User Action log files are saved in the SAS-configuration-directory \Lev1\Web\Logs directory. However, you can specify a different directory where the Key User Action log files can be saved.

To specify a different directory where Key User Action log files can be saved, follow these steps:

  1. In SAS Management Console on the Plug-ins tab, navigate to Application Management [arrow] Configuration Manager [arrow] Web Report Studio 4.3 and right-click to display the Web Report Studio 4.3 Properties dialog box.

  2. Click the Advanced Tab.

  3. Click Add to display the Define New Property dialog box.

  4. Enter the property name as shown and specify the property value:

    Property Name: sas.wrs.keyUserActionLog.path

    Property Value: Fully Qualified Directory Path

  5. Click OK to exit the Define New Property dialog box.

  6. Click Add in the Web Report Studio 4.3 Properties dialog box.

  7. Click OK to exit the Web Report Studio 4.3 Properties dialog box.

  8. To enable the property to take effect, restart your Web application server.

Previous Page | Next Page | Top of Page