Sun Java System Identity Server 2004Q2
Sample
 

Main Page

Logging Sample File

The sample files are created to help you understand the IS logging. It helps to understand how IS logging APIs can be used for log operations. 

This sample can be executed through command line. 

You need to be a super user to run RunSample to access AMConfig.properties.

Solaris:

  1. Set these variables in the "Makefile" and "RunSample".
    • AM_HOME - Set this to refer install-root
    • JAVA_HOME - Set this variable to your installation of JDK. The JDK version should be greater than or equal to 1.3.1_06.
    • JDK14 - Set this variable to "true" if your JAVA_HOME points to JDK 1.4 or newer version else set it to "false"
    • LOCAL_LOGGING - Set this variable to "true" if you are executing this sample at complete IS 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).
  2. LD_LIBRARY_PATH as per your install
  3. Compile the sample program, do "gmake"
  4. Before running sample do chmod +x RunSample
  5. To run the sample program, do "./RunSample -u <userSessionID> -n <logName> -m <message> -l <loggedBySessionID>"
userSessionID— the session ID of the user attempting to access the application. The log information is taken from this session token.

loggedBySessionID—the session ID of the user who writes the log record.

For example
./RunSample -u AQIC5wM2LY4Sfcwbdp3gWuB38NA26klnTJlLPknN8t0fPVY= -n testLog.access -m "trying test logging" -l AQIC5wM2LY4Sfcwbdp3gWuB38NA26klnTJlLPknN8t0fPVY=

The session ID can be obtained from amSession debug file after accessing IS console & successful authentication.

 

Windows2000:

  1. Set these variables in the "make.bat".
    • BASE - Set this to refer install-root
    • JAVA_HOME - Set this variable to your installation of JDK>. The JDK should be newer than JDK 1.3.1.
    • JDK14 - Set this variable to "true" if your JAVA_HOME points to JDK 1.4 or newer version else set it to "false"
    • LOCAL_LOGGING - Set this variable to "true" if you are executing this sample at complete IS 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).
  2. LD_LIBRARY_PATH as per your install
  3. Compile the sample program, do "make"
  4. To run the sample program , do "make run -u <userSessionID> -n <logName> -m <message> -l <loggedBySessionID>"

    userSessionID— the session ID of the user attempting to access the application. The log information is taken from this session token.

    loggedBySessionID—the session ID of the user who writes the log record.

    For example
./RunSample -u AQIC5wM2LY4Sfcwbdp3gWuB38NA26klnTJlLPknN8t0fPVY= -n testLog.access -m "trying test logging" -l AQIC5wM2LY4Sfcwbdp3gWuB38NA26klnTJlLPknN8t0fPVY=
The session ID can be obtained from amSession debug file after accessing IS console & successful authentication.