Improve license expiration log line (elastic/x-pack-elasticsearch#4183)
This is related to elastic/x-pack-elasticsearch#266. It modifies the license expiration warning log line to include "License expiration notice" on the first line so that it is more easily seen when grepping logs. Original commit: elastic/x-pack-elasticsearch@c75df8eafb
This commit is contained in:
parent
aa566a55e3
commit
2cb044849f
|
@ -124,10 +124,9 @@ public class LicenseService extends AbstractLifecycleComponent implements Cluste
|
|||
|
||||
private void logExpirationWarning(long expirationMillis, boolean expired) {
|
||||
String expiredMsg = expired ? "expired" : "will expire";
|
||||
String general = LoggerMessageFormat.format(null, "\n" +
|
||||
"#\n" +
|
||||
"# License [{}] on [{}]. If you have a new license, please update it.\n" +
|
||||
"# Otherwise, please reach out to your support contact.\n" +
|
||||
String general = LoggerMessageFormat.format(null, "License [{}] on [{}].\n" +
|
||||
"# If you have a new license, please update it. Otherwise, please reach out to\n" +
|
||||
"# your support contact.\n" +
|
||||
"# ", expiredMsg, DATE_FORMATTER.printer().print(expirationMillis));
|
||||
if (expired) {
|
||||
general = general.toUpperCase(Locale.ROOT);
|
||||
|
|
Loading…
Reference in New Issue