Main Page
Logging Sample File
The sample files are created to help you understand the Access
Manager logging. It helps to understand how Access Manager 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:
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 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).
LD_LIBRARY_PATH
as per your install
Compile the sample
program, do "gmake"
Before running sample
do chmod +x RunSample
To run the sample
program, do "./RunSample [
-o <orgname> ] [ -u
<username> -p <userpassword> ] -n
<logName> -m <message> -l <loggedByUser> -w
<loggedByUserPassword>"
orgname
– name of the organiziation. This is an optional parameter,
and if not provided assumes root organization
username—
name of the user on whoes behalf the logging is performed. This is
an optional parameter.
userpassword
– password to authenticate the user. Must be provided if
“username” is provided.
logName
– name of the log file
message
– message to be logged to the log file
loggedByUser –
name of the admin user logging the message
loggedByUserPassword – password to authenticate the admin
user
For example
$ ./RunSample -u amadmin -p 11111111 -n
testLog.access -m "trying test logging" -l amadmin -w
11111111
Windows2000:
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 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).
LD_LIBRARY_PATH
as per your install
Compile the sample
program, do "make"
To run the sample program , do "make
run [ -o <orgname>
] [ -u <username>
-p <userpassword> ] -n <logName> -m <message>
-l <loggedByUser> -w <loggedByUserPassword>"
orgname – name of the organiziation. This is an
optional parameter, and if not provided assumes root organization
username—
name of the user on whoes behalf the logging is performed. This is
an optional parameter.
userpassword
– password to authenticate the user. Must be provided if
“username” is provided.
logName
– name of the log file
message
– message to be logged to the log file
loggedByUser –
name of the admin user logging the message
loggedByUserPassword
– password to authenticate the admin user
For
example
c>
make run -u amadmin -p 11111111 -n testLog.access -m "trying
test logging" -l amadmin -w 11111111
|