ODL handler configuration through WLST script - Oracle SOA Suite:
Oracle Fusion Middleware components write diagnostic log files in the Oracle Diagnostic Logging (ODL) format. Log file naming and the format of the contents of log files conforms to an Oracle standard. By default, the diagnostic messages are written in text format.
ODL provides the following benefits:
The capability to limit the total amount of diagnostic information saved. You can set the level of information saved and you can specify the maximum size of the log file and the log file directory.
When you reach the specified size, older segment files are removed and newer segment files are saved in chronological fashion.
Components can remain active, and do not need to be shutdown, when older diagnostic logging files are deleted.
The ODL configuration can be changed from EM console or WLST script.
Below is the WLST script help us to change the ODL handler setting.
Configureodlloghandlers.py
folderPath="/oracle/product/soa/11g/fmw/fmwlogs/SOACoreDomain"
domainAdminUserName = "weblogic"
domainAdminPassword = "welcome1"
connect(domainAdminUserName, domainAdminPassword, "t3://localhost:7001")
servers = adminHome.getMBeansByType('Server')
for s in servers:
edit()
startEdit()
serverName1 = s.getName()
path = '/Servers/' + serverName1
cd(path)
lh = listLogHandlers()
for l in lh:
lname = l.get('name')
odlfile = folderPath + '/logs/' + serverName1 + '/' + serverName1 + '-' + lname + '-diagnostic.log'
print 'Diagnostic path===>',odlfile
configureLogHandler(target=serverName1,name=lname, path=odlfile)
save()
activate()
The other details like maxFileSize,rotationFrequency and retentionPeriod etc can also be changed through configureLogHandler method.
Executing the script:
$MIDDLEWARE_HOME/Oracle_SOA/common/bin/wlst.sh Configureodlloghandlers.py
No comments:
Post a Comment