Fix PlaceholderEngine usage in Logger.java
This commit is contained in:
parent
98ff132d27
commit
5718f33d88
2 changed files with 5 additions and 5 deletions
|
@ -200,10 +200,7 @@ public final class Logger {
|
||||||
if (format == null)
|
if (format == null)
|
||||||
format = EngineConfiguration.getInstance().getLoggerTemplate();
|
format = EngineConfiguration.getInstance().getLoggerTemplate();
|
||||||
|
|
||||||
// Replace placeholders
|
// Replace logger placeholders (no colors)
|
||||||
// Using PlaceholderEngine
|
|
||||||
format = PlaceholderEngine.getInstance().process(format);
|
|
||||||
// Logger placeholders (no colors)
|
|
||||||
format = new LogClass(issuerClass).replace(format);
|
format = new LogClass(issuerClass).replace(format);
|
||||||
format = new de.staropensource.sosengine.base.internal.placeholders.logger.LogLevel(level).replace(format);
|
format = new de.staropensource.sosengine.base.internal.placeholders.logger.LogLevel(level).replace(format);
|
||||||
format = new LogMetadata(issuerMetadata).replace(format);
|
format = new LogMetadata(issuerMetadata).replace(format);
|
||||||
|
@ -259,6 +256,9 @@ public final class Logger {
|
||||||
format = new LogColorPrimary(level).replace(format);
|
format = new LogColorPrimary(level).replace(format);
|
||||||
format = new LogColorSecondary(level).replace(format);
|
format = new LogColorSecondary(level).replace(format);
|
||||||
|
|
||||||
|
// Replace placeholders using PlaceholderEngine
|
||||||
|
format = PlaceholderEngine.getInstance().process(format);
|
||||||
|
|
||||||
// Invoke LoggerImpl#postPlaceholder
|
// Invoke LoggerImpl#postPlaceholder
|
||||||
format = loggerImplementation.postPlaceholder(level, issuerClass, issuerOrigin, issuerMetadata, message, format);
|
format = loggerImplementation.postPlaceholder(level, issuerClass, issuerOrigin, issuerMetadata, message, format);
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,7 @@ public final class PlaceholderEngine {
|
||||||
* @return the processed text
|
* @return the processed text
|
||||||
* @since v1-alpha0
|
* @since v1-alpha0
|
||||||
*/
|
*/
|
||||||
public @NotNull String process(@NotNull String text, List<@NotNull Placeholder> temporaryPlaceholders) {
|
public @NotNull String process(@NotNull String text, @NotNull List<@NotNull Placeholder> temporaryPlaceholders) {
|
||||||
// Process temporary placeholders
|
// Process temporary placeholders
|
||||||
for (Placeholder temporaryPlaceholder : temporaryPlaceholders)
|
for (Placeholder temporaryPlaceholder : temporaryPlaceholders)
|
||||||
text = temporaryPlaceholder.replace(text);
|
text = temporaryPlaceholder.replace(text);
|
||||||
|
|
Loading…
Reference in a new issue