ars_SetLogging(ctrl, logTypeMask, fileName)
This function activates or deactivates client-side logging of API, Filter, SQL or Plugin actions.
The fileName
parameter is optional. If you specify a file name, the messages
are appended to that file. If fileName
is omitted, then the log messages are
appended to $ars_errstr
.
The logTypeMask
parameter allows you to specify what type(s) of activities
will be logged:
Example:
# start filter and sql logging # (the logfile gets opened for appending) ars_SetLogging( $c, ARS::AR_DEBUG_SERVER_FILTER | ARS::AR_DEBUG_SERVER_SQL, "/var/log/filter_sql.log" ) || die ("SetLogging (start): $ars_errstr"); # call any ARS API function my $id = ars_CreateEntry( $c, "User", 101 => "TestUser", 109 => 1 ); # stop logging (specify logTypeMask = 0 and no file) # (the logfile gets closed) ars_SetLogging( $c, 0 ) || die ("SetLogging (end): $ars_errstr");
If SQL and Filter logging do appear as not working, it may be because the the user is not a member of the "client-side logging group." The client-side logging group can be configured via Remedy Admin Tool (menu "File -> Server Information", tab "Log Files") or using the ars_SetServerInfo function (server option ARS::AR_SERVER_INFO_DEBUG_GROUPID).