Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Use properties files to manage system configuration > Manage specific configuration objects using properties files > Work with server properties files


Modify the errorStreamRedirect attribute of StreamRedirect properties files

We can use properties files to change errorStreamRedirect attribute of a server. The errorStreamRedirect attribute is of type StreamRedirect.

Determine the changes to make to the errorStreamRedirect attribute of a server configuration object.

We can create a server by creating a Server properties file template and then applying the template. See the topic on server properties files.

Start wsadmin.sh.

To start wsadmin using the Jython language, run...

Use 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 the configuration.

Actions for the errorStreamRedirect attribute of StreamRedirect properties files. We can modify the errorStreamRedirect attribute value.

Action Procedure
create Not available
modify Edit properties and then run applyConfigProperties.
delete Not available

Optionally, you can use interactive mode with the commands:

AdminTask.command_name('-interactive')


Procedure

  1. Change the errorStreamRedirect attribute in a StreamRedirect properties file.

    Open an editor and specify the errorStreamRedirect attribute under a server in a properties file. We 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
    
  2. Run applyConfigProperties to change the errorStreamRedirect attribute of a server.

    Run applyConfigProperties 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

We can use the properties file to configure and manage the StreamRedirect object.


What to do next

Save the changes to the configuration.
Work with server properties files
Create server, cluster, application, or authorization group objects using properties files and wsadmin scripting
Extract properties files using wsadmin.sh
Delete server, cluster, application, or authorization group objects using properties files


Related


PropertiesBasedConfiguration command group using wsadmin.sh

+

Search Tips   |   Advanced Search