Sun Java System Portal Server 7 Command-Line Reference

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!