Viewing Server Logs.
wadm> get-log --user=admin --password-file=admin.passwd
--host=localhost --port=8989 --start-date=01/01/2006:09:00:00 --end-date=04/01/2006:10:00:00
--config=test cat.test.com
The above command will
display the Server Logs of a given configuration between the date 01/Jan/2006:09:00:00
and 04/Jan/2006:10:00:00
.
Viewing Access Logs.
wadm> get-access-log --user=admin --password-file=admin.passwd
--host=localhost --port=8989 --status-code=300 --config=test cat.test.com
The above command will display only those access log entries of a given configuration which have status code as 300.
In the above commands, the start-date and the end-date options should be in the in the format — dd/MM/yyyy:HH:mm:ss. The date format can also be customized. You could use a variable wadm_log_date_format in the rcfile to specify your own date format rather than using the default date format.
In Sun Java System Web Server, you can enable access log by executing the following command:
enable-access-log --user=admin --host=serverhost --password-file=../admin.passwd
--port=8989 --ssl=true --no-prompt --rcfile=null --config=config1 --vs=vs
--uri-pattern="*.html" --file=../logs/access.new --log-ip=true--format="%Req->reqpb.
protocol% %Req->headers.authorization% %vsid% %Ses->client.dns%"