无法使用Jython脚本(WAS 7)永久更改日志详细信息级别 [英] Can't change log detail levels permanently with a Jython script (WAS 7)

查看:185
本文介绍了无法使用Jython脚本(WAS 7)永久更改日志详细信息级别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Jython脚本更改WebSphere的日志详细级别:

I'm trying to change WebSphere's Log Detail Levels with a Jython script:

..
AdminTask.setTraceSpecification('[-serverName server1 -nodeName qnode -traceSpecification com.ibm.*=all=enabled]')
AdminConfig.save()
..

成功运行脚本后,我正在检查日志记录和跟踪> {server_name}>诊断跟踪服务>更改日志详细信息级别.运行时"选项卡反映了我在脚本中输入的设置(traceSpecification),但是配置"选项卡保持不变,因此,我的设置不会保存到配置中.我已尝试重新启动服务器,所以我肯定是这种情况.

After successfully running the script I'm checking "Logging and Tracing > {server_name} > Diagnostic trace service > Change log detail levels. The Runtime tab reflects the setting (the traceSpecification) I've entered in my script, but the Configuration tab remains unchanged, so, my setting doesn't get saved to configuration. I've tried restarting my server, so I'm sure about that's the case.

根据setTraceSpecification的文档,此命令还将跟踪规范保存在配置中".好吧,不是我的情况:)您知道我在做什么错吗?

According to setTraceSpecification's documentation, this "command also saves the trace specification in configuration." Well, not in my case:) Do you have any idea what I'm doing wrong?

任何帮助将不胜感激

推荐答案

正如我所发现的,setTraceSpecification()还具有一个persist参数,如果您要将设置永久更改为WAS配置,则必须设置该参数:

As I've found out, setTraceSpecification() also has a persist parameter which has to be set if you want to change your setting permanently to WAS configuration:

..
AdminTask.setTraceSpecification('[-serverName myserver -nodeName mynode -persist true -traceSpecification com.ibm.*=all=enabled]')
AdminConfig.save()
..

不幸的是, WAS 7信息中心没有关于此选项的任何消息,而WebSphere CloudBurst Appliance信息中心具有

Unfortunately, WAS 7 InfoCenter doesn't have a single word about this option, while WebSphere CloudBurst Appliance InfoCenter has an example which includes it.

这篇关于无法使用Jython脚本(WAS 7)永久更改日志详细信息级别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆