+

Search Tips   |   Advanced Search

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.

From the server profile bin directory, run wsadmin -lang jython

Using a properties file 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.

attribute of StreamRedirect properties files. We can
Action Procedure
create Not available
modify Edit properties and then run the applyConfigProperties command.
delete Not available

Optionally, we can use interactive mode with the commands:

  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 the 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 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

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


What to do next

Save the changes to the configuration.


Related tasks

  • Work with server properties files
  • Create server, cluster, application, or authorization group objects using properties files and wsadmin scripting
  • Extracting properties files
  • Delete server, cluster, application, or authorization group objects using properties files

  • PropertiesBasedConfiguration (AdminTask)