You can use properties files to change errorStreamRedirect
attribute of a server. The errorStreamRedirect attribute is of type
StreamRedirect.
Before you begin
Determine the changes that you want to make to the errorStreamRedirect
attribute of a server configuration object.
You can create
a server by creating a Server properties file template and then applying
the template. See the topic on server properties files.
Start
the wsadmin scripting tool. To start wsadmin using the Jython language,
run the wsadmin -lang jython command from the bin directory
of the server profile.
About this task
Using a properties file, you can modify the errorStreamRedirect
attribute of a server.
Run administrative commands using wsadmin
to change a properties file for a StreamRedirect object, validate
the properties, and apply them to your configuration.
Table 1. Actions for the errorStreamRedirect
attribute of StreamRedirect properties files. You can
modify the errorStreamRedirect attribute value.Action |
Procedure |
create |
Not available |
modify |
Edit properties and then run the applyConfigProperties command. |
delete |
Not available |
Optionally, you can use interactive mode with the commands:
AdminTask.command_name('-interactive')
Procedure
- Change the errorStreamRedirect attribute in a StreamRedirect
properties file.
Open an editor and specify the errorStreamRedirect
attribute under a server in a properties file. You can copy the following
example properties into an editor and modify the properties as needed
for your situation. The example shows an errorStreamRedirect attribute
of type StreamRedirect:
#
# Header
#
ResourceType=StreamRedirect
ImplementingResourceType=GenericType
ResourceId=Cell=!{cellName}:Node=!{nodeName}:Server=!{serverName}:StreamRedirect=outputStreamRedirect#
AttributeInfo=errorStreamRedirect
#DELETE=true
#
#
#Properties
#
formatWrites=true #boolean,default(false)
maxNumberOfBackupFiles=5 #integer,default(0)
suppressStackTrace=false #boolean,default(false)
rolloverType=SIZE #ENUM(TIME|SIZE|NONE|BOTH),default(SIZE)
suppressWrites=false #boolean,default(false)
baseHour=24 #integer,default(0)
fileName="${SERVER_LOG_ROOT}/SystemOut6.log"
messageFormatKind=BASIC #ENUM(BASIC|ADVANCED),default(BASIC)
rolloverSize=1 #integer,default(0)
rolloverPeriod=24 #integer,default(0)
EnvironmentVariablesSection
#
#Environment Variables
cellName=WASCell06
serverName=myServer
nodeName=WASNode04
- Run the applyConfigProperties command
to change the errorStreamRedirect attribute of a server.
Running
the applyConfigProperties command applies the properties
file to the configuration. In this Jython example, the optional -reportFileName parameter
produces a report named report.txt:
AdminTask.applyConfigProperties(['-propertiesFileName myObjectType.props -reportFileName report.txt'])
Results
You can use the properties file to configure and manage
the StreamRedirect object.
What to do next
Save the changes to your configuration.