mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 02:24:40 +02:00
8151526: Print -Xlog configuration in the hs_err_pid file
Logging configuration is now printed in hs_err and in vm info. Reviewed-by: coleenp, mlarsson, dholmes
This commit is contained in:
parent
167be2a61c
commit
16c430d2b6
3 changed files with 29 additions and 2 deletions
|
@ -382,7 +382,7 @@ bool LogConfiguration::parse_log_arguments(const char* outputstr,
|
|||
return true;
|
||||
}
|
||||
|
||||
void LogConfiguration::describe(outputStream* out) {
|
||||
void LogConfiguration::describe_available(outputStream* out){
|
||||
out->print("Available log levels:");
|
||||
for (size_t i = 0; i < LogLevel::Count; i++) {
|
||||
out->print("%s %s", (i == 0 ? "" : ","), LogLevel::name(static_cast<LogLevelType>(i)));
|
||||
|
@ -402,7 +402,9 @@ void LogConfiguration::describe(outputStream* out) {
|
|||
}
|
||||
out->cr();
|
||||
|
||||
ConfigurationLock cl;
|
||||
}
|
||||
|
||||
void LogConfiguration::describe_current_configuration(outputStream* out){
|
||||
out->print_cr("Log output configuration:");
|
||||
for (size_t i = 0; i < _n_outputs; i++) {
|
||||
out->print("#" SIZE_FORMAT ": %s %s ", i, _outputs[i]->name(), _outputs[i]->config_string());
|
||||
|
@ -416,6 +418,12 @@ void LogConfiguration::describe(outputStream* out) {
|
|||
}
|
||||
}
|
||||
|
||||
void LogConfiguration::describe(outputStream* out) {
|
||||
describe_available(out);
|
||||
ConfigurationLock cl;
|
||||
describe_current_configuration(out);
|
||||
}
|
||||
|
||||
void LogConfiguration::print_command_line_help(FILE* out) {
|
||||
jio_fprintf(out, "-Xlog Usage: -Xlog[:[what][:[output][:[decorators][:output-options]]]]\n"
|
||||
"\t where 'what' is a combination of tags and levels on the form tag1[+tag2...][*][=level][,...]\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue