Configuring 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 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.
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:
activate a one-line notification for every action that occurs. This one-line message can be useful for providing debugging information about events.
change the log level for events that are logged for com.sas.apps.citation or for one of its descendant contexts.
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:
To activate the one-line notification, add the following string to the end of the URL:
debugLog.do?LogAllActions=true
Here is an example:
http://localhost:8080/SASWebReportStudio/debugLog.do?LogAllActions=true
Here is an example one-line message that might appear in the log file:
WRS 16:25:50,825 WARN report.OpenReportManagerAction
[da8ff705996908f9:14eaec9:107ed50f82f:-7fea]- DEBUG
logging of action requested: OpenReportManagerAction
When you have finished debugging, to suppress the one-line notification, change:
debugLog.do?LogAllActions=trueto:
debugLog.do?LogAllActions=false
To change the logging level, add the following to the end of the URL:
debugLog.do?LogName=log.context&LogLevel=level
Provide the following values:
Replace log.context with the log context that you want to debug. You can specify com.sas.apps.citation, or any context under com.sas.apps.citation. The com.sas.apps.citation context is the highest level, and represents the entire SAS Web Report Studio subsystem.
Replace level with the log level that you want. You can specify any one of the following: DEBUG, INFO, WARN, ERROR, and FATAL.
Here is an example:
http://localhost:8080/SASWebReportStudio/
debugLog.do?LogName=com.sas.apps.citation&LogLevel=DEBUG
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 | 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:
In SAS Management Console on the Plug-ins tab, navigate to Application Management Configuration Manager Web Report Studio 4.3 and right-click to display the Web Report Studio 4.3 Properties dialog box.
Select the Advanced Tab.
Click Add to display the Define New Property dialog box.
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
Click Add in the Web Report Studio 4.3 Properties dialog box.
Click OK to exit the Web Report Studio 4.3 Properties dialog box.
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.
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:
For all events associated with a user's tasks (for example, logging on to SAS Web Report Studio, opening a report, saving a report, logging off from SAS Web Report Studio), the session number remains the same.
The number generated for the user's sessions is short, and it remains as a unique number until a system start-up occurs.
The session number is accompanied by a code value that indicates the type of task being performed by the user. For example, a code value of 2 for a session indicates that the user logged off from SAS Web Report Studio. This code is also interpreted and displayed in plain text within the description field.
For a logon session, the session number is accompanied by a sasSession number whose value corresponds with the session ID number that is listed in the SASWebReportStudio4.3.log file.
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:
Import the WebReportStudio4.3_KeyActions.log data into a SAS data set. Here are the main steps:
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';
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.
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.
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:
In SAS Management Console on the Plug-ins tab, navigate to Application Management Configuration Manager Web Report Studio 4.3 and right-click to display the Web Report Studio 4.3 Properties dialog box.
Click the Advanced Tab.
Click Add to display the Define New Property dialog box.
Enter the property name as shown and specify the property value:
Property Name: sas.wrs.keyUserActionLog.path
Property Value: Fully Qualified Directory Path
Click OK to exit the Define New Property dialog box.
Click Add in the Web Report Studio 4.3 Properties dialog box.
Click OK to exit the Web Report Studio 4.3 Properties dialog box.
To enable the property to take effect, restart your Web application server.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.