When reconfiguring log output options of an existing log setting with jcmd VM.log and the file name, a warning message is shown. However, when reconfiguring them with jcmd VM.log and the output index, the message is not shown.
$ java -Xlog::sample.log:: Sample
$ jcmd 4976 VM.log list
Log output configuration:
#0: stdout all=warning uptime,level,tags
#1: stderr all=off uptime,level,tags
#2: file=sample.log all=info uptime,level,tags filecount=5,filesize=20480K
$ jcmd 4976 VM.log output="sample.log" output_options="filecount=100"
4976:
Output options for existing outputs are ignored.
$ jcmd 4976 VM.log output="#2" output_options="filecount=100"
4976:
Command executed successfully
It's better to show the same message also in the latter case. Because the output options is not updated in both cases.
$ jcmd 4976 VM.log list
#0: stdout all=warning uptime,level,tags
#1: stderr all=off uptime,level,tags
#2: file=sample.log all=info uptime,level,tags filecount=5,filesize=20480K (reconfigured)
$ java -Xlog::sample.log:: Sample
$ jcmd 4976 VM.log list
Log output configuration:
#0: stdout all=warning uptime,level,tags
#1: stderr all=off uptime,level,tags
#2: file=sample.log all=info uptime,level,tags filecount=5,filesize=20480K
$ jcmd 4976 VM.log output="sample.log" output_options="filecount=100"
4976:
Output options for existing outputs are ignored.
$ jcmd 4976 VM.log output="#2" output_options="filecount=100"
4976:
Command executed successfully
It's better to show the same message also in the latter case. Because the output options is not updated in both cases.
$ jcmd 4976 VM.log list
#0: stdout all=warning uptime,level,tags
#1: stderr all=off uptime,level,tags
#2: file=sample.log all=info uptime,level,tags filecount=5,filesize=20480K (reconfigured)