com.clumd.projects.java_custom_logging.logging.api.LoggableData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-custom-logging Show documentation
Show all versions of java-custom-logging Show documentation
A custom implementation of the SLF4J interface, but with bonuses for using it directly
The newest version!
package com.clumd.projects.java_custom_logging.logging.api;
/**
* This interface should be used to indicate that a class implements a method to format itself in a design suitable for
* logging.
*
* This may be useful to either obfuscate, or even totally remove certain information from a class which would otherwise
* be exposed, or just to make the output formatting/layout of an object be more palatable when reading it in a log.
*/
public interface LoggableData {
/**
* Used to return the data the implementing class would like to display within a Log statement.
*
* @return The data for the log formatted how you would like it to be displayed within a console.
*/
default String getFormattedLogData() {
return this.toString();
}
}