Sun Java System Portal Server 7 Command-Line Reference

Chapter 2 Logging Subcommands

The logging subcommands configure parameters for the following applications: Portal Server, Search web application, Portal Administration Server, Administration Console and Portal Server Secure Remote Access Gateway, Netlet proxy, and Rewriter proxy. Changes you make using the logging subcommands are persistent. This chapter describes the following subcommands:

psadmin list-loggers

Description

Lists all the loggers.

Syntax

Long Format

psadmin list-loggers --adminuser uid --passwordfile password-filename --component component-type [--portal portal-ID] [--instance portal-instance-name] [--searchserver search-server-ID] [--sra-instance sra-instance-name][--detail] [--output output-filename] [--verbose]

Short Format

psadmin list-loggers -u uid -f password-filename -m [-p portal-ID] [-i portal-instance-name] [-s search-server-ID] [-o output-filename] [-v]

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name (dn) or user ID.

[--passwordfile | -f] password-filename

Specifies the administrator's password in the password file.

[--component | -m]

Specifies the component type. Valid values are: portal, search, pas, gateway, nlproxy, rwproxy.

The following options depend on the --component option:

[--portal | -p] portal-ID

Specifies the portal ID. This is required only if the --component-type is portal.

[--instance | -i] portal-instance-name

Specifies the Portal Server instance. This is required only if the --component-type is portal.

[--searchserver | -s] search-server-ID

Specifies the search server ID. This is required only if the the --component-type is search.

[--sra-instance] sra-instance-name

Specifies the SRA instance name. This is required only if the --component-type is gateway, nlproxy, or rwproxy.

The following options are optional

[--output] output-filename

Names the output file.

[--verbose | -v]

Lists loggers verbosely.

--detail

Provides more information.

Examples


Example 2–1 list-loggers

./psadmin list-loggers -u amadmin -f passwordfile -m portal -p myPortal -i myInstance

the output is:


debug.com.sun.portal
debug.com.sun.portal.desktop 
debug.com.sun.portal.desktop.context
debug.com.sun.portal.desktop.monitoring
debug.com.sun.portal.monitoring
debug.com.sun.portal.portletappengine
debug.com.sun.portal.portletappengine.imp
debug.com.sun.portal.ubt
debug.com.sun.portal.wsrp.consumer.common
Successfully completed!


Example 2–2 list-loggers with detail

./psadmin list-loggers -u amadmin -f passwordfile -m portal -p myPortal -i myInstance --detail

the output is:


debug.com.sun.portal
Level=FINEST    Use Parent Handler=false 
Handler=java.util.logging.FileHandler
Logs to File=/var/opt/SUNWportal/portals/myPortal/logs/
%InstanceID/%logger.%u.%g.log Print Stacktrace=true
debug.com.sun.portal.desktop
Level=FINEST    Use Parent Handler=true
debug.com.sun.portal.desktop.context
Level=FINEST    Use Parent Handler=true
debug.com.sun.portal.desktop.monitoring
Level=FINEST    Use Parent Handler=true
debug.com.sun.portal.monitoring
Level=FINEST    Use Parent Handler=true
debug.com.sun.portal.portletappengine
Level=FINEST    Use Parent Handler=true
debug.com.sun.portal.portletappengine.impl
Level=FINEST    Use Parent Handler=true
debug.com.sun.portal.ubt 
Level=FINEST    Use Parent Handler=true
debug.com.sun.portal.wsrp.consumer.common
Level=FINEST    Use Parent Handler=true
Successfully completed! 

psadmin set-logger

Description

Sets the level for logger and also separate file for the logger.

Syntax

Long Format

psadmin set-logger --adminuser uid --passwordfile password-filename --component component-type [--portal portal-ID] [--instance portal-instance-name] [--searchserver search-server-ID] [--sra-instance sra-instance-name] --name logger-name --level level [--file {--stack-trace | --parent}] [--output output-filename ] [--verbose]

Short Format

psadmin set-logger -u uid -f password-filename -m component-type [-p portal-ID] [-i portal-instance-name ][-s search-server ] -O logger-name -L level [ -F{-T | -P}] -o output-filename] [- v]

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name (dn) or user ID.

[--passwordfile | -f] password-filename

Specifies the administrator's password in the password file.

[ --component | -m]

Specifies the component type. Valid values are: portal, search, pas, gateway, nlproxy, rwproxy.

[--logger | -O] logger-name

Specifies the name of the logger.

[--level | -L] level

Specifies the level.

The following options are optional:

[--file | -F]

Specifies if the logger is to be logged to a separate file.

[--stack-trace | -T]

This option can be specified only if the --file option is specified. Specifies whether the stack trace is to be printed in the log file. If this option is specified, --parent option cannot be specified. The default is false. If the user specifies true, then the stack trace will be printed in the logger's log file.

[--parent | -P]

This option can be specified only if the --file option is specified. Specifies whether the log data is to be printed in the parent log file of the current logger. If this option is specified, --stack-trace option cannot be specified. The default is false, if the user does not specify it, the log data will be printed only in the current logger's log file. If the user specifies true, the log data will be printed in the parent log file and also in the current logger's log file.

[--portal | -p] portal-ID

Specifies the portal ID. This is required only if component-type is portal.

[--instance | -i] portal-instance-name

Specifies the portal server instance. This is required only if component-type is portal.

[--searchserver | -s] search-server-ID

Specifies the search server ID. This is required only if the the --component-type option is search.

[--sra-instance] sra-instance-name

Specifies the Portal Server Secure Remote Access instance. This is required only if the --omponent-type is gateway, nlproxy, or rwproxy.

[--verbose | -v]

Lists loggers verbosely.


Example 2–3 set-logger level

Obtain the logger name from list-logger subcommand.

Set the level of the logger.

./psadmin set-logger -u amadmin -f passwordfile -m portal -p myPortal -i myInstance -O debug.com.sun.portal.desktop -L INFO



Example 2–4 set-logger for separate file

Set a separate file and level for the logger. In this new file, no stack trace is logged and no content is logged to the parent (the log related to debug.com.sun.portal.desktop is not logged into the file associated with debug.com.sun.portal):

./psadmin set-logger -u amadmin -f passwordfile -m portal -p myPortal -i myInstance -O debug.com.sun.portal.desktop -L INFO -F

the output is:


Successfully completed!


Example 2–5 set-logger for stack trace

Set a separate file and level for the logger. In this new file, stack trace will be logged. But log content will not logged to the parent (the log related to debug.com.sun.portal.desktop will not be logged into the file associated with debug.com.sun.portal)

./psadmin set-logger -u amadmin -f passwordfile -m portal -p myPortal -i myInstance -O debug.com.sun.portal.desktop -L INFO -F -T

output is:


Successfully completed!

psadmin reset-logger

Description

Resets the log level and log file to that of the root logger.

Syntax

Long Format

psadmin reset-logger --adminuser uid --passwordfile password-filename --component component-type [--portal portal-ID] [--instance portal-instance-name] [--searchserver search-server-ID] [--sra-instance sra-instance-name]--name logger-name [--output output-filename] [--verbose]

Short Format

psadmin reset-logger -u uid -f password-filename -m component-type [-p portal-ID] [--instance portal-instance-name] [-s search-server] [-i instance-name] [-O logger-name][ -o output-filename] [-v]

Options

The following options are required:

[--adminuser | -u] uid

Specifies the administrator's distinguished name (dn) or user ID.

[--passwordfile | -f] password-filename

Specifies the administrator's password in the password file.

[--logger | -O] logger-name

Specifies the name of the logger.

The following options are not required:

[--portal | -p] portal-ID

Specifies the portal ID. This is required only if component-type is portal.

[--instance | -i] portal-instance-name

Specifies the portal server instance. This is required only if component-type is portal.

[[--searchserver | -s] search-server-ID

Specifies the search server ID. This is required only if the --component-type option value is search.

[--sra-instance] sra-instance-name

Specifies the Portal Server Secure Remote Access instance. This is required only if the --component-type option value is either gateway or nlproxy or rwproxy.

[--verbose | -v]

Lists output filenames verbosely.


Example 2–6 reset-logger

Obtain the logger-name using the list-logger subcommand.

./psadmin reset-logger -u amadmin -f passwordfile -p myPortal -i myInstance -O debug.com.sun.portal.desktop

The logs no longer go to the logger's log file, instead they go to the parent's log file with the same level as the parent. The log related to debug.com.sun.portal.desktop is only logged into the file associated with debug.com.sun.portal )

outputs:


Successfully completed!

Location of Log Files

The location of log files is as follows:

Portal Instance

Log Configuration Filename and Location

ps-data-directory/portals/portal-ID/config/PSLogConfig.properties

Example

/var/opt/SUNWportal/portals/myPortal/config/PSLogConfig.properties

Log file Location

ps-data-directory/portals/portal-ID/logs/instance-ID

By default only one file is created - portal.0.0.log

Portlet Applications

Log Configuration Filename and Location

ps-data-directory/portals/portal-ID/config/PSLogConfig.properties

Example

/var/opt/SUNWportal/portals/myPortal/config/PSLogConfig.properties

Log file Location

ps-data-directory/portals/portal-ID/logs/instance-ID

By default only one file is created - portal.0.0.log

Search Webapp

Log Configuration Filename and Location

ps-data-directory/searchserver/search-ID/config/SearchLogConfig.properties

Example

/var/opt/SUNWportal/searchserver/mySearch/config/SearchLogConfig.properties

Log file Location

ps-data-directory/searchserver/search-ID/logs/

By default three files will be created - rdmserver.0.0.log, rdm.0.0.log, rdmgr.0.0.log

Admin CLIs

Log Config Filename and Location

ps-config-directory/PSAdminLogConfig.properties

Example

/etc/opt/SUNWportal/PSAdminLogConfig.properties

Log file Location

ps-data-directory/logs/admin

By default only one file is created - portal.admin.cli.0.0.log

Admin Server

Log Config Filename and Location

ps-config-directory/PSAdminLogConfig.properties

Example

/etc/opt/SUNWportal/PSAdminLogConfig.properties

Log file Location

ps-data-directory/logs/admin

By default only one is created - portal.0.0.log

Admin Console

Log Configuration Filename and Location

ps-data-directory/portals/portal-ID/config/PSLogConfig.properties

Example

/var/opt/SUNWportal/portals/myportal/config/PSLogConfig.properties

Log file Location

ps-data-directory/logs/admin

By default only one is created - portal.0.0.log

Gateway

Log Configuration Filename and Location

ps-config-directory/platform.conf.gateway-profile-name

Example

/etc/opt/SUNWportal/platform.conf.gateway-profile-name

Log file Location

ps-data-directory/logs/sra/gateway-profile-name

By default only one file is created - portal.gateway.0.0.log

Netlet Proxy

Log Configuration Filename and Location

ps-config-directory/platform.conf.gateway-profile-name

Example

ps-data-directory/logs/sra/gateway-profile-name

Log file Location

ps-data-directory/logs/sra/gateway-profile-name

By default only one file is created - portal.nlproxy.0.0.log

Rewriter Proxy

Log Configuration Filename and Location

ps-config-directory/platform.conf.gateway-profile-name

Example

/etc/opt/SUNWportal/platform.conf.gateway-profile-name

Log file Location

ps-data-directory/logs/sra/gateway-profile-name

By default only one file is created - portal.rwproxy.0.0.log