mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-13 07:17:13 -06:00
LoggingFacade:
- make LoggingFacadeImpl classes package private - added missing @Override - minor formatting changes
This commit is contained in:
@@ -253,11 +253,10 @@ class UIDefaultsLoader
|
|||||||
|
|
||||||
static void logParseError( String key, String value, RuntimeException ex, boolean severe ) {
|
static void logParseError( String key, String value, RuntimeException ex, boolean severe ) {
|
||||||
String message = "FlatLaf: Failed to parse: '" + key + '=' + value + '\'';
|
String message = "FlatLaf: Failed to parse: '" + key + '=' + value + '\'';
|
||||||
if (severe) {
|
if( severe )
|
||||||
LoggingFacade.INSTANCE.logSevere( message, ex );
|
LoggingFacade.INSTANCE.logSevere( message, ex );
|
||||||
} else {
|
else
|
||||||
LoggingFacade.INSTANCE.logConfig( message, ex );
|
LoggingFacade.INSTANCE.logConfig( message, ex );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static String resolveValue( String value, Function<String, String> propertiesGetter ) {
|
static String resolveValue( String value, Function<String, String> propertiesGetter ) {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2020 FormDev Software GmbH
|
* Copyright 2021 FormDev Software GmbH
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -21,6 +21,5 @@ public interface LoggingFacade
|
|||||||
LoggingFacade INSTANCE = new LoggingFacadeImpl();
|
LoggingFacade INSTANCE = new LoggingFacadeImpl();
|
||||||
|
|
||||||
void logSevere( String message, Throwable t );
|
void logSevere( String message, Throwable t );
|
||||||
|
|
||||||
void logConfig( String message, Throwable t );
|
void logConfig( String message, Throwable t );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2020 FormDev Software GmbH
|
* Copyright 2021 FormDev Software GmbH
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -20,14 +20,17 @@ import com.formdev.flatlaf.FlatLaf;
|
|||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
public class LoggingFacadeImpl implements LoggingFacade
|
class LoggingFacadeImpl
|
||||||
|
implements LoggingFacade
|
||||||
{
|
{
|
||||||
private static final Logger LOG = Logger.getLogger( FlatLaf.class.getName() );
|
private static final Logger LOG = Logger.getLogger( FlatLaf.class.getName() );
|
||||||
|
|
||||||
|
@Override
|
||||||
public void logSevere( String message, Throwable t ) {
|
public void logSevere( String message, Throwable t ) {
|
||||||
LOG.log( Level.SEVERE, message, t );
|
LOG.log( Level.SEVERE, message, t );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void logConfig( String message, Throwable t ) {
|
public void logConfig( String message, Throwable t ) {
|
||||||
LOG.log( Level.CONFIG, message, t );
|
LOG.log( Level.CONFIG, message, t );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2020 FormDev Software GmbH
|
* Copyright 2021 FormDev Software GmbH
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -18,14 +18,17 @@ package com.formdev.flatlaf.util;
|
|||||||
|
|
||||||
import com.formdev.flatlaf.FlatLaf;
|
import com.formdev.flatlaf.FlatLaf;
|
||||||
|
|
||||||
public class LoggingFacadeImpl implements LoggingFacade
|
class LoggingFacadeImpl
|
||||||
|
implements LoggingFacade
|
||||||
{
|
{
|
||||||
private static final System.Logger LOG = System.getLogger( FlatLaf.class.getName() );
|
private static final System.Logger LOG = System.getLogger( FlatLaf.class.getName() );
|
||||||
|
|
||||||
|
@Override
|
||||||
public void logSevere( String message, Throwable t ) {
|
public void logSevere( String message, Throwable t ) {
|
||||||
LOG.log( System.Logger.Level.ERROR, message, t );
|
LOG.log( System.Logger.Level.ERROR, message, t );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void logConfig( String message, Throwable t ) {
|
public void logConfig( String message, Throwable t ) {
|
||||||
LOG.log( System.Logger.Level.DEBUG, message, t );
|
LOG.log( System.Logger.Level.DEBUG, message, t );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user