In the Makefile, RunSample, and RunLogReader files, set the following variables. The variables may already have been set during installation.
Set this to refer to the where Access Manager server is installed.
Set this variable to your installation of the JDK. The JDK version should be greater than or equal to 1.3.1_06.
Set this variable to true if your JAVA_HOME points to JDK 1.4 or newer version else set it to false
Set this variable to true if you are executing this sample at complete Access Manager installation which will perform local logging. If you are executing this sample from a SUNWamsdk only install then set it to false which will perform remote logging (logging at server side).
Set the LD_LIBRARY_PATH as is appropriate for your installation.
Run the gmake command to compile the sample program.
Run the following chmod command:
chmod +x RunSample RunLogReader
Run the following command to run the logging sample program:
./RunSample [ -o organizationName] [ -u userName -p userPassword ] -n logName -m message -l loggedByUser -w loggedByUserPassword
Name of the organization. This is an optional parameter. If a value is not provided, Access Manager assumes the value to be the root organization.
Name of the user on whose behalf the logging is performed. This is an optional parameter.
Password for authenticating the user. This value must be provided if userName is provided.
Name of the log file.
Message to be logged to the log file.
Name of the administrator user who is logging the message.
Password to authenticate the administrator user.
Example:
$ ./RunSample -u amadmin -p 11111111 -n testLog.access -m "trying test logging" -l amadmin -w 11111111
Run the log reader program by running the following command:
./RunLogReader -o organizationName -u userName -p userPassword [-n logName]
Name of the organization. This is a required parameter.
Name of the user who is accessing the log file or table. This is a required parameter.
Password to authenticate the user. This is a required parameter.
Name of the log file or table. This parameter is optional. You can select the log file or table when running the program.
Example :
$ ./RunLogReader -u amadmin -p 11111111 -o dc=example,dc=com -n testLog.access