mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Update to use String format and Object varargs
This commit is contained in:
@@ -17,6 +17,6 @@ public interface SpiLogger {
|
||||
/**
|
||||
* Log a debug level message.
|
||||
*/
|
||||
void debug(String msg);
|
||||
void debug(String msg, Object... args);
|
||||
|
||||
}
|
||||
|
||||
@@ -43,14 +43,17 @@ public interface SpiTransaction extends Transaction {
|
||||
/**
|
||||
* Log a message to the SQL logger.
|
||||
*/
|
||||
void logSql(String... msg);
|
||||
void logSql(String msg, Object... args);
|
||||
|
||||
/**
|
||||
* Log a message to the SUMMARY logger.
|
||||
* Log a summary message to the SUMMARY logger.
|
||||
*/
|
||||
void logSummary(String... msg);
|
||||
void logSummary(String msg, Object... args);
|
||||
|
||||
void logTxn(String... args);
|
||||
/**
|
||||
* Log a transaction message to the transaction logger.
|
||||
*/
|
||||
void logTxn(String msg, Object... args);
|
||||
|
||||
/**
|
||||
* Register a "Deferred Relationship" that requires an additional update later.
|
||||
|
||||
@@ -149,18 +149,18 @@ public abstract class SpiTransactionProxy implements SpiTransaction {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logSql(String... msg) {
|
||||
transaction.logSql(msg);
|
||||
public void logSql(String msg, Object... args) {
|
||||
transaction.logSql(msg, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logSummary(String... msg) {
|
||||
transaction.logSummary(msg);
|
||||
public void logSummary(String msg, Object... args) {
|
||||
transaction.logSummary(msg, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logTxn(String... args) {
|
||||
transaction.logTxn(args);
|
||||
public void logTxn(String msg, Object... args) {
|
||||
transaction.logTxn(msg, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,17 +20,17 @@ public interface SpiTxnLogger {
|
||||
/**
|
||||
* Log a SQL message.
|
||||
*/
|
||||
void sql(String[] msg);
|
||||
void sql(String msg, Object... args);
|
||||
|
||||
/**
|
||||
* Log a Summary message.
|
||||
*/
|
||||
void sum(String[] msg);
|
||||
void sum(String msg, Object... args);
|
||||
|
||||
/**
|
||||
* Log a Transaction message.
|
||||
*/
|
||||
void txn(String[] args);
|
||||
void txn(String msg, Object... args);
|
||||
|
||||
/**
|
||||
* Transaction Committed.
|
||||
|
||||
@@ -4,7 +4,6 @@ import io.ebean.CancelableQuery;
|
||||
import io.ebean.Transaction;
|
||||
import io.ebean.util.JdbcClose;
|
||||
import io.ebeaninternal.api.*;
|
||||
import io.ebeaninternal.server.util.Str;
|
||||
import io.ebeaninternal.server.persist.Binder;
|
||||
import io.ebeaninternal.server.persist.TrimLogSql;
|
||||
import io.ebeaninternal.server.util.BindParamsParser;
|
||||
@@ -151,7 +150,7 @@ public abstract class AbstractSqlQueryRequest implements CancelableQuery {
|
||||
}
|
||||
if (isLogSql()) {
|
||||
long micros = (System.nanoTime() - startNano) / 1000L;
|
||||
transaction.logSql(TrimLogSql.trim(sql), "; --bind(", bindLog, ") --micros(", String.valueOf(micros), ")");
|
||||
transaction.logSql("{0}; --bind({1}) --micros({2})", TrimLogSql.trim(sql), bindLog, micros);
|
||||
}
|
||||
} finally {
|
||||
lock.unlock();
|
||||
|
||||
@@ -691,8 +691,8 @@ public final class OrmQueryRequest<T> extends BeanRequest implements SpiOrmQuery
|
||||
/**
|
||||
* Log the SQL if the logLevel is appropriate.
|
||||
*/
|
||||
public void logSql(String... sql) {
|
||||
transaction.logSql(sql);
|
||||
public void logSql(String msg, Object... args) {
|
||||
transaction.logSql(msg, args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -928,20 +928,20 @@ public final class PersistRequestBean<T> extends PersistRequest implements BeanP
|
||||
}
|
||||
|
||||
private void logSummaryMessage() {
|
||||
String draft = (beanDescriptor.isDraftable() && !publish) ? "] draft[true]" : "]";
|
||||
String draft = (beanDescriptor.isDraftable() && !publish) ? " draft[true]" : "";
|
||||
String name = beanDescriptor.name();
|
||||
switch (type) {
|
||||
case INSERT:
|
||||
transaction.logSummary("Inserted [" , name , "] [" , (idValue == null ? "" : idValue.toString()) , draft);
|
||||
transaction.logSummary("Inserted [{0}] [{1}]{2}", name, (idValue == null ? "" : idValue), draft);
|
||||
break;
|
||||
case UPDATE:
|
||||
transaction.logSummary("Updated [" , name , "] [" , idValue.toString() , draft);
|
||||
transaction.logSummary("Updated [{0}] [{1}]{2}", name, idValue , draft);
|
||||
break;
|
||||
case DELETE:
|
||||
transaction.logSummary("Deleted [" , name , "] [" , idValue.toString() , draft);
|
||||
transaction.logSummary("Deleted [{0}] [{1}]{2}", name, idValue , draft);
|
||||
break;
|
||||
case DELETE_SOFT:
|
||||
transaction.logSummary("SoftDelete [" , name , "] [" , idValue.toString() , draft);
|
||||
transaction.logSummary("SoftDelete [{0}] [{1}]{2}", name, idValue , draft);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ public final class PersistRequestCallableSql extends PersistRequest {
|
||||
persistExecute.collectSqlCall(label, startNanos);
|
||||
}
|
||||
if (transaction.isLogSummary()) {
|
||||
transaction.logSummary("CallableSql label[", callableSql.getLabel(), "] rows[", String.valueOf(rowCount), "] bind[", bindLog, "]");
|
||||
transaction.logSummary("CallableSql label[{0}] rows[{1}] bind[{2}]", callableSql.getLabel(), rowCount, bindLog);
|
||||
}
|
||||
|
||||
// register table modifications with the transaction event
|
||||
|
||||
@@ -83,7 +83,7 @@ public final class PersistRequestOrmUpdate extends PersistRequest {
|
||||
OrmUpdateType ormUpdateType = ormUpdate.getOrmUpdateType();
|
||||
String tableName = ormUpdate.getBaseTable();
|
||||
if (transaction.isLogSummary()) {
|
||||
transaction.logSummary(ormUpdateType.toString(), " table[", tableName, "] rows[", String.valueOf(rowCount), "] bind[", bindLog, "]");
|
||||
transaction.logSummary("{0} table[{1}] rows[{2}] bind[{3}]", ormUpdateType, tableName, rowCount, bindLog);
|
||||
}
|
||||
if (ormUpdate.isNotifyCache()) {
|
||||
// add the modification info to the TransactionEvent
|
||||
|
||||
@@ -3,7 +3,6 @@ package io.ebeaninternal.server.core;
|
||||
import io.ebeaninternal.api.SpiEbeanServer;
|
||||
import io.ebeaninternal.api.SpiSqlUpdate;
|
||||
import io.ebeaninternal.api.SpiTransaction;
|
||||
import io.ebeaninternal.server.util.Str;
|
||||
import io.ebeaninternal.server.persist.BatchControl;
|
||||
import io.ebeaninternal.server.persist.PersistExecute;
|
||||
import io.ebeaninternal.server.persist.TrimLogSql;
|
||||
@@ -148,7 +147,7 @@ public final class PersistRequestUpdateSql extends PersistRequest {
|
||||
*/
|
||||
public void logSqlBatchBind() {
|
||||
if (transaction.isLogSql()) {
|
||||
transaction.logSql(" -- bind(", bindLog, ")");
|
||||
transaction.logSql(" -- bind({0})", bindLog);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +160,7 @@ public final class PersistRequestUpdateSql extends PersistRequest {
|
||||
persistExecute.collectSqlUpdate(label, startNanos);
|
||||
}
|
||||
if (transaction.isLogSql() && !batchThisRequest) {
|
||||
transaction.logSql(TrimLogSql.trim(updateSql.getGeneratedSql()), "; -- bind(", bindLog, ") rows(", String.valueOf(rowCount), ")");
|
||||
transaction.logSql("{0}; -- bind({1}) rows({2})", TrimLogSql.trim(updateSql.getGeneratedSql()), bindLog, rowCount);
|
||||
}
|
||||
if (updateSql.isAutoTableMod()) {
|
||||
// add the modification info to the TransactionEvent
|
||||
|
||||
@@ -123,7 +123,7 @@ public final class RelationalQueryRequest extends AbstractSqlQueryRequest {
|
||||
public void logSummary() {
|
||||
if (transaction.isLogSummary()) {
|
||||
long micros = (System.nanoTime() - startNano) / 1000L;
|
||||
transaction.logSummary("SqlQuery rows[", String.valueOf(rows), "] micros[", String.valueOf(micros), "] bind[", bindLog, "]");
|
||||
transaction.logSummary("SqlQuery rows[{0}] micros[{1}] bind[{2}]", rows, micros, bindLog);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package io.ebeaninternal.server.logger;
|
||||
import io.ebeaninternal.api.SpiLogger;
|
||||
|
||||
import static java.lang.System.Logger.Level.DEBUG;
|
||||
import static java.lang.System.Logger.Level.TRACE;
|
||||
|
||||
final class DSpiLogger implements SpiLogger {
|
||||
|
||||
@@ -19,8 +18,7 @@ final class DSpiLogger implements SpiLogger {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void debug(String msg) {
|
||||
logger.log(DEBUG, msg);
|
||||
public void debug(String msg, Object... args) {
|
||||
logger.log(DEBUG, msg, args);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,18 +36,18 @@ final class DTxnLogger implements SpiTxnLogger {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sql(String[] msg) {
|
||||
sql.debug(Str.add(logPrefix, msg));
|
||||
public void sql(String msg, Object... args) {
|
||||
sql.debug(Str.add(logPrefix, msg), args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sum(String[] msg) {
|
||||
sum.debug(Str.add(logPrefix, msg));
|
||||
public void sum(String msg, Object... args) {
|
||||
sum.debug(Str.add(logPrefix, msg), args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void txn(String[] msg) {
|
||||
txn.debug(Str.add(logPrefix, msg));
|
||||
public void txn(String msg, Object... args) {
|
||||
txn.debug(Str.add(logPrefix, msg), args);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -313,7 +313,7 @@ public final class BatchControl {
|
||||
BatchedBeanHolder[] bsArray = beanHolderArray();
|
||||
Arrays.sort(bsArray, depthComparator);
|
||||
if (transaction.isLogSummary()) {
|
||||
transaction.logSummary("BatchControl flush " , Arrays.toString(bsArray));
|
||||
transaction.logSummary("BatchControl flush {0}", Arrays.toString(bsArray));
|
||||
}
|
||||
for (BatchedBeanHolder beanHolder : bsArray) {
|
||||
beanHolder.executeNow();
|
||||
|
||||
@@ -672,7 +672,7 @@ public final class DefaultPersister implements Persister {
|
||||
if (idList != null) {
|
||||
q.where().idIn(idList);
|
||||
if (t.isLogSummary()) {
|
||||
t.logSummary("-- DeleteById of ", descriptor.name(), " ids[", idList.toString(), "] requires fetch of foreign key values");
|
||||
t.logSummary("-- DeleteById of {0} ids[{1}] requires fetch of foreign key values", descriptor.name(), idList);
|
||||
}
|
||||
List<?> beanList = server.findList(q, t);
|
||||
deleteCascade(beanList, t, deleteMode, false);
|
||||
@@ -681,7 +681,7 @@ public final class DefaultPersister implements Persister {
|
||||
} else {
|
||||
q.where().idEq(id);
|
||||
if (t.isLogSummary()) {
|
||||
t.logSummary("-- DeleteById of ", descriptor.name(), " id[", String.valueOf(id), "] requires fetch of foreign key values");
|
||||
t.logSummary("-- DeleteById of {0} id[{1}] requires fetch of foreign key values", descriptor.name(), id);
|
||||
}
|
||||
EntityBean bean = (EntityBean) server.findOne(q, t);
|
||||
if (bean == null) {
|
||||
@@ -741,7 +741,7 @@ public final class DefaultPersister implements Persister {
|
||||
for (BeanPropertyAssocMany<?> many : manys) {
|
||||
SqlUpdate sqlDelete = many.deleteByParentId(id, idList);
|
||||
if (t.isLogSummary()) {
|
||||
t.logSummary("-- Deleting intersection table entries: ", many.fullName());
|
||||
t.logSummary("-- Deleting intersection table entries: {0}", many.fullName());
|
||||
}
|
||||
executeSqlUpdate(sqlDelete, t);
|
||||
}
|
||||
@@ -751,9 +751,9 @@ public final class DefaultPersister implements Persister {
|
||||
SqlUpdate deleteById = descriptor.deleteById(id, idList, deleteMode);
|
||||
if (t.isLogSummary()) {
|
||||
if (idList != null) {
|
||||
t.logSummary("-- Deleting ", descriptor.name(), " Ids: ", idList.toString());
|
||||
t.logSummary("-- Deleting {0} Ids: {1}", descriptor.name(), idList);
|
||||
} else {
|
||||
t.logSummary("-- Deleting ", descriptor.name(), " Id: ", String.valueOf(id));
|
||||
t.logSummary("-- Deleting {0} Id: {1}", descriptor.name(), id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ final class DeleteUnloadedForeignKeys {
|
||||
|
||||
SpiTransaction t = request.transaction();
|
||||
if (t.isLogSummary()) {
|
||||
t.logSummary("-- Ebean fetching foreign key values for delete of ", descriptor.name(), " id:", String.valueOf(id));
|
||||
t.logSummary("-- Ebean fetching foreign key values for delete of {0} id:{1}", descriptor.name(), id);
|
||||
}
|
||||
beanWithForeignKeys = (EntityBean) server.findOne(q, t);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import io.ebeaninternal.server.persist.BatchedPstmt;
|
||||
import io.ebeaninternal.server.persist.BatchedPstmtHolder;
|
||||
import io.ebeaninternal.server.persist.dmlbind.BindableRequest;
|
||||
import io.ebeaninternal.server.bind.DataBind;
|
||||
import io.ebeaninternal.server.util.Str;
|
||||
|
||||
import javax.persistence.OptimisticLockException;
|
||||
import java.sql.Connection;
|
||||
@@ -102,7 +101,7 @@ public abstract class DmlHandler implements PersistHandler, BindableRequest {
|
||||
} catch (OptimisticLockException e) {
|
||||
// add the SQL and bind values to error message
|
||||
final String m = e.getMessage() + " sql[" + sql + "] bind[" + bindLog + "]";
|
||||
persistRequest.transaction().logSummary("OptimisticLockException:", m);
|
||||
persistRequest.transaction().logSummary("OptimisticLockException:{0}", m);
|
||||
throw new OptimisticLockException(m, null, e.getEntity());
|
||||
}
|
||||
}
|
||||
@@ -146,15 +145,15 @@ public abstract class DmlHandler implements PersistHandler, BindableRequest {
|
||||
switch (batchedStatus) {
|
||||
case BATCHED_FIRST: {
|
||||
transaction.logSql(sql);
|
||||
transaction.logSql(" -- bind(", bindLog.toString(), ")");
|
||||
transaction.logSql(" -- bind({0})", bindLog);
|
||||
return;
|
||||
}
|
||||
case BATCHED: {
|
||||
transaction.logSql(" -- bind(", bindLog.toString(), ")");
|
||||
transaction.logSql(" -- bind({0})", bindLog);
|
||||
return;
|
||||
}
|
||||
default: {
|
||||
transaction.logSql(sql, "; -- bind(", bindLog.toString(), ")");
|
||||
transaction.logSql("{0}; -- bind({1})", sql, bindLog);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ import io.ebeaninternal.server.core.OrmQueryRequest;
|
||||
import io.ebeaninternal.server.core.SpiResultSet;
|
||||
import io.ebeaninternal.server.deploy.BeanDescriptor;
|
||||
import io.ebeaninternal.server.persist.Binder;
|
||||
import io.ebeaninternal.server.util.Str;
|
||||
|
||||
import javax.persistence.PersistenceException;
|
||||
import java.sql.ResultSet;
|
||||
@@ -73,7 +72,7 @@ public final class CQueryEngine {
|
||||
try {
|
||||
int rows = query.execute();
|
||||
if (request.logSql()) {
|
||||
request.logSql(query.generatedSql(), "; --bind(", query.bindLog(), ") --micros(", query.micros() + ") --rows(", rows + ")");
|
||||
request.logSql("{0}; --bind({1}) --micros({2}) --rows({3})", query.generatedSql(), query.bindLog(), query.micros(), rows);
|
||||
}
|
||||
return rows;
|
||||
} catch (SQLException e) {
|
||||
@@ -129,7 +128,7 @@ public final class CQueryEngine {
|
||||
SpiTransaction t = request.transaction();
|
||||
if (t.isLogSummary()) {
|
||||
// log the error to the transaction log
|
||||
t.logSummary("ERROR executing query, bindLog[", bindLog, "] error:", StringHelper.removeNewLines(e.getMessage()));
|
||||
t.logSummary("ERROR executing query, bindLog[{0}] error:{1}", bindLog, StringHelper.removeNewLines(e.getMessage()));
|
||||
}
|
||||
// ensure 'rollback' is logged if queryOnly transaction
|
||||
t.connection();
|
||||
@@ -147,7 +146,7 @@ public final class CQueryEngine {
|
||||
}
|
||||
|
||||
private <T> void logGeneratedSql(OrmQueryRequest<T> request, String sql, String bindLog, long micros) {
|
||||
request.logSql(sql, "; --bind(", bindLog, ") --micros(", micros + ")");
|
||||
request.logSql("{0}; --bind({1}) --micros({2})", sql, bindLog, micros);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -403,7 +402,7 @@ public final class CQueryEngine {
|
||||
* Log the generated SQL to the transaction log.
|
||||
*/
|
||||
private void logSql(CQuery<?> query) {
|
||||
query.transaction().logSql(query.generatedSql(), "; --bind(", query.bindLog(), ") --micros(", String.valueOf(query.micros()), ")");
|
||||
query.transaction().logSql("{0}; --bind({1}) --micros({2})", query.generatedSql(), query.bindLog(), query.micros());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+5
-5
@@ -430,17 +430,17 @@ final class ImplicitReadOnlyTransaction implements SpiTransaction, TxnProfileEve
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logSql(String... msg) {
|
||||
logger.sql(msg);
|
||||
public void logSql(String msg, Object... args) {
|
||||
logger.sql(msg, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logSummary(String... msg) {
|
||||
logger.sum(msg);
|
||||
public void logSummary(String msg, Object... args) {
|
||||
logger.sum(msg, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logTxn(String... args) {
|
||||
public void logTxn(String msg, Object... args) {
|
||||
// never called
|
||||
}
|
||||
|
||||
|
||||
@@ -714,18 +714,18 @@ class JdbcTransaction implements SpiTransaction, TxnProfileEventCodes {
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void logSql(String... msg) {
|
||||
logger.sql(msg);
|
||||
public void logSql(String msg, Object... args) {
|
||||
logger.sql(msg, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void logSummary(String... msg) {
|
||||
logger.sum(msg);
|
||||
public final void logSummary(String msg, Object... args) {
|
||||
logger.sum(msg, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logTxn(String... args) {
|
||||
logger.txn(args);
|
||||
public void logTxn(String msg, Object... args) {
|
||||
logger.txn(msg, args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -129,17 +129,17 @@ final class NoTransaction implements SpiTransaction {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logSql(String... msg) {
|
||||
public void logSql(String msg, Object... args) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logSummary(String... msg) {
|
||||
public void logSummary(String msg, Object... args) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logTxn(String... args) {
|
||||
public void logTxn(String msg, Object... args) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -49,13 +49,13 @@ final class SavepointTransaction extends SpiTransactionProxy {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logSql(String... msg) {
|
||||
transaction.logSql(Str.add(spPrefix, msg));
|
||||
public void logSql(String msg, Object... args) {
|
||||
transaction.logSql(Str.add(spPrefix, msg), args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void logSummary(String... msg) {
|
||||
transaction.logSummary(Str.add(spPrefix, msg));
|
||||
public void logSummary(String msg, Object... args) {
|
||||
transaction.logSummary(Str.add(spPrefix, msg), args);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -92,7 +92,7 @@ final class SavepointTransaction extends SpiTransactionProxy {
|
||||
connection.releaseSavepoint(savepoint);
|
||||
state = STATE_COMMITTED;
|
||||
manager.notifyOfCommit(this);
|
||||
transaction.logTxn(spPrefix, "commit");
|
||||
transaction.logTxn(spPrefix + "commit");
|
||||
} catch (SQLException e) {
|
||||
throw new PersistenceException("Error trying to commit/release Savepoint", e);
|
||||
}
|
||||
@@ -103,7 +103,7 @@ final class SavepointTransaction extends SpiTransactionProxy {
|
||||
connection.rollback(savepoint);
|
||||
state = STATE_ROLLED_BACK;
|
||||
manager.notifyOfRollback(this, cause);
|
||||
transaction.logTxn(spPrefix, "rollback");//TODO: Pass the cause
|
||||
transaction.logTxn(spPrefix + "rollback");//TODO: Pass the cause
|
||||
} catch (SQLException e) {
|
||||
throw new PersistenceException("Error trying to rollback Savepoint", e);
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package io.ebean.test;
|
||||
|
||||
import io.ebeaninternal.api.SpiLogger;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -24,11 +25,11 @@ final class CaptureLogger implements SpiLogger {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void debug(String msg) {
|
||||
public void debug(String msg, Object... args) {
|
||||
if (active) {
|
||||
messages.add(msg);
|
||||
messages.add(MessageFormat.format(msg, args));
|
||||
}
|
||||
wrapped.debug(msg);
|
||||
wrapped.debug(msg, args);
|
||||
}
|
||||
|
||||
List<String> start() {
|
||||
|
||||
@@ -5,7 +5,6 @@ import io.ebeaninternal.api.SpiLogger;
|
||||
import io.ebeaninternal.api.SpiLoggerFactory;
|
||||
|
||||
import static java.lang.System.Logger.Level.DEBUG;
|
||||
import static java.lang.System.Logger.Level.TRACE;
|
||||
|
||||
/**
|
||||
* Create a logger that captures the SQL and register it for later access in tests.
|
||||
@@ -38,9 +37,8 @@ public class CapturingLoggerFactory implements SpiLoggerFactory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void debug(String msg) {
|
||||
logger.log(DEBUG, msg);
|
||||
public void debug(String msg, Object... args) {
|
||||
logger.log(DEBUG, msg, args);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ public class EbeanServerFactory_ServerConfigStart_Test {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void debug(String msg) {
|
||||
public void debug(String msg, Object... args) {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user