Administering Logging for SAS Servers |
About Capturing XML Information |
To assist in troubleshooting, SAS Technical Support might request that you capture generated XML entries in the metadata server log.
When clients communicate with the SAS Metadata Server to create, update, delete, or query a metadata object, information about the metadata object is represented in XML. The metadata server also uses XML entries to return information about metadata objects to clients.
For example, to add a metadata object to a repository, clients use the AddMetadata method of the SAS Open Metadata Interface. One of the parameters for this method is an XML description of the object to be added. For example, if a client requests that a table object be added, then the request includes an XML description of the table, as shown in this example:
"<PhysicalTable Name="NECust" Desc="All customers in the northeast region"/>";
The metadata server returns an XML string that includes the input description as well as the object ID of the new metadata object.
These XML entries can be captured in the metadata server log and used for troubleshooting.
Note: For more information about the call interfaces, see the SAS Language Interfaces to Metadata.
Configure the Logging of XML Information in the Metadata Server Log |
If SAS Technical Support requests that you capture XML entries in your metadata server log, you will need to do the following:
Add the JNLSTRMAX and JNLLINEMAX object server parameters to the server's configuration file.
Increase the logging level for the App.OMI logger to TRACE.
Direct the XML entries to a separate log file, if you want to keep these entries separate.
Update the object server parameters in the metadata server's configuration files as follows:
Open the sasv9.cfg and sasv9_usermods.cfg files in a text editor. The files are located in SAS-configuration-directory/Lev1/SASMain|SASMeta/MetadataServer.
In sasv9.cfg, find the line that specifies object server parameters. The line begins with -objectserverparms (or objectserverparms for z/OS).
Copy this line to sasv9_usermods.cfg. In sasv9_usermods.cfg, add JNLSTRMAX and JNLLINEMAX to the existing object server parameters. Enclose the entire list of parameters in quotation marks, as shown in the following example:
-objectserverparms "jnlStrMax=10000 jnlLineMax=10000 cel=credentials"
You can specify different JNLSTRMAX and JNLLINEMAX values from those that are shown in the example. The parameters are explained in the following table:
Parameter | Explanation |
---|---|
JNLSTRMAX | Specifies the maximum journal string length. The default is 500 characters. If this parameter is omitted, a maximum of 500 characters of the XML string is logged, and the following message is appended to the XML: *truncated to 500 characters (jnlStrMax). |
JNLLINEMAX | Specifies the maximum journal line length. The default is 1000 characters. If this parameter is omitted, a maximum of 1000 characters of the XML string is logged, and the following message is appended to the XML: *truncated to 1000 characters (jnlLineMax). |
Add the following lines to metadata server's logconfig.xml file, which is located in SAS-configuration-directory/Lev1/SASMain|SASMeta/MetadataServer::
<appender class="FileAppender" name="IOMCALLTRACE"> <param name="File" value="omasrv_iomcalltrace.log"/> <param name="ImmediateFlush" value="true"/> <param name="Append" value="false"/> <layout> <param name="ConversionPattern" value="%d %-5p [%t] %c (%F:%L) - %m"/> </layout> </appender> <logger name="App.OMI"> <level value="trace"/> <appender-ref ref="IOMCALLTRACE"/> </logger>
If you want, you can specify different values (for example, a different log filename) for the FileAppender parameters. For details, see FileAppender in the SAS Logging: Configuration and Programming Reference.
Save your changes to sasv9_usermods.cfg and logconfig.xml, and restart the metadata server.
Examples of XML Log Entries |
The format of the XML that is written to the log depends on whether the request was made using the standard SAS Open Metadata Interface or using the DoRequest method.
The following is an example of a log entry for the receipt of a GetMetadataObjects request:
2007-11-06T15:37:55,815 TRACE [00000033] App.OMI.OMI.DoRequest (CIOMomici.c:6239) - IOM CALL {compRef:5e274b0}->OMI::DoRequest(): inString=<GetMetadataObjects><Reposid>A0000001.A0000001</Reposid> <Type>RepositoryBase</Type><Objects/><ns>REPOS</ns> <Flags>264</Flags><options/></GetMetadataObjects>
The following is an example of a log entry for a response to a client request:
2007-11-06T15:37:55,815 TRACE [00000033] App.OMI.OMI.DoRequest (CIOMomici.c:6504) - IOM RETURN 0={compRef:5e274b0}->OMI::DoRequest(): outString=<GetMetadataObjects><Reposid>A0000001.A0000001</Reposid> <Type>RepositoryBase</Type><Objects><RepositoryBase Id="A0000001.A510HYM9" Name="Foundation" Access="0" Desc="" Engine="BASE"
MetadataCreated="26Sep2007:16:12:48" MetadataUpdated="02Nov2007:18:10:37"
Options=""
Path="C:\SAS\DIserver\Lev1\SASMain\MetadataServer\MetadataRepositories\Foundation" RepositoryFormat="11" RepositoryType="FOUNDATION"/><RepositoryBase Id="A0000001.A5PJCXVL" Name="Custom1" Access="0" Desc="" Engine="BASE" MetadataCreated="26Sep2007:16:14:28" MetadataUpdated="02Nov2007:18:10:37" Options=""
Path="C:\SAS\DIserver\Lev1\SASMain\MetadataServer\MetadataRepositories\Custom1" RepositoryFormat="11" RepositoryType="CUSTOM"/><RepositoryBase Id="A0000001.A5FIU3O4" Name="Project1" Access="0" Desc="" Engine="BASE" MetadataCreated="26Sep2007:16:15:53" MetadataUpdated="02Nov2007:18:10:37" Options=""
Path="C:\SAS\DIserver\Lev1\SASMain\MetadataServer\MetadataRepositories\Project1" RepositoryFormat="11" RepositoryType="PROJECT"/></Objects><ns>REPOS</ns> <Flags>264</Flags><options/></GetMetadataObjects> retval=0
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.