From e52abd0195b4f5a837188802687fc5409e51ccb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Kraus?= Date: Fri, 17 Oct 2025 10:16:05 +0200 Subject: [PATCH 1/7] Javadoc cleanup in logger. Signed-off-by: Tomas Kraus --- .../persistence/logging/LogCategory.java | 49 +- .../eclipse/persistence/logging/LogLevel.java | 63 +- .../persistence/logging/SessionLog.java | 689 ++++++------------ .../persistence/logging/package-info.java | 34 + 4 files changed, 328 insertions(+), 507 deletions(-) create mode 100644 foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/package-info.java diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/LogCategory.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/LogCategory.java index 58eaf6f7fb7..b3dcb12d6a7 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/LogCategory.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/LogCategory.java @@ -18,33 +18,32 @@ import java.util.Map; /** - * EclipseLink categories used for logging name space. - * The EclipseLink categories for the logging name space are:
+ * EclipseLink categories used for logging name spaces. + *

+ * The EclipseLink categories are:
* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * *
Logging categories
 ALL  = "all"
 CACHE  = "cache"
 CONNECTION  = "connection"
 DDL  = "ddl"
 DMS  = "dms"
 EJB  = "ejb"
 EJB_OR_METADATA = "ejb_or_metadata"
 EVENT  = "event"
 JPA  = "jpa"
 JPARS  = "jpars"
 METADATA  = "metadata"
 METAMODEL  = "metamodel"
 MONITORING  = "monitoring"
 MOXY  = "moxy"
 PROPAGATION  = "propagation"
 PROPERTIES  = "properties"
 QUERY  = "query"
 SEQUENCING  = "sequencing"
 SERVER  = "server"
 SQL  = "sql"
 THREAD  = "thread"
 TRANSACTION  = "transaction"
 WEAVER  = "weaver"
 {@link SessionLog#CACHE}  = {@value SessionLog#CACHE}
 {@link SessionLog#CONNECTION}  = {@value SessionLog#CONNECTION}
 {@link SessionLog#DDL}  = {@value SessionLog#DDL}
 {@link SessionLog#DMS}  = {@value SessionLog#DMS}
 {@link SessionLog#EJB}  = {@value SessionLog#EJB}
 {@link SessionLog#EVENT}  = {@value SessionLog#EVENT}
 {@link SessionLog#JPA}  = {@value SessionLog#JPA}
 {@link SessionLog#JPARS}  = {@value SessionLog#JPARS}
 {@link SessionLog#METADATA}  = {@value SessionLog#METADATA}
 {@link SessionLog#METAMODEL}  = {@value SessionLog#METAMODEL}
 {@link SessionLog#MONITORING}  = {@value SessionLog#MONITORING}
 {@link SessionLog#MOXY}  = {@value SessionLog#MOXY}
 {@link SessionLog#PROPAGATION}  = {@value SessionLog#PROPAGATION}
 {@link SessionLog#PROPERTIES}  = {@value SessionLog#PROPERTIES}
 {@link SessionLog#QUERY}  = {@value SessionLog#QUERY}
 {@link SessionLog#SEQUENCING}  = {@value SessionLog#SEQUENCING}
 {@link SessionLog#SERVER}  = {@value SessionLog#SERVER}
 {@link SessionLog#SQL}  = {@value SessionLog#SQL}
 {@link SessionLog#THREAD}  = {@value SessionLog#THREAD}
 {@link SessionLog#TRANSACTION}  = {@value SessionLog#TRANSACTION}
 {@link SessionLog#WEAVER}  = {@value SessionLog#WEAVER}
*/ public enum LogCategory { diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/LogLevel.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/LogLevel.java index cff8a9b52fe..cb71a085480 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/LogLevel.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/LogLevel.java @@ -18,38 +18,41 @@ import java.util.Map; /** - * Log levels for EclipseLink logging. - * The EclipseLink logging levels available are:
+ * The EclipseLink logging levels. + *

+ *

+ * The logging level IDs in {@link SessionLog}:
* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * *
Logging levels
ALL  = 0This level currently logs at the same level as FINEST.
FINEST  = 1This level enables logging of more debugging information than the FINER setting, such as a very detailed - * information about certain features (for example, sequencing). You may want to use this log level during - * debugging and testing, but not at production.
FINER  = 2This level enables logging of more debugging information than the FINE setting. For example, the transaction - * information is logged at this level. You may want to use this log level during debugging and testing, - * but not at production.
FINE  = 3This level enables logging of the first level of the debugging information and SQL. You may want to use - * this log level during debugging and testing, but not at production.
CONFIG  = 4This level enables logging of such configuration details as your database login information and some metadata - * information. You may want to use the CONFIG log level at deployment time.
INFO  = 5This level enables the standard output. The contents of this output is very limited. It is the default - * logging level if a logging level is not set.
WARNING = 6This level enables logging of issues that have a potential to cause problems. For example, a setting that - * is picked by the application and not by the user.
SEVERE  = 7This level enables reporting of failure cases only. Usually, if the failure occurs, the application - * stops.
OFF  = 8This setting disables the generation of the log output. You may want to set logging to OFF during production - * to avoid the overhead of logging.
{@link SessionLog#ALL}  = {@value SessionLog#ALL}
{@link SessionLog#FINEST}  = {@value SessionLog#FINEST}
{@link SessionLog#FINER}  = {@value SessionLog#FINER}
{@link SessionLog#FINE}  = {@value SessionLog#FINE}
{@link SessionLog#CONFIG}  = {@value SessionLog#CONFIG}
{@link SessionLog#INFO}  = {@value SessionLog#INFO}
{@link SessionLog#WARNING} = {@value SessionLog#WARNING}
{@link SessionLog#SEVERE}  = {@value SessionLog#SEVERE}
{@link SessionLog#OFF}  = {@value SessionLog#OFF}
*/ public enum LogLevel { diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLog.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLog.java index 44e0b610d98..918f20129fa 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLog.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLog.java @@ -67,6 +67,7 @@ * * * @see AbstractSessionLog + * @see DefaultSessionLog * @see SessionLogEntry * * @since TOPLink/Java 3.0 @@ -74,65 +75,159 @@ public interface SessionLog extends Cloneable { // EclipseLink log levels. They are mapped to java.util.logging.Level values. // Numeric constants can't be replaced with LogLevel..getId(); + /** + * {@code OFF} log level ID. + * @see LogLevel#OFF + */ int OFF = 8; + /** + * {@code OFF} log level name. + * @see LogLevel#OFF + */ String OFF_LABEL = LogLevel.OFF.getName(); //EL is not in a state to continue + /** + * {@code SEVERE} log level ID. + * @see LogLevel#SEVERE + */ int SEVERE = 7; + /** + * {@code SEVERE} log level name. + * @see LogLevel#SEVERE + */ String SEVERE_LABEL = LogLevel.SEVERE.getName(); //Exceptions that don't force a stop + /** + * {@code WARNING} log level ID. + * @see LogLevel#WARNING + */ int WARNING = 6; + /** + * {@code WARNING} log level name. + * @see LogLevel#WARNING + */ String WARNING_LABEL = LogLevel.WARNING.getName(); //Login and logout per server session with name + /** + * {@code INFO} log level ID. + * @see LogLevel#INFO + */ int INFO = 5; + /** + * {@code INFO} log level name. + * @see LogLevel#INFO + */ String INFO_LABEL = LogLevel.INFO.getName(); //Configuration info + /** + * {@code CONFIG} log level ID. + * @see LogLevel#CONFIG + */ int CONFIG = 4; + /** + * {@code CONFIG} log level name. + * @see LogLevel#CONFIG + */ String CONFIG_LABEL = LogLevel.CONFIG.getName(); //SQL + /** + * {@code FINE} log level ID. + * @see LogLevel#FINE + */ int FINE = 3; + /** + * {@code FINE} log level name. + * @see LogLevel#FINE + */ String FINE_LABEL = LogLevel.FINE.getName(); //Previously logged under logMessage and stack trace of exceptions at WARNING level + /** + * {@code FINER} log level ID. + * @see LogLevel#FINER + */ int FINER = 2; + /** + * {@code FINER} log level name. + * @see LogLevel#FINER + */ String FINER_LABEL = LogLevel.FINER.getName(); //Previously logged under logDebug + /** + * {@code FINEST} log level ID. + * @see LogLevel#FINEST + */ int FINEST = 1; + /** + * {@code FINEST} log level name. + * @see LogLevel#FINEST + */ String FINEST_LABEL = LogLevel.FINEST.getName(); + /** + * {@code ALL} log level ID. + * @see LogLevel#ALL + */ int ALL = 0; + /** + * {@code ALL} log level name. + * @see LogLevel#ALL + */ String ALL_LABEL = LogLevel.ALL.getName(); - //EclipseLink categories used for logging name space. + //EclipseLink categories used for logging category. + /** SQL logging category. */ String SQL = "sql"; + /** Transaction logging category. */ String TRANSACTION = "transaction"; + /** Event logging category. */ String EVENT = "event"; + /** Connection logging category. */ String CONNECTION = "connection"; + /** Query logging category. */ String QUERY = "query"; + /** Cache logging category. */ String CACHE = "cache"; + /** Propagation logging category. */ String PROPAGATION = "propagation"; + /** Sequencing logging category. */ String SEQUENCING = "sequencing"; + /** JPA logging category. */ String JPA = "jpa"; + /** EJB logging category. */ String EJB = "ejb"; + /** DMS profiler name space. */ String DMS = "dms"; + /** Metadata logging category. */ String METADATA = "metadata"; + /** Monitoring logging category. */ String MONITORING = "monitoring"; + /** Miscellaneous logging category. */ String MISC = "misc"; + /** MOXY logging category. */ String MOXY = "moxy"; String METAMODEL = "metamodel"; + /** Weaving logging category. */ String WEAVER = "weaver"; + /** Properties logging category. */ String PROPERTIES = "properties"; + /** Server logging category. */ String SERVER = "server"; + /** DDL logging category. */ String DDL = "ddl"; + /** DBWS logging category. */ String DBWS = "dbws"; + /** JPA RS logging category. */ String JPARS = "jpars"; - /** ModelGen logging name space. */ + /** ModelGen logging category. */ String PROCESSOR = "processor"; + /** Thread logging category. */ String THREAD = "thread"; String[] loggerCatagories = new String[] { @@ -162,13 +257,12 @@ public interface SessionLog extends Cloneable { }; /** - * PUBLIC: - * EclipseLink will call this method whenever something - * needs to be logged (messages, SQL, etc.). - * All the pertinent information will be contained in - * the specified entry. + * Log a message stored in {@link SessionLogEntry}. + *

+ * Write message content to a log writer, such as {@link System#out} or a file. + * EclipseLink will call this method whenever something needs to be logged. * - * @param entry SessionLogEntry that holds all the information for an EclipseLink logging event + * @param entry holds all the information to be written to the log */ void log(SessionLogEntry entry); @@ -235,608 +329,299 @@ public interface SessionLog extends Cloneable { void setShouldPrintSession(boolean flag); /** - * PUBLIC: - * Return the writer to which an accessor writes logged messages and SQL. - * If not set, this reference usually defaults to a writer on System.out. - * To enable logging, logMessages must be turned on in the session. + * Returns the writer to which logged messages and SQL are written. + *

+ * If not set, this reference typically defaults to a writer on {@link System#out}. + * To enable logging, {@code logMessages} must be turned on in the session. + * + * @return the writer used for logging messages and SQL */ Writer getWriter(); /** - * PUBLIC: - * Set the writer to which an accessor writes logged messages and SQL. - * If not set, this reference usually defaults to a writer on System.out. - * To enable logging, logMessages() is used on the session. + * Sets the writer to which logged messages and SQL are written. + *

+ * If not set, this reference typically defaults to a writer on {@link System#out}. + * To enable logging, {@code logMessages} must be turned on in the session. + * + * @param log the writer to be used for logging messages and SQL */ void setWriter(Writer log); /** - * PUBLIC: - * Return the log level. Used when session is not available. + * Returns the log level ID. *

- * The EclipseLink logging levels returned correspond to:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * Used when session is not available. + * + * @return the current log level ID + * @see LogLevel */ int getLevel(); /** - * PUBLIC: - *

- * Return the log level as a string value. + * Returns the log level name. + * + * @return the name of the current log level + * @see LogLevel */ String getLevelString(); /** - * PUBLIC: - * Return the log level; category is only needed where name space - * is available. - *

- * The EclipseLink logging levels returned correspond to:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
- *

- * The EclipseLink categories for the logging name space are:
- * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
Logging categories
 {@link #CACHE}  = {@value #CACHE}
 {@link #CONNECTION}  = {@value #CONNECTION}
 {@link #DMS}  = {@value #DMS}
 {@link #EJB}  = {@value #EJB}
 {@link #EVENT}  = {@value #EVENT}
 {@link #DBWS}  = {@value #DBWS}
 {@link #JPARS}  = {@value #JPARS}
 {@link #METAMODEL}  = {@value #METAMODEL}
 {@link #MOXY}  = {@value #MOXY}
 {@link #PROCESSOR}  = {@value #PROCESSOR}
 {@link #PROPAGATION}  = {@value #PROPAGATION}
 {@link #PROPERTIES}  = {@value #PROPERTIES}
 {@link #QUERY}  = {@value #QUERY}
 {@link #SEQUENCING}  = {@value #SEQUENCING}
 {@link #SERVER}  = {@value #SERVER}
 {@link #SQL}  = {@value #SQL}
 {@link #THREAD}  = {@value #THREAD}
 {@link #TRANSACTION}  = {@value #TRANSACTION}
 {@link #WEAVER}  = {@value #WEAVER}
+ * Returns the log level ID for provided category. + * + * @param category the log category in {@link SessionLog} + * @return the current log level ID + * @see LogLevel + * @see LogCategory */ int getLevel(String category); /** - * PUBLIC: - * Set the log level. Used when session is not available. + * Sets the log level. *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * Used when session is not available. + * + * @param level the log level ID in {@link SessionLog} + * @see LogLevel */ void setLevel(int level); /** - * PUBLIC: - * Set the log level. Category is only needed where name space - * is available. - *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
- *

- * The EclipseLink categories for the logging name space are:
- * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
Logging categories
 {@link #CACHE}  = {@value #CACHE}
 {@link #CONNECTION}  = {@value #CONNECTION}
 {@link #DMS}  = {@value #DMS}
 {@link #EJB}  = {@value #EJB}
 {@link #EVENT}  = {@value #EVENT}
 {@link #DBWS}  = {@value #DBWS}
 {@link #JPARS}  = {@value #JPARS}
 {@link #METAMODEL}  = {@value #METAMODEL}
 {@link #MOXY}  = {@value #MOXY}
 {@link #PROCESSOR}  = {@value #PROCESSOR}
 {@link #PROPAGATION}  = {@value #PROPAGATION}
 {@link #PROPERTIES}  = {@value #PROPERTIES}
 {@link #QUERY}  = {@value #QUERY}
 {@link #SEQUENCING}  = {@value #SEQUENCING}
 {@link #SERVER}  = {@value #SERVER}
 {@link #SQL}  = {@value #SQL}
 {@link #THREAD}  = {@value #THREAD}
 {@link #TRANSACTION}  = {@value #TRANSACTION}
 {@link #WEAVER}  = {@value #WEAVER}
+ * Sets the log level for provided category. + * + * @param level the log level ID in {@link SessionLog} + * @param category the log category in {@link SessionLog} + * @see LogLevel + * @see LogCategory */ void setLevel(int level, String category); /** - * PUBLIC: - * Check if a message of the given level would actually be logged. - * Used when session is not available. + * Whether a message of the given level would actually be logged. *

- * The EclipseLink logging levels available are: - * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * Used when session is not available. + * + * @param level the log level ID in {@link SessionLog} + * @return value of {@code true} when message would be logged or {@code false} otherwise + * @see LogLevel */ boolean shouldLog(int level); /** - * PUBLIC: - * Check if a message of the given level would actually be logged. - * Category is only needed where name space is available. - *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
- *

- * The EclipseLink categories for the logging name space are:
- * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
Logging categories
 {@link #CACHE}  = {@value #CACHE}
 {@link #CONNECTION}  = {@value #CONNECTION}
 {@link #DMS}  = {@value #DMS}
 {@link #EJB}  = {@value #EJB}
 {@link #EVENT}  = {@value #EVENT}
 {@link #DBWS}  = {@value #DBWS}
 {@link #JPARS}  = {@value #JPARS}
 {@link #METAMODEL}  = {@value #METAMODEL}
 {@link #MOXY}  = {@value #MOXY}
 {@link #PROCESSOR}  = {@value #PROCESSOR}
 {@link #PROPAGATION}  = {@value #PROPAGATION}
 {@link #PROPERTIES}  = {@value #PROPERTIES}
 {@link #QUERY}  = {@value #QUERY}
 {@link #SEQUENCING}  = {@value #SEQUENCING}
 {@link #SERVER}  = {@value #SERVER}
 {@link #SQL}  = {@value #SQL}
 {@link #THREAD}  = {@value #THREAD}
 {@link #TRANSACTION}  = {@value #TRANSACTION}
 {@link #WEAVER}  = {@value #WEAVER}
+ * Whether a message of the given level would actually be logged for provided category. + * + * @param level the log level ID in {@link SessionLog} + * @param category the log category in {@link SessionLog} + * @return value of {@code true} when message would be logged or {@code false} otherwise + * @see LogLevel + * @see LogCategory */ + boolean shouldLog(int level, String category); /** - * PUBLIC: * Log a message with message content supplier. - *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
* - * @param level the log request level + * @param level the log level ID in {@link SessionLog} * @param messageSupplier the message string supplier + * @see LogLevel */ void log(int level, Supplier messageSupplier); /** - * PUBLIC: - * Log a message with message content supplier. - *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * Log a message with message content supplier for provided category. * - * @param level the log request level - * @param category the log category + * @param level the log level ID in {@link SessionLog} + * @param category the log category in {@link SessionLog} * @param messageSupplier the message string supplier + * @see LogLevel + * @see LogCategory */ void log(int level, String category, Supplier messageSupplier); /** - * PUBLIC: - * Log a message that does not need to be translated. This method is intended for - * external use when logging messages are wanted within the EclipseLink output. + * Log a message. *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * The message won't be translated. This method is intended for external use when logging messages + * are wanted within the EclipseLink output. * - * @param level the log request level + * @param level the log level ID in {@link SessionLog} * @param message the message string + * @see LogLevel */ void log(int level, String message); /** - * PUBLIC: - * Log a message with one parameter that needs to be translated. + * Log a message with one parameter. *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * The message will be translated. * - * @param level the log request level + * @param level the log level ID in {@link SessionLog} * @param message the message string * @param param the message parameter + * @see LogLevel */ void log(int level, String message, Object param); /** - * PUBLIC: - * Log a message with one parameter that needs to be translated. + * Log a message with one parameter for provided category. *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * The message will be translated. * - * @param level the log request level - * @param category the log category + * @param level the log level ID in {@link SessionLog} + * @param category the log category in {@link SessionLog} * @param message the message string * @param param the message parameter + * @see LogLevel + * @see LogCategory */ void log(int level, String category, String message, Object param); /** - * PUBLIC: - * Log a message with two parameters that needs to be translated. + * Log a message with two parameters. *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * The message will be translated. * - * @param level the log request level + * @param level the log level ID in {@link SessionLog} * @param message the message string * @param param1 the 1st message parameter * @param param2 the 2nd message parameter + * @see LogLevel */ void log(int level, String message, Object param1, Object param2); /** - * PUBLIC: - * Log a message with two parameters that needs to be translated. + * Log a message with two parameters for provided category. *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * The message will be translated. * - * @param level the log request level - * @param category the log category + * @param level the log level ID in {@link SessionLog} + * @param category the log category in {@link SessionLog} * @param message the message string * @param param1 the 1st message parameter * @param param2 the 2nd message parameter + * @see LogLevel + * @see LogCategory */ void log(int level, String category, String message, Object param1, Object param2); - /** - * PUBLIC: - * Log a message with three parameters that needs to be translated. + /** + * Log a message with three parameters. *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * The message will be translated. * - * @param level the log request level + * @param level the log level ID in {@link SessionLog} * @param message the message string * @param param1 the 1st message parameter * @param param2 the 2nd message parameter * @param param3 the 3rd message parameter + * @see LogLevel */ void log(int level, String message, Object param1, Object param2, Object param3); /** - * PUBLIC: - * Log a message with three parameters that needs to be translated. + * Log a message with three parameters for provided category. *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * The message will be translated. * - * @param level the log request level - * @param category the log category + * @param level the log level ID in {@link SessionLog} + * @param category the log category in {@link SessionLog} * @param message the message string * @param param1 the 1st message parameter * @param param2 the 2nd message parameter * @param param3 the 3rd message parameter + * @see LogLevel + * @see LogCategory */ void log(int level, String category, String message, Object param1, Object param2, Object param3); /** - * PUBLIC: - * Log a message with four parameters that needs to be translated. + * Log a message with four parameters. *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * The message will be translated. * - * @param level the log request level + * @param level the log level ID in {@link SessionLog} * @param message the message string * @param param1 the 1st message parameter * @param param2 the 2nd message parameter * @param param3 the 3rd message parameter * @param param4 the 4th message parameter + * @see LogLevel */ void log(int level, String message, Object param1, Object param2, Object param3, Object param4); /** - * PUBLIC: - * Log a message with four parameters that needs to be translated. + * Log a message with four parameters for provided category. *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * The message will be translated. * - * @param level the log request level - * @param category the log category + * @param level the log level ID in {@link SessionLog} + * @param category the log category in {@link SessionLog} * @param message the message string * @param param1 the 1st message parameter * @param param2 the 2nd message parameter * @param param3 the 3rd message parameter * @param param4 the 4th message parameter + * @see LogLevel + * @see LogCategory */ void log(int level, String category, String message, Object param1, Object param2, Object param3, Object param4); /** - * PUBLIC: - * This method is called when the log request is from somewhere session is not available. - * The message needs to be translated. + * Log a message with parameters array. *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * The message will be translated. * - * @param level the log request level + * @param level the log level ID in {@link SessionLog} * @param message the message string - * @param arguments array of the message parameters + * @param parameters array of the message parameters + * @see LogLevel */ - void log(int level, String message, Object[] arguments); + void log(int level, String message, Object[] parameters); /** - * PUBLIC: - * This method is called when the log request is from somewhere session is not available. - * The message needs to be translated. + * Log a message with parameters array for provided category. *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * The message will be translated. * - * @param level the log request level - * @param category the log category + * @param level the log level ID in {@link SessionLog} + * @param category the log category in {@link SessionLog} * @param message the message string - * @param arguments array of the message parameters + * @param parameters array of the message parameters + * @see LogLevel + * @see LogCategory */ - void log(int level, String category, String message, Object[] arguments); + void log(int level, String category, String message, Object[] parameters); /** - * PUBLIC: - * This method is called when the log request is from somewhere session is not available. - * shouldTranslate flag determines if the message needs to be translated. + * Log a message with parameters array and translation flag. *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * The message will be translated when {@code shouldTranslate} is set to {@code true}. * - * @param level the log request level + * @param level the log level ID in {@link SessionLog} * @param message the message string - * @param arguments array of the message parameters - * @param shouldTranslate true if the message needs to be translated + * @param parameters array of the message parameters + * @param shouldTranslate value of {@code true} if the message needs to be translated or {@code false} otherwise + * @see LogLevel */ @Deprecated(forRemoval=true, since="4.0.9") - void log(int level, String message, Object[] arguments, boolean shouldTranslate); + void log(int level, String message, Object[] parameters, boolean shouldTranslate); /** - * PUBLIC: - * This method is called when the log request is from somewhere session is not available. - * shouldTranslate flag determines if the message needs to be translated. + * Log a message with parameters array and translation flag for provided category. *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * The message will be translated when {@code shouldTranslate} is set to {@code true}. * - * @param level the log request level - * @param category the log category + * @param level the log level ID in {@link SessionLog} + * @param category the log category in {@link SessionLog} * @param message the message string - * @param arguments array of the message parameters - * @param shouldTranslate true if the message needs to be translated + * @param parameters array of the message parameters + * @param shouldTranslate value of {@code true} if the message needs to be translated or {@code false} otherwise + * @see LogLevel + * @see LogCategory */ @Deprecated(forRemoval=true, since="4.0.9") - void log(int level, String category, String message, Object[] arguments, boolean shouldTranslate); + void log(int level, String category, String message, Object[] parameters, boolean shouldTranslate); /** * PUBLIC: diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/package-info.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/package-info.java new file mode 100644 index 00000000000..420774817b7 --- /dev/null +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/package-info.java @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2025 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0, + * or the Eclipse Distribution License v. 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause + */ + +/** + * Provides an API for logging messages in the EclipseLink codebase. + *

+ * The main logging entry point is the {@code SessionLog} interface, which is used by the codebase to make logging calls. + *

+ * Logging levels are defined in the {@code LogLevel} enum with corresponding constants in the {@code SessionLog} interface. + * Logging categories (namespaces) are defined in the {@code LogCategory} enum with corresponding constants in the + * {@code SessionLog} interface. + *

+ * An abstract implementation of the {@code SessionLog} interface is available as the {@code AbstractSessionLog} class, with + * log message content stored in {@code SessionLogEntry}. + * The default implementation of the session-independent logger is available as {@code DefaultSessionLog} and may be used + * when a {@code Session} instance is not available. + * + * @see org.eclipse.persistence.logging.SessionLog + * @see org.eclipse.persistence.logging.LogLevel + * @see org.eclipse.persistence.logging.LogCategory + * @see org.eclipse.persistence.logging.AbstractSessionLog + * @see org.eclipse.persistence.logging.SessionLogEntry + * @see org.eclipse.persistence.logging.DefaultSessionLog + */ +package org.eclipse.persistence.logging; From 74244a9cb4a5f9dc466738f4d5b456e33d40b4a9 Mon Sep 17 00:00:00 2001 From: Tomas-Kraus Date: Fri, 17 Oct 2025 15:22:18 +0200 Subject: [PATCH 2/7] Javadoc cleanup in logger. Signed-off-by: Tomas-Kraus --- .../persistence/logging/SessionLog.java | 405 +++++++----------- .../persistence/logging/package-info.java | 21 +- 2 files changed, 151 insertions(+), 275 deletions(-) diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLog.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLog.java index 918f20129fa..2a4855931a7 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLog.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLog.java @@ -18,27 +18,25 @@ import java.util.function.Supplier; /** - * SessionLog is the ever-so-simple interface used by - * EclipseLink to log generated messages and SQL. An implementor of - * this interface can be passed to the EclipseLink session - * (via the #setSessionLog(SessionLog) method); and - * all logging data will be passed through to the implementor - * via an instance of SessionLogEntry. This can be used - * to supplement debugging; or the entries could be stored - * in a database instead of logged to System.out, etc. + * SessionLog is the ever-so-simple interface used by EclipseLink to log generated messages and SQL. An implementor + * of this interface can be passed to the EclipseLink session (via the #setSessionLog(SessionLog) method); and all + * logging data will be passed through to the implementor via an instance of SessionLogEntry. This can be used + * to supplement debugging; or the entries could be stored in a database instead of logged to {@linkplain System#out}, + * etc. *

- * This class defines EclipseLink logging levels (that are used throughout EclipseLink code) with the following integer values: + * This class defines EclipseLink logging levels (that are used throughout EclipseLink code) with the following + * integer values: * * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * *
Logging levels
 ALL  = {@value #ALL}
 FINEST  = {@value #FINEST}
 FINER  = {@value #FINER}
 FINE  = {@value #FINE}
 CONFIG  = {@value #CONFIG}
 INFO  = {@value #INFO}
 WARNING = {@value #WARNING}
 SEVERE  = {@value #SEVERE}
 OFF  = {@value #OFF}
 {@link #ALL}  = {@value #ALL}
 {@link #FINEST}  = {@value #FINEST}
 {@link #FINER}  = {@value #FINER}
 {@link #FINE}  = {@value #FINE}
 {@link #CONFIG}  = {@value #CONFIG}
 {@link #INFO}  = {@value #INFO}
 {@link #WARNING} = {@value #WARNING}
 {@link #SEVERE}  = {@value #SEVERE}
 {@link #OFF}  = {@value #OFF}
*

* In addition, EclipseLink categories used for logging name space are defined with the following String values: @@ -66,8 +64,6 @@ *  {@link #WEAVER}  = {@value #WEAVER} * * - * @see AbstractSessionLog - * @see DefaultSessionLog * @see SessionLogEntry * * @since TOPLink/Java 3.0 @@ -75,109 +71,55 @@ public interface SessionLog extends Cloneable { // EclipseLink log levels. They are mapped to java.util.logging.Level values. // Numeric constants can't be replaced with LogLevel..getId(); - /** - * {@code OFF} log level ID. - * @see LogLevel#OFF - */ + /** {@code OFF} log level. */ int OFF = 8; - /** - * {@code OFF} log level name. - * @see LogLevel#OFF - */ + /** {@code OFF} log level name. */ String OFF_LABEL = LogLevel.OFF.getName(); //EL is not in a state to continue - /** - * {@code SEVERE} log level ID. - * @see LogLevel#SEVERE - */ + /** {@code SEVERE} log level. */ int SEVERE = 7; - /** - * {@code SEVERE} log level name. - * @see LogLevel#SEVERE - */ + /** {@code SEVERE} log level name. */ String SEVERE_LABEL = LogLevel.SEVERE.getName(); //Exceptions that don't force a stop - /** - * {@code WARNING} log level ID. - * @see LogLevel#WARNING - */ + /** {@code WARNING} log level. */ int WARNING = 6; - /** - * {@code WARNING} log level name. - * @see LogLevel#WARNING - */ + /** {@code WARNING} log level name. */ String WARNING_LABEL = LogLevel.WARNING.getName(); //Login and logout per server session with name - /** - * {@code INFO} log level ID. - * @see LogLevel#INFO - */ + /** {@code INFO} log level. */ int INFO = 5; - /** - * {@code INFO} log level name. - * @see LogLevel#INFO - */ + /** {@code INFO} log level name. */ String INFO_LABEL = LogLevel.INFO.getName(); //Configuration info - /** - * {@code CONFIG} log level ID. - * @see LogLevel#CONFIG - */ + /** {@code CONFIG} log level. */ int CONFIG = 4; - /** - * {@code CONFIG} log level name. - * @see LogLevel#CONFIG - */ + /** {@code CONFIG} log level name. */ String CONFIG_LABEL = LogLevel.CONFIG.getName(); //SQL - /** - * {@code FINE} log level ID. - * @see LogLevel#FINE - */ + /** {@code FINE} log level. */ int FINE = 3; - /** - * {@code FINE} log level name. - * @see LogLevel#FINE - */ + /** {@code FINE} log level name. */ String FINE_LABEL = LogLevel.FINE.getName(); //Previously logged under logMessage and stack trace of exceptions at WARNING level - /** - * {@code FINER} log level ID. - * @see LogLevel#FINER - */ + /** {@code FINER} log level. */ int FINER = 2; - /** - * {@code FINER} log level name. - * @see LogLevel#FINER - */ + /** {@code FINER} log level name. */ String FINER_LABEL = LogLevel.FINER.getName(); //Previously logged under logDebug - /** - * {@code FINEST} log level ID. - * @see LogLevel#FINEST - */ + /** {@code FINEST} log level. */ int FINEST = 1; - /** - * {@code FINEST} log level name. - * @see LogLevel#FINEST - */ + /** {@code FINEST} log level name. */ String FINEST_LABEL = LogLevel.FINEST.getName(); - /** - * {@code ALL} log level ID. - * @see LogLevel#ALL - */ + /** {@code ALL} log level. */ int ALL = 0; - /** - * {@code ALL} log level name. - * @see LogLevel#ALL - */ + /** {@code ALL} log level name. */ String ALL_LABEL = LogLevel.ALL.getName(); //EclipseLink categories used for logging category. @@ -258,9 +200,8 @@ public interface SessionLog extends Cloneable { /** * Log a message stored in {@link SessionLogEntry}. - *

* Write message content to a log writer, such as {@link System#out} or a file. - * EclipseLink will call this method whenever something needs to be logged. + * EclipseLink will call this method whenever something. * * @param entry holds all the information to be written to the log */ @@ -330,7 +271,6 @@ public interface SessionLog extends Cloneable { /** * Returns the writer to which logged messages and SQL are written. - *

* If not set, this reference typically defaults to a writer on {@link System#out}. * To enable logging, {@code logMessages} must be turned on in the session. * @@ -340,7 +280,6 @@ public interface SessionLog extends Cloneable { /** * Sets the writer to which logged messages and SQL are written. - *

* If not set, this reference typically defaults to a writer on {@link System#out}. * To enable logging, {@code logMessages} must be turned on in the session. * @@ -349,93 +288,86 @@ public interface SessionLog extends Cloneable { void setWriter(Writer log); /** - * Returns the log level ID. - *

- * Used when session is not available. + * Returns the log level. + * Used when session is not available. See {@linkplain SessionLog class description} for the list + * of available levels. * - * @return the current log level ID - * @see LogLevel + * @return the current log level */ int getLevel(); /** * Returns the log level name. + * See {@linkplain SessionLog class description} for the list of available levels. * - * @return the name of the current log level - * @see LogLevel + * @return the current log level name */ String getLevelString(); /** - * Returns the log level ID for provided category. + * Returns the log level for provided category. + * See {@linkplain SessionLog class description} for the list of available levels and categories. * - * @param category the log category in {@link SessionLog} - * @return the current log level ID - * @see LogLevel - * @see LogCategory + * @param category the log category + * @return the current log level */ int getLevel(String category); /** * Sets the log level. - *

- * Used when session is not available. + * Used when session is not available. See {@linkplain SessionLog class description} for the list + * of available levels. * - * @param level the log level ID in {@link SessionLog} - * @see LogLevel + * @param level the log level */ void setLevel(int level); /** * Sets the log level for provided category. + * See {@linkplain SessionLog class description} for the list of available levels and categories. * - * @param level the log level ID in {@link SessionLog} - * @param category the log category in {@link SessionLog} - * @see LogLevel - * @see LogCategory + * @param level the log level + * @param category the log category */ void setLevel(int level, String category); /** * Whether a message of the given level would actually be logged. - *

- * Used when session is not available. + * Used when session is not available. See {@linkplain SessionLog class description} for the list + * of available levels. * - * @param level the log level ID in {@link SessionLog} + * @param level the log level * @return value of {@code true} when message would be logged or {@code false} otherwise - * @see LogLevel */ boolean shouldLog(int level); /** * Whether a message of the given level would actually be logged for provided category. + * See {@linkplain SessionLog class description} for the list of available levels and categories. * - * @param level the log level ID in {@link SessionLog} - * @param category the log category in {@link SessionLog} + * @param level the log level + * @param category the log category * @return value of {@code true} when message would be logged or {@code false} otherwise - * @see LogLevel - * @see LogCategory */ boolean shouldLog(int level, String category); /** * Log a message with message content supplier. + * See {@linkplain SessionLog class description} for the list of available levels. * - * @param level the log level ID in {@link SessionLog} + * @param level the log level * @param messageSupplier the message string supplier - * @see LogLevel */ void log(int level, Supplier messageSupplier); /** * Log a message with message content supplier for provided category. + * See {@linkplain SessionLog class description} for the list of available levels and categories. * - * @param level the log level ID in {@link SessionLog} - * @param category the log category in {@link SessionLog} + * @param level the log level + * @param category the log category * @param messageSupplier the message string supplier - * @see LogLevel - * @see LogCategory */ void log(int level, String category, Supplier messageSupplier); @@ -443,204 +375,185 @@ public interface SessionLog extends Cloneable { * Log a message. *

* The message won't be translated. This method is intended for external use when logging messages - * are wanted within the EclipseLink output. + * are wanted within the EclipseLink output. See {@linkplain SessionLog class description} for the list + * of available levels. * - * @param level the log level ID in {@link SessionLog} + * @param level the log level * @param message the message string - * @see LogLevel */ void log(int level, String message); /** * Log a message with one parameter. - *

- * The message will be translated. + * The message will be translated. See {@linkplain SessionLog class description} for the list + * of available levels. * - * @param level the log level ID in {@link SessionLog} + * @param level the log level * @param message the message string * @param param the message parameter - * @see LogLevel */ void log(int level, String message, Object param); /** * Log a message with one parameter for provided category. - *

- * The message will be translated. + * The message will be translated. See {@linkplain SessionLog class description} for the list + * of available levels and categories. * - * @param level the log level ID in {@link SessionLog} - * @param category the log category in {@link SessionLog} + * @param level the log level + * @param category the log category * @param message the message string * @param param the message parameter - * @see LogLevel - * @see LogCategory */ void log(int level, String category, String message, Object param); /** * Log a message with two parameters. - *

- * The message will be translated. + * The message will be translated. See {@linkplain SessionLog class description} for the list + * of available levels. * - * @param level the log level ID in {@link SessionLog} + * @param level the log level * @param message the message string * @param param1 the 1st message parameter * @param param2 the 2nd message parameter - * @see LogLevel */ void log(int level, String message, Object param1, Object param2); /** * Log a message with two parameters for provided category. - *

- * The message will be translated. + * The message will be translated. See {@linkplain SessionLog class description} for the list + * of available levels and categories. * - * @param level the log level ID in {@link SessionLog} - * @param category the log category in {@link SessionLog} + * @param level the log level + * @param category the log category * @param message the message string * @param param1 the 1st message parameter * @param param2 the 2nd message parameter - * @see LogLevel - * @see LogCategory */ void log(int level, String category, String message, Object param1, Object param2); /** * Log a message with three parameters. - *

- * The message will be translated. + * The message will be translated. See {@linkplain SessionLog class description} for the list + * of available levels. * - * @param level the log level ID in {@link SessionLog} + * @param level the log level * @param message the message string * @param param1 the 1st message parameter * @param param2 the 2nd message parameter * @param param3 the 3rd message parameter - * @see LogLevel */ void log(int level, String message, Object param1, Object param2, Object param3); /** * Log a message with three parameters for provided category. - *

- * The message will be translated. + * The message will be translated. See {@linkplain SessionLog class description} for the list + * of available levels and categories. * - * @param level the log level ID in {@link SessionLog} - * @param category the log category in {@link SessionLog} + * @param level the log level + * @param category the log category * @param message the message string * @param param1 the 1st message parameter * @param param2 the 2nd message parameter * @param param3 the 3rd message parameter - * @see LogLevel - * @see LogCategory */ void log(int level, String category, String message, Object param1, Object param2, Object param3); /** * Log a message with four parameters. - *

- * The message will be translated. + * The message will be translated. See {@linkplain SessionLog class description} for the list + * of available levels. * - * @param level the log level ID in {@link SessionLog} + * @param level the log level * @param message the message string * @param param1 the 1st message parameter * @param param2 the 2nd message parameter * @param param3 the 3rd message parameter * @param param4 the 4th message parameter - * @see LogLevel */ void log(int level, String message, Object param1, Object param2, Object param3, Object param4); /** * Log a message with four parameters for provided category. - *

- * The message will be translated. + * The message will be translated. See {@linkplain SessionLog class description} for the list + * of available levels and categories. * - * @param level the log level ID in {@link SessionLog} - * @param category the log category in {@link SessionLog} + * @param level the log level + * @param category the log category * @param message the message string * @param param1 the 1st message parameter * @param param2 the 2nd message parameter * @param param3 the 3rd message parameter * @param param4 the 4th message parameter - * @see LogLevel - * @see LogCategory */ void log(int level, String category, String message, Object param1, Object param2, Object param3, Object param4); /** * Log a message with parameters array. - *

- * The message will be translated. + * The message will be translated. See {@linkplain SessionLog class description} for the list + * of available levels. * - * @param level the log level ID in {@link SessionLog} + * @param level the log level * @param message the message string * @param parameters array of the message parameters - * @see LogLevel */ void log(int level, String message, Object[] parameters); /** * Log a message with parameters array for provided category. - *

- * The message will be translated. + * The message will be translated. See {@linkplain SessionLog class description} for the list + * of available levels and categories. * - * @param level the log level ID in {@link SessionLog} - * @param category the log category in {@link SessionLog} + * @param level the log level + * @param category the log category * @param message the message string * @param parameters array of the message parameters - * @see LogLevel - * @see LogCategory */ void log(int level, String category, String message, Object[] parameters); /** * Log a message with parameters array and translation flag. - *

* The message will be translated when {@code shouldTranslate} is set to {@code true}. + * See {@linkplain SessionLog class description} for the list of available levels. * - * @param level the log level ID in {@link SessionLog} + * @param level the log level * @param message the message string * @param parameters array of the message parameters * @param shouldTranslate value of {@code true} if the message needs to be translated or {@code false} otherwise - * @see LogLevel */ @Deprecated(forRemoval=true, since="4.0.9") void log(int level, String message, Object[] parameters, boolean shouldTranslate); /** * Log a message with parameters array and translation flag for provided category. - *

* The message will be translated when {@code shouldTranslate} is set to {@code true}. + * See {@linkplain SessionLog class description} for the list of available levels and categories. * - * @param level the log level ID in {@link SessionLog} - * @param category the log category in {@link SessionLog} + * @param level the log level + * @param category the log category * @param message the message string * @param parameters array of the message parameters * @param shouldTranslate value of {@code true} if the message needs to be translated or {@code false} otherwise - * @see LogLevel - * @see LogCategory */ @Deprecated(forRemoval=true, since="4.0.9") void log(int level, String category, String message, Object[] parameters, boolean shouldTranslate); /** - * PUBLIC: - * This method is called when a throwable at finer level needs to be logged. + * Log a {@linkplain Throwable} at {@linkplain #FINER} level. + * + * @param throwable the {@linkplain Throwable} */ void throwing(Throwable throwable); /** - * PUBLIC: - * This method is called when a severe level message needs to be logged. - * The message will be translated + * Log a {@linkplain #SEVERE} level message. + * The message will be translated. * * @param message the message key */ void severe(String message); /** - * PUBLIC: - * This method is called when a severe level message needs to be logged. + * Log a {@linkplain #SEVERE} level message. * Logs a message with message content supplier. * * @param messageSupplier the message string supplier @@ -648,17 +561,15 @@ public interface SessionLog extends Cloneable { void severe(Supplier messageSupplier); /** - * PUBLIC: - * This method is called when a warning level message needs to be logged. - * The message will be translated + * Log a {@linkplain #WARNING} level message. + * The message will be translated. * * @param message the message key */ void warning(String message); /** - * PUBLIC: - * This method is called when a warning level message needs to be logged. + * Log a {@linkplain #WARNING} level message. * Logs a message with message content supplier. * * @param messageSupplier the message string supplier @@ -666,17 +577,15 @@ public interface SessionLog extends Cloneable { void warning(Supplier messageSupplier); /** - * PUBLIC: - * This method is called when an info level message needs to be logged. - * The message will be translated + * Log an {@linkplain #INFO} level message. + * The message will be translated. * * @param message the message key */ void info(String message); /** - * PUBLIC: - * This method is called when an info level message needs to be logged. + * Log an {@linkplain #INFO} level message. * Logs a message with message content supplier. * * @param messageSupplier the message string supplier @@ -684,17 +593,15 @@ public interface SessionLog extends Cloneable { void info(Supplier messageSupplier); /** - * PUBLIC: - * This method is called when a config level message needs to be logged. - * The message will be translated + * Log a {@linkplain #CONFIG} level message. + * The message will be translated. * * @param message the message key */ void config(String message); /** - * PUBLIC: - * This method is called when a config level message needs to be logged. + * Log a {@linkplain #CONFIG} level message. * Logs a message with message content supplier. * * @param messageSupplier the message string supplier @@ -702,35 +609,31 @@ public interface SessionLog extends Cloneable { void config(Supplier messageSupplier); /** - * PUBLIC: - * This method is called when a fine level message needs to be logged. - * The message will be translated + * Log a {@linkplain #FINE} level message. + * The message will be translated. * * @param message the message key */ void fine(String message); /** - * PUBLIC: - * This method is called when a fine level message needs to be logged. - * The message will be translated + * Log a {@linkplain #FINE} level message. + * Logs a message with message content supplier. * * @param messageSupplier the message string supplier */ void fine(Supplier messageSupplier); /** - * PUBLIC: - * This method is called when a finer level message needs to be logged. - * Logs a message with message content supplier. + * Log a {@linkplain #FINER} level message. + * The message will be translated. * * @param message the message key */ void finer(String message); /** - * PUBLIC: - * This method is called when a finer level message needs to be logged. + * Log a {@linkplain #FINER} level message. * Logs a message with message content supplier. * * @param messageSupplier the message string supplier @@ -738,17 +641,15 @@ public interface SessionLog extends Cloneable { void finer(Supplier messageSupplier); /** - * PUBLIC: - * This method is called when a finest level message needs to be logged. - * The message will be translated + * Log a {@linkplain #FINEST} level message. + * The message will be translated. * * @param message the message key */ void finest(String message); /** - * PUBLIC: - * This method is called when a finest level message needs to be logged. + * Log a {@linkplain #FINEST} level message. * Logs a message with message content supplier. * * @param messageSupplier the message string supplier @@ -756,22 +657,11 @@ public interface SessionLog extends Cloneable { void finest(Supplier messageSupplier); /** - * PUBLIC: - * Log a {@link Throwable} with level. - *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * Log a {@link Throwable}. + * See {@linkplain SessionLog class description} for the list of available levels. + * + * @param level the log level + * @param throwable the {@linkplain Throwable} */ void logThrowable(int level, Throwable throwable); @@ -790,28 +680,19 @@ public interface SessionLog extends Cloneable { void setSessionName(String sessionName); /** - * PUBLIC: - * Log a throwable with level. - *

- * The EclipseLink logging levels available are:
- * - * - * - * - * - * - * - * - * - * - * - *
Logging levels
{@link #ALL}  = {@value #ALL}
{@link #FINEST}  = {@value #FINEST}
{@link #FINER}  = {@value #FINER}
{@link #FINE}  = {@value #FINE}
{@link #CONFIG}  = {@value #CONFIG}
{@link #INFO}  = {@value #INFO}
{@link #WARNING} = {@value #WARNING}
{@link #SEVERE}  = {@value #SEVERE}
{@link #OFF}  = {@value #OFF}
+ * Log a {@link Throwable} for provided category. + * See {@linkplain SessionLog class description} for the list of available levels and categories. + * + * @param level the log level + * @param category the log category + * @param throwable the {@linkplain Throwable} */ void logThrowable(int level, String category, Throwable throwable); /** - * PUBLIC: * Clone the log. + * + * @return the cloned log */ Object clone(); } diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/package-info.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/package-info.java index 420774817b7..def34af877f 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/package-info.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/package-info.java @@ -11,24 +11,19 @@ */ /** - * Provides an API for logging messages in the EclipseLink codebase. + * Provides a comprehensive logging API for the EclipseLink. *

- * The main logging entry point is the {@code SessionLog} interface, which is used by the codebase to make logging calls. + * The main logging entry point is the {@linkplain org.eclipse.persistence.logging.SessionLog} interface, which is used + * by the codebase to make logging calls. *

* Logging levels are defined in the {@code LogLevel} enum with corresponding constants in the {@code SessionLog} interface. * Logging categories (namespaces) are defined in the {@code LogCategory} enum with corresponding constants in the * {@code SessionLog} interface. *

- * An abstract implementation of the {@code SessionLog} interface is available as the {@code AbstractSessionLog} class, with - * log message content stored in {@code SessionLogEntry}. - * The default implementation of the session-independent logger is available as {@code DefaultSessionLog} and may be used - * when a {@code Session} instance is not available. - * - * @see org.eclipse.persistence.logging.SessionLog - * @see org.eclipse.persistence.logging.LogLevel - * @see org.eclipse.persistence.logging.LogCategory - * @see org.eclipse.persistence.logging.AbstractSessionLog - * @see org.eclipse.persistence.logging.SessionLogEntry - * @see org.eclipse.persistence.logging.DefaultSessionLog + * An abstract implementation of the {@linkplain org.eclipse.persistence.logging.SessionLog} interface is available + * as the {@linkplain org.eclipse.persistence.logging.AbstractSessionLog} class, with log message content stored + * in {@linkplain org.eclipse.persistence.logging.SessionLogEntry}. + * The default implementation of the session-independent logger is available + * as {@linkplain org.eclipse.persistence.logging.DefaultSessionLog}. */ package org.eclipse.persistence.logging; From 084d743d042d139d774b4dc0b8399e65e8fe8321 Mon Sep 17 00:00:00 2001 From: Tomas-Kraus Date: Fri, 17 Oct 2025 16:40:22 +0200 Subject: [PATCH 3/7] Javadoc cleanup in logger. Signed-off-by: Tomas-Kraus --- .../org/eclipse/persistence/logging/SessionLog.java | 9 ++++----- .../eclipse/persistence/logging/package-info.java | 12 +++++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLog.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLog.java index 2a4855931a7..32a3f17b606 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLog.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLog.java @@ -153,7 +153,7 @@ public interface SessionLog extends Cloneable { String MISC = "misc"; /** MOXY logging category. */ String MOXY = "moxy"; - + /** Metamodel logging category. */ String METAMODEL = "metamodel"; /** Weaving logging category. */ String WEAVER = "weaver"; @@ -172,6 +172,7 @@ public interface SessionLog extends Cloneable { /** Thread logging category. */ String THREAD = "thread"; + /** An array of all logging categories. */ String[] loggerCatagories = new String[] { SQL, TRANSACTION, @@ -289,8 +290,7 @@ public interface SessionLog extends Cloneable { /** * Returns the log level. - * Used when session is not available. See {@linkplain SessionLog class description} for the list - * of available levels. + * Used when session is not available. * * @return the current log level */ @@ -298,7 +298,6 @@ public interface SessionLog extends Cloneable { /** * Returns the log level name. - * See {@linkplain SessionLog class description} for the list of available levels. * * @return the current log level name */ @@ -306,7 +305,7 @@ public interface SessionLog extends Cloneable { /** * Returns the log level for provided category. - * See {@linkplain SessionLog class description} for the list of available levels and categories. + * See {@linkplain SessionLog class description} for the list of available categories. * * @param category the log category * @return the current log level diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/package-info.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/package-info.java index def34af877f..cfa6f7303aa 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/package-info.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/package-info.java @@ -16,14 +16,16 @@ * The main logging entry point is the {@linkplain org.eclipse.persistence.logging.SessionLog} interface, which is used * by the codebase to make logging calls. *

- * Logging levels are defined in the {@code LogLevel} enum with corresponding constants in the {@code SessionLog} interface. - * Logging categories (namespaces) are defined in the {@code LogCategory} enum with corresponding constants in the - * {@code SessionLog} interface. + * Logging levels are defined in the {@linkplain org.eclipse.persistence.logging.LogLevel} enum with corresponding + * constants in the {@linkplain org.eclipse.persistence.logging.SessionLog} interface. Default logging level may be + * configured using {@code eclipselink.logging.level} system property. + *

+ * Logging categories (name spaces) are defined in the {@linkplain org.eclipse.persistence.logging.LogCategory} enum + * with corresponding constants in the {@linkplain org.eclipse.persistence.logging.SessionLog} interface. *

* An abstract implementation of the {@linkplain org.eclipse.persistence.logging.SessionLog} interface is available * as the {@linkplain org.eclipse.persistence.logging.AbstractSessionLog} class, with log message content stored * in {@linkplain org.eclipse.persistence.logging.SessionLogEntry}. - * The default implementation of the session-independent logger is available - * as {@linkplain org.eclipse.persistence.logging.DefaultSessionLog}. + * {@linkplain org.eclipse.persistence.logging.DefaultSessionLog} provides the default logger implementation. */ package org.eclipse.persistence.logging; From a3a1dc66a925310ff6dd6736601135f0adc4400a Mon Sep 17 00:00:00 2001 From: Tomas-Kraus Date: Mon, 20 Oct 2025 17:49:09 +0200 Subject: [PATCH 4/7] Javadoc cleanup in logger. Signed-off-by: Tomas-Kraus --- .../persistence/logging/jul/package-info.java | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/jul/package-info.java diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/jul/package-info.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/jul/package-info.java new file mode 100644 index 00000000000..3601684f3e9 --- /dev/null +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/jul/package-info.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2025 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0 which is available at + * http://www.eclipse.org/legal/epl-2.0, + * or the Eclipse Distribution License v. 1.0 which is available at + * http://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause + */ + +/* + * Provides {@link java.util.logging} specific extension of the EclipseLink logging. + *

+ * {@linkplain org.eclipse.persistence.logging.jul.JavaLog} class extends {@linkplain org.eclipse.persistence.logging.AbstractSessionLog} + * and implements JUL specific features. + * {@linkplain org.eclipse.persistence.logging.jul.EclipseLinkLogRecord} is JUL specific alternative + * of {@linkplain org.eclipse.persistence.logging.SessionLogEntry} to which this instance is being translated as part + * of {@linkplain org.eclipse.persistence.logging.jul.JavaLog#log(org.eclipse.persistence.logging.SessionLogEntry)} execution. + *

+ * JUL specific logging defines two logging name spaces:

+ * Name of the {@linkplain org.eclipse.persistence.logging.LogCategory} may be appended to the name space as well when present. + */ +/** + * Provides {@link java.util.logging} specific extensions for EclipseLink logging. + *

+ * The {@linkplain org.eclipse.persistence.logging.jul.JavaLog} class extends {@linkplain org.eclipse.persistence.logging.AbstractSessionLog}, + * implementing features specific to Java Util Logging (JUL). + *

+ * JUL-specific logging in EclipseLink defines two primary namespaces: + *

+ * The name of the {@linkplain org.eclipse.persistence.logging.LogCategory}, when present, + * may be appended to the namespace to further qualify the log output. + */ +package org.eclipse.persistence.logging.jul; From be9e406451f52e4c395b7edef0d2c3d2c84055ee Mon Sep 17 00:00:00 2001 From: Tomas-Kraus Date: Tue, 21 Oct 2025 10:40:28 +0200 Subject: [PATCH 5/7] Javadoc cleanup in logger: Replaced @link with @linkplain Signed-off-by: Tomas-Kraus --- .../logging/AbstractSessionLog.java | 12 ++-- .../persistence/logging/LogCategory.java | 52 +++++++------- .../eclipse/persistence/logging/LogLevel.java | 62 ++++++++-------- .../persistence/logging/SessionLog.java | 70 +++++++++---------- .../persistence/logging/SessionLogEntry.java | 16 ++--- .../persistence/logging/jul/package-info.java | 18 +---- 6 files changed, 107 insertions(+), 123 deletions(-) diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/AbstractSessionLog.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/AbstractSessionLog.java index e6e4f1684a0..839239f9232 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/AbstractSessionLog.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/AbstractSessionLog.java @@ -192,7 +192,7 @@ public static int getDefaultLoggingLevel() { } /** - * Creates a new instance of {@link AbstractSessionLog} class. + * Creates a new instance of {@linkplain AbstractSessionLog} class. */ protected AbstractSessionLog() { this.writer = new PrintWriter(System.out); @@ -478,11 +478,11 @@ public void setShouldPrintConnection(boolean shouldPrintConnection) { } /** - * Whether the {@link Exception} stack trace should be logged. + * Whether the {@linkplain Exception} stack trace should be logged. * By default, the stack is logged for FINER or less (finest). The logging of the stack * can be explicitly turned on or off. * - * @return value of {@code true} when the {@link Exception} stack trace should be logged + * @return value of {@code true} when the {@linkplain Exception} stack trace should be logged * or {@code false} otherwise */ @Override @@ -493,9 +493,9 @@ public boolean shouldLogExceptionStackTrace() { } /** - * Turn {@link Exception} stack trace logging on or off explicitly. + * Turn {@linkplain Exception} stack trace logging on or off explicitly. * - * @param shouldLogExceptionStackTrace value of {@code true} when the {@link Exception} stack trace + * @param shouldLogExceptionStackTrace value of {@code true} when the {@linkplain Exception} stack trace * should be logged or {@code false} otherwise */ @Override @@ -796,7 +796,7 @@ protected String formatMessage(SessionLogEntry entry) { * Translate the string value of the log level to the constant value. * If value is {@code null} or invalid use the default. * - * @return the constant value of the provided log level {@link String} + * @return the constant value of the provided log level {@linkplain String} */ public static int translateStringToLoggingLevel(String loggingLevel) { final LogLevel logLevel = LogLevel.toValue(loggingLevel); diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/LogCategory.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/LogCategory.java index b3dcb12d6a7..c9de952b7c2 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/LogCategory.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/LogCategory.java @@ -23,27 +23,27 @@ * The EclipseLink categories are:
* * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * *
Logging categories
 {@link SessionLog#CACHE}  = {@value SessionLog#CACHE}
 {@link SessionLog#CONNECTION}  = {@value SessionLog#CONNECTION}
 {@link SessionLog#DDL}  = {@value SessionLog#DDL}
 {@link SessionLog#DMS}  = {@value SessionLog#DMS}
 {@link SessionLog#EJB}  = {@value SessionLog#EJB}
 {@link SessionLog#EVENT}  = {@value SessionLog#EVENT}
 {@link SessionLog#JPA}  = {@value SessionLog#JPA}
 {@link SessionLog#JPARS}  = {@value SessionLog#JPARS}
 {@link SessionLog#METADATA}  = {@value SessionLog#METADATA}
 {@link SessionLog#METAMODEL}  = {@value SessionLog#METAMODEL}
 {@link SessionLog#MONITORING}  = {@value SessionLog#MONITORING}
 {@link SessionLog#MOXY}  = {@value SessionLog#MOXY}
 {@link SessionLog#PROPAGATION}  = {@value SessionLog#PROPAGATION}
 {@link SessionLog#PROPERTIES}  = {@value SessionLog#PROPERTIES}
 {@link SessionLog#QUERY}  = {@value SessionLog#QUERY}
 {@link SessionLog#SEQUENCING}  = {@value SessionLog#SEQUENCING}
 {@link SessionLog#SERVER}  = {@value SessionLog#SERVER}
 {@link SessionLog#SQL}  = {@value SessionLog#SQL}
 {@link SessionLog#THREAD}  = {@value SessionLog#THREAD}
 {@link SessionLog#TRANSACTION}  = {@value SessionLog#TRANSACTION}
 {@link SessionLog#WEAVER}  = {@value SessionLog#WEAVER}
 {@linkplain SessionLog#CACHE}  = {@value SessionLog#CACHE}
 {@linkplain SessionLog#CONNECTION}  = {@value SessionLog#CONNECTION}
 {@linkplain SessionLog#DDL}  = {@value SessionLog#DDL}
 {@linkplain SessionLog#DMS}  = {@value SessionLog#DMS}
 {@linkplain SessionLog#EJB}  = {@value SessionLog#EJB}
 {@linkplain SessionLog#EVENT}  = {@value SessionLog#EVENT}
 {@linkplain SessionLog#JPA}  = {@value SessionLog#JPA}
 {@linkplain SessionLog#JPARS}  = {@value SessionLog#JPARS}
 {@linkplain SessionLog#METADATA}  = {@value SessionLog#METADATA}
 {@linkplain SessionLog#METAMODEL}  = {@value SessionLog#METAMODEL}
 {@linkplain SessionLog#MONITORING}  = {@value SessionLog#MONITORING}
 {@linkplain SessionLog#MOXY}  = {@value SessionLog#MOXY}
 {@linkplain SessionLog#PROPAGATION}  = {@value SessionLog#PROPAGATION}
 {@linkplain SessionLog#PROPERTIES}  = {@value SessionLog#PROPERTIES}
 {@linkplain SessionLog#QUERY}  = {@value SessionLog#QUERY}
 {@linkplain SessionLog#SEQUENCING}  = {@value SessionLog#SEQUENCING}
 {@linkplain SessionLog#SERVER}  = {@value SessionLog#SERVER}
 {@linkplain SessionLog#SQL}  = {@value SessionLog#SQL}
 {@linkplain SessionLog#THREAD}  = {@value SessionLog#THREAD}
 {@linkplain SessionLog#TRANSACTION}  = {@value SessionLog#TRANSACTION}
 {@linkplain SessionLog#WEAVER}  = {@value SessionLog#WEAVER}
*/ public enum LogCategory { @@ -78,7 +78,7 @@ public enum LogCategory { /** Logger name spaces prefix. */ private static final String NAMESPACE_PREFIX = "eclipselink.logging."; - /** {@link Map} for {@link String} to {@link LogCategory} case insensitive conversion. */ + /** {@linkplain Map} for {@linkplain String} to {@linkplain LogCategory} case insensitive conversion. */ private static final Map stringValuesMap = new HashMap<>(2 * length); /** Logger name spaces lookup table. */ @@ -100,10 +100,10 @@ public enum LogCategory { } /** - * Returns {@link LogCategory} object holding the value of the specified {@link String}. - * @param name The {@link String} to be parsed. - * @return {@link LogCategory} object holding the value represented by the string argument or {@code null} when - * there exists no corresponding {@link LogCategory} object to provided argument value. {@code null} value + * Returns {@linkplain LogCategory} object holding the value of the specified {@linkplain String}. + * @param name The {@linkplain String} to be parsed. + * @return {@linkplain LogCategory} object holding the value represented by the string argument or {@code null} when + * there exists no corresponding {@linkplain LogCategory} object to provided argument value. {@code null} value * of the string argument is converted to {@code ALL}. */ public static final LogCategory toValue(final String name) { diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/LogLevel.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/LogLevel.java index cb71a085480..69d29d342b4 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/LogLevel.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/LogLevel.java @@ -41,18 +41,18 @@ * to avoid the overhead of logging. * *

- * The logging level IDs in {@link SessionLog}:
+ * The logging level IDs in {@linkplain SessionLog}:
* * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * *
Logging levels
{@link SessionLog#ALL}  = {@value SessionLog#ALL}
{@link SessionLog#FINEST}  = {@value SessionLog#FINEST}
{@link SessionLog#FINER}  = {@value SessionLog#FINER}
{@link SessionLog#FINE}  = {@value SessionLog#FINE}
{@link SessionLog#CONFIG}  = {@value SessionLog#CONFIG}
{@link SessionLog#INFO}  = {@value SessionLog#INFO}
{@link SessionLog#WARNING} = {@value SessionLog#WARNING}
{@link SessionLog#SEVERE}  = {@value SessionLog#SEVERE}
{@link SessionLog#OFF}  = {@value SessionLog#OFF}
{@linkplain SessionLog#ALL}  = {@value SessionLog#ALL}
{@linkplain SessionLog#FINEST}  = {@value SessionLog#FINEST}
{@linkplain SessionLog#FINER}  = {@value SessionLog#FINER}
{@linkplain SessionLog#FINE}  = {@value SessionLog#FINE}
{@linkplain SessionLog#CONFIG}  = {@value SessionLog#CONFIG}
{@linkplain SessionLog#INFO}  = {@value SessionLog#INFO}
{@linkplain SessionLog#WARNING} = {@value SessionLog#WARNING}
{@linkplain SessionLog#SEVERE}  = {@value SessionLog#SEVERE}
{@linkplain SessionLog#OFF}  = {@value SessionLog#OFF}
*/ public enum LogLevel { @@ -79,7 +79,7 @@ public enum LogLevel { /** Logging levels enumeration length. */ public static final int length = LogLevel.values().length; - /** {@link Map} for {@link String} to {@link LogLevel} case insensitive lookup. */ + /** {@linkplain Map} for {@linkplain String} to {@linkplain LogLevel} case insensitive lookup. */ private static final Map stringValuesMap = new HashMap<>(2 * length); // Initialize String to LogLevel case insensitive lookup Map. @@ -89,7 +89,7 @@ public enum LogLevel { } } - /** Array for id to {@link LogLevel} lookup. */ + /** Array for id to {@linkplain LogLevel} lookup. */ private static final LogLevel[] idValues = new LogLevel[length]; // Initialize id to LogLevel lookup array. @@ -100,21 +100,21 @@ public enum LogLevel { } /** - * Returns {@link LogLevel} object holding the value of the specified {@link String}. - * @param name The {@link String} to be parsed. - * @return {@link LogLevel} object holding the value represented by the string argument or {@code null} when - * there exists no corresponding {@link LogLevel} object to provided argument value. + * Returns {@linkplain LogLevel} object holding the value of the specified {@linkplain String}. + * @param name The {@linkplain String} to be parsed. + * @return {@linkplain LogLevel} object holding the value represented by the string argument or {@code null} when + * there exists no corresponding {@linkplain LogLevel} object to provided argument value. */ public static LogLevel toValue(final String name) { return name != null ? stringValuesMap.get(name.toUpperCase()) : null; } /** - * Returns {@link LogLevel} object holding the value of the specified {@link String}. - * @param name The {@link String} to be parsed. - * @param fallBack {@link LogLevel} object to return on ID lookup failure. - * @return {@link LogLevel} object holding the value represented by the string argument or {@code fallBack} when - * there exists no corresponding {@link LogLevel} object to provided argument value. + * Returns {@linkplain LogLevel} object holding the value of the specified {@linkplain String}. + * @param name The {@linkplain String} to be parsed. + * @param fallBack {@linkplain LogLevel} object to return on ID lookup failure. + * @return {@linkplain LogLevel} object holding the value represented by the string argument or {@code fallBack} when + * there exists no corresponding {@linkplain LogLevel} object to provided argument value. */ public static LogLevel toValue(final String name, final LogLevel fallBack) { if (name != null) { @@ -126,10 +126,10 @@ public static LogLevel toValue(final String name, final LogLevel fallBack) { } /** - * Returns {@link LogLevel} object holding the value of the specified {@link LogLevel} ID. - * @param id {@link LogLevel} ID. - * @return {@link LogLevel} object holding the value represented by the {@code id} argument. - * @throws IllegalArgumentException when {@link LogLevel} ID is out of valid {@link LogLevel} IDs range. + * Returns {@linkplain LogLevel} object holding the value of the specified {@linkplain LogLevel} ID. + * @param id {@linkplain LogLevel} ID. + * @return {@linkplain LogLevel} object holding the value represented by the {@code id} argument. + * @throws IllegalArgumentException when {@linkplain LogLevel} ID is out of valid {@linkplain LogLevel} IDs range. */ public static LogLevel toValue(final int id) { if (id < 0 || id >= length) { @@ -140,12 +140,12 @@ public static LogLevel toValue(final int id) { } /** - * Returns {@link LogLevel} object holding the value of the specified {@link LogLevel} ID. - * @param id {@link LogLevel} ID. - * @param fallBack {@link LogLevel} object to return on ID lookup failure. - * @return {@link LogLevel} object holding the value represented by the {@code id} argument or {@code fallBack} - * when provided ID is not valid {@link LogLevel} ID. - * @throws IllegalArgumentException when {@link LogLevel} ID is out of valid {@link LogLevel} IDs range. + * Returns {@linkplain LogLevel} object holding the value of the specified {@linkplain LogLevel} ID. + * @param id {@linkplain LogLevel} ID. + * @param fallBack {@linkplain LogLevel} object to return on ID lookup failure. + * @return {@linkplain LogLevel} object holding the value represented by the {@code id} argument or {@code fallBack} + * when provided ID is not valid {@linkplain LogLevel} ID. + * @throws IllegalArgumentException when {@linkplain LogLevel} ID is out of valid {@linkplain LogLevel} IDs range. */ public static LogLevel toValue(final int id, final LogLevel fallBack) { if (id >= 0 && id < length) { diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLog.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLog.java index 32a3f17b606..c96aa90b97f 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLog.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLog.java @@ -28,40 +28,40 @@ * integer values: * * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * *
Logging levels
 {@link #ALL}  = {@value #ALL}
 {@link #FINEST}  = {@value #FINEST}
 {@link #FINER}  = {@value #FINER}
 {@link #FINE}  = {@value #FINE}
 {@link #CONFIG}  = {@value #CONFIG}
 {@link #INFO}  = {@value #INFO}
 {@link #WARNING} = {@value #WARNING}
 {@link #SEVERE}  = {@value #SEVERE}
 {@link #OFF}  = {@value #OFF}
 {@linkplain #ALL}  = {@value #ALL}
 {@linkplain #FINEST}  = {@value #FINEST}
 {@linkplain #FINER}  = {@value #FINER}
 {@linkplain #FINE}  = {@value #FINE}
 {@linkplain #CONFIG}  = {@value #CONFIG}
 {@linkplain #INFO}  = {@value #INFO}
 {@linkplain #WARNING} = {@value #WARNING}
 {@linkplain #SEVERE}  = {@value #SEVERE}
 {@linkplain #OFF}  = {@value #OFF}
*

* In addition, EclipseLink categories used for logging name space are defined with the following String values: * * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * *
Logging categories
 {@link #CACHE}  = {@value #CACHE}
 {@link #CONNECTION}  = {@value #CONNECTION}
 {@link #DMS}  = {@value #DMS}
 {@link #EJB}  = {@value #EJB}
 {@link #EVENT}  = {@value #EVENT}
 {@link #DBWS}  = {@value #DBWS}
 {@link #JPARS}  = {@value #JPARS}
 {@link #METADATA}  = {@value #METADATA}
 {@link #METAMODEL}  = {@value #METAMODEL}
 {@link #MOXY}  = {@value #MOXY}
 {@link #PROCESSOR}  = {@value #PROCESSOR}
 {@link #PROPAGATION}  = {@value #PROPAGATION}
 {@link #PROPERTIES}  = {@value #PROPERTIES}
 {@link #QUERY}  = {@value #QUERY}
 {@link #SEQUENCING}  = {@value #SEQUENCING}
 {@link #SERVER}  = {@value #SERVER}
 {@link #SQL}  = {@value #SQL}
 {@link #THREAD}  = {@value #THREAD}
 {@link #TRANSACTION}  = {@value #TRANSACTION}
 {@link #WEAVER}  = {@value #WEAVER}
 {@linkplain #CACHE}  = {@value #CACHE}
 {@linkplain #CONNECTION}  = {@value #CONNECTION}
 {@linkplain #DMS}  = {@value #DMS}
 {@linkplain #EJB}  = {@value #EJB}
 {@linkplain #EVENT}  = {@value #EVENT}
 {@linkplain #DBWS}  = {@value #DBWS}
 {@linkplain #JPARS}  = {@value #JPARS}
 {@linkplain #METADATA}  = {@value #METADATA}
 {@linkplain #METAMODEL}  = {@value #METAMODEL}
 {@linkplain #MOXY}  = {@value #MOXY}
 {@linkplain #PROCESSOR}  = {@value #PROCESSOR}
 {@linkplain #PROPAGATION}  = {@value #PROPAGATION}
 {@linkplain #PROPERTIES}  = {@value #PROPERTIES}
 {@linkplain #QUERY}  = {@value #QUERY}
 {@linkplain #SEQUENCING}  = {@value #SEQUENCING}
 {@linkplain #SERVER}  = {@value #SERVER}
 {@linkplain #SQL}  = {@value #SQL}
 {@linkplain #THREAD}  = {@value #THREAD}
 {@linkplain #TRANSACTION}  = {@value #TRANSACTION}
 {@linkplain #WEAVER}  = {@value #WEAVER}
* * @see SessionLogEntry @@ -200,8 +200,8 @@ public interface SessionLog extends Cloneable { }; /** - * Log a message stored in {@link SessionLogEntry}. - * Write message content to a log writer, such as {@link System#out} or a file. + * Log a message stored in {@linkplain SessionLogEntry}. + * Write message content to a log writer, such as {@linkplain System#out} or a file. * EclipseLink will call this method whenever something. * * @param entry holds all the information to be written to the log @@ -272,7 +272,7 @@ public interface SessionLog extends Cloneable { /** * Returns the writer to which logged messages and SQL are written. - * If not set, this reference typically defaults to a writer on {@link System#out}. + * If not set, this reference typically defaults to a writer on {@linkplain System#out}. * To enable logging, {@code logMessages} must be turned on in the session. * * @return the writer used for logging messages and SQL @@ -281,7 +281,7 @@ public interface SessionLog extends Cloneable { /** * Sets the writer to which logged messages and SQL are written. - * If not set, this reference typically defaults to a writer on {@link System#out}. + * If not set, this reference typically defaults to a writer on {@linkplain System#out}. * To enable logging, {@code logMessages} must be turned on in the session. * * @param log the writer to be used for logging messages and SQL @@ -656,7 +656,7 @@ public interface SessionLog extends Cloneable { void finest(Supplier messageSupplier); /** - * Log a {@link Throwable}. + * Log a {@linkplain Throwable}. * See {@linkplain SessionLog class description} for the list of available levels. * * @param level the log level @@ -679,7 +679,7 @@ public interface SessionLog extends Cloneable { void setSessionName(String sessionName); /** - * Log a {@link Throwable} for provided category. + * Log a {@linkplain Throwable} for provided category. * See {@linkplain SessionLog class description} for the list of available levels and categories. * * @param level the log level diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLogEntry.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLogEntry.java index 908f4fb7374..d220983780d 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLogEntry.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/SessionLogEntry.java @@ -39,7 +39,7 @@ public class SessionLogEntry implements Serializable { private String sessionId; /** - * @deprecated Use {@link #getThread()} instead + * @deprecated Use {@linkplain #getThread()} instead */ @Deprecated(forRemoval=true, since="4.0.9") protected transient Thread thread; @@ -47,31 +47,31 @@ public class SessionLogEntry implements Serializable { private final Integer connectionId; /** - * @deprecated Use {@link #getMessage()} instead + * @deprecated Use {@linkplain #getMessage()} instead */ @Deprecated(forRemoval=true, since="4.0.9") protected String message; /** - * @deprecated Use {@link #getException()} instead + * @deprecated Use {@linkplain #getException()} instead */ @Deprecated(forRemoval=true, since="4.0.9") protected Throwable throwable; /** - * @deprecated Use {@link #getLevel()} instead + * @deprecated Use {@linkplain #getLevel()} instead */ @Deprecated(forRemoval=true, since="4.0.9") protected int level; /** - * @deprecated Use {@link #getNameSpace()} instead + * @deprecated Use {@linkplain #getNameSpace()} instead */ @Deprecated(forRemoval=true, since="4.0.9") protected String nameSpace; /** - * @deprecated Use {@link #getParameters()} instead + * @deprecated Use {@linkplain #getParameters()} instead */ @Deprecated(forRemoval=true, since="4.0.9") protected Object[] parameters; @@ -83,13 +83,13 @@ public class SessionLogEntry implements Serializable { protected boolean shouldTranslate; /** - * @deprecated Use {@link #getSourceClassName()} instead + * @deprecated Use {@linkplain #getSourceClassName()} instead */ @Deprecated(forRemoval=true, since="4.0.9") protected String sourceClassName; /** - * @deprecated Use {@link #getSourceMethodName()} instead + * @deprecated Use {@linkplain #getSourceMethodName()} instead */ @Deprecated(forRemoval=true, since="4.0.9") protected String sourceMethodName; diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/jul/package-info.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/jul/package-info.java index 3601684f3e9..e3d2f7969fe 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/jul/package-info.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/jul/package-info.java @@ -10,24 +10,8 @@ * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause */ -/* - * Provides {@link java.util.logging} specific extension of the EclipseLink logging. - *

- * {@linkplain org.eclipse.persistence.logging.jul.JavaLog} class extends {@linkplain org.eclipse.persistence.logging.AbstractSessionLog} - * and implements JUL specific features. - * {@linkplain org.eclipse.persistence.logging.jul.EclipseLinkLogRecord} is JUL specific alternative - * of {@linkplain org.eclipse.persistence.logging.SessionLogEntry} to which this instance is being translated as part - * of {@linkplain org.eclipse.persistence.logging.jul.JavaLog#log(org.eclipse.persistence.logging.SessionLogEntry)} execution. - *

- * JUL specific logging defines two logging name spaces:

    - *
  • {@code org.eclipse.persistence.default} for log output without {@code Session} context.
  • - *
  • {@code org.eclipse.persistence.session.} for {@code Session} related log output. Value of {@code } - * is the name of the current session.
  • - *
- * Name of the {@linkplain org.eclipse.persistence.logging.LogCategory} may be appended to the name space as well when present. - */ /** - * Provides {@link java.util.logging} specific extensions for EclipseLink logging. + * Provides {@linkplain java.util.logging} specific extensions for EclipseLink logging. *

* The {@linkplain org.eclipse.persistence.logging.jul.JavaLog} class extends {@linkplain org.eclipse.persistence.logging.AbstractSessionLog}, * implementing features specific to Java Util Logging (JUL). From d8a8a7c8df8acd0838458a8f30803596d0174e56 Mon Sep 17 00:00:00 2001 From: Tomas-Kraus Date: Tue, 21 Oct 2025 11:16:16 +0200 Subject: [PATCH 6/7] Javadoc cleanup in logger: JavaLog class level javadoc. Signed-off-by: Tomas-Kraus --- .../java/org/eclipse/persistence/logging/jul/JavaLog.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/jul/JavaLog.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/jul/JavaLog.java index 5e4563944e7..980b34d7e96 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/jul/JavaLog.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/jul/JavaLog.java @@ -28,11 +28,8 @@ import java.util.logging.StreamHandler; /** - * PUBLIC: - *

- * This is a wrapper class for java.util.logging. It is used when messages need to - * be logged through java.util.logging. - *

+ * Provides {@linkplain java.util.logging} specific logging functions. + * * @see org.eclipse.persistence.logging.SessionLog * @see org.eclipse.persistence.logging.AbstractSessionLog * @see org.eclipse.persistence.logging.SessionLogEntry From 01cfcd615afc4a896785e9b2ebed19bacf1cffa0 Mon Sep 17 00:00:00 2001 From: Tomas-Kraus Date: Tue, 21 Oct 2025 11:29:38 +0200 Subject: [PATCH 7/7] Javadoc cleanup in logger: Removed "PUBLIC" from javadoc. Signed-off-by: Tomas-Kraus --- .../logging/AbstractSessionLog.java | 35 ++----------------- .../persistence/logging/jul/JavaLog.java | 22 ++---------- 2 files changed, 5 insertions(+), 52 deletions(-) diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/AbstractSessionLog.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/AbstractSessionLog.java index 839239f9232..057a9c2adcb 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/AbstractSessionLog.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/AbstractSessionLog.java @@ -200,9 +200,8 @@ protected AbstractSessionLog() { } /** - * PUBLIC: - *

- * Return the log level. It is used when session is not available. + * Return the log level. + * It is used when session is not available. * * @return the log level */ @@ -212,8 +211,6 @@ public int getLevel() { } /** - * PUBLIC: - *

* Return the log level as a string value. */ @Override @@ -222,8 +219,6 @@ public String getLevelString() { } /** - * PUBLIC: - *

* Return the log level for the category name space. * * @return the log level @@ -235,8 +230,6 @@ public int getLevel(String category) { } /** - * PUBLIC: - *

* Set the log level. It is used when session is not available. * * @param level the new log level @@ -247,8 +240,6 @@ public void setLevel(int level) { } /** - * PUBLIC: - *

* Set the log level for the category name space. * * @param level the new log level @@ -260,8 +251,6 @@ public void setLevel(int level, String category) { } /** - * PUBLIC: - *

* Check if a message of the given level would actually be logged. * It is used when session is not available. * @@ -274,8 +263,6 @@ public boolean shouldLog(int level) { } /** - * PUBLIC: - *

* Check if a message of the given level would actually be logged for the category name space. * !isOff() is checked to screen out the possibility when both * log level and log request level are set to OFF. @@ -290,8 +277,6 @@ public boolean shouldLog(int level, String category) { } /** - * PUBLIC: - *

* Return the singleton SessionLog. If the singleton SessionLog does not exist, * a new one is created based on the version of JDK being used from the Version class. * @@ -305,10 +290,7 @@ public static SessionLog getLog() { } /** - * PUBLIC: - *

* Set the singleton SessionLog. - *

* * @param sessionLog a SessionLog */ @@ -579,8 +561,6 @@ public void setShouldPrintThread(boolean shouldPrintThread) { } /** - * PUBLIC: - *

* Return the writer that will receive the formatted log entries. * * @return the log writer @@ -591,8 +571,6 @@ public Writer getWriter() { } /** - * PUBLIC: - *

* Set the writer that will receive the formatted log entries. * * @param writer the log writer @@ -604,8 +582,6 @@ public void setWriter(Writer writer) { /** - * PUBLIC: - *

* Set the writer that will receive the formatted log entries. * * @param outputstream the log writer @@ -760,7 +736,6 @@ protected String getPrefixString(int level, String category) { } /** - * PUBLIC: * Set the date-time format to be used when printing a log entry date. * * @param timeStampFormatter Formatter for printing time stamp in the log entry. @@ -804,8 +779,6 @@ public static int translateStringToLoggingLevel(String loggingLevel) { } /** - * PUBLIC: - *

* Log a throwable at FINER level. * * @param throwable a Throwable @@ -888,8 +861,6 @@ public void finest(Supplier messageSupplier) { } /** - * PUBLIC: - *

* Log a throwable with level. * * @param level the log request level value @@ -904,8 +875,6 @@ public void logThrowable(int level, Throwable throwable) { } /** - * PUBLIC: - *

* Log a throwable with level. * * @param level the log request level value diff --git a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/jul/JavaLog.java b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/jul/JavaLog.java index 980b34d7e96..b0e2224328c 100644 --- a/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/jul/JavaLog.java +++ b/foundation/org.eclipse.persistence.core/src/main/java/org/eclipse/persistence/logging/jul/JavaLog.java @@ -96,12 +96,9 @@ public Map getCategoryLoggers() { } /** - * PUBLIC: - *

* Return the effective log level for the name space extracted from session and category. * If a Logger's level is set to be null then the Logger will use an effective Level that will * be obtained by walking up the parent tree and using the first non-null Level. - *

* * @return the effective log level. */ @@ -127,10 +124,7 @@ public int getLevel(String category) { } /** - * PUBLIC: - *

* Set the log level to a logger with name space extracted from the given category. - *

*/ @Override public void setLevel(final int level, String category) { @@ -149,10 +143,7 @@ public void setLevel(final int level, String category) { } /** - * PUBLIC: - *

* Set the output stream that will receive the formatted log entries. - *

* * @param fileOutputStream the file output stream will receive the formatted log entries. */ @@ -231,12 +222,9 @@ protected Level getJavaLevel(int level) { } /** - * PUBLIC: - *

* Check if a message of the given level would actually be logged by the logger * with name space built from the given session and category. - * Return the shouldLog for the given category from - *

+ * * @return true if the given message level will be logged */ @Override @@ -250,10 +238,8 @@ public boolean shouldLog(int level, String category) { } /** - * PUBLIC: - *

* Log a SessionLogEntry - *

+ * * @param entry SessionLogEntry that holds all the information for a TopLink logging event */ @Override @@ -297,10 +283,8 @@ protected void internalLog(SessionLogEntry entry, Level javaLevel, Logger logger } /** - * PUBLIC: - *

* Log a throwable. - *

+ * * @param throwable a throwable */ @Override