luetzkendorf 2004/12/07 09:55:19
Modified: src/stores/org/apache/slide/store/txfile
TxXMLFileDescriptorsStore.java
Log:
logging now checked composing message
Revision Changes Path
1.21 +30 -23
jakarta-slide/src/stores/org/apache/slide/store/txfile/TxXMLFileDescriptorsStore.java
Index: TxXMLFileDescriptorsStore.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/stores/org/apache/slide/store/txfile/TxXMLFileDescriptorsStore.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- TxXMLFileDescriptorsStore.java 22 Sep 2004 15:16:58 -0000 1.20
+++ TxXMLFileDescriptorsStore.java 7 Dec 2004 17:55:19 -0000 1.21
@@ -414,10 +414,12 @@
public synchronized int prepare(Xid xid) throws XAException {
Object txId = wrap(xid);
- getLogger().log(
- "Thread " + Thread.currentThread() + " prepares transaction
branch " + txId,
- LOG_CHANNEL,
- Logger.DEBUG);
+ if (getLogger().isEnabled(LOG_CHANNEL, DEBUG_LEVEL)) {
+ getLogger().log(
+ "Thread " + Thread.currentThread() + " prepares transaction
branch " + txId,
+ LOG_CHANNEL,
+ Logger.DEBUG);
+ }
try {
if (deferSaving) {
// save all descriptors registered for saving
@@ -474,14 +476,16 @@
}
Object txId = wrap(xid);
Thread currentThread = Thread.currentThread();
- getLogger().log(
- "Thread "
- + currentThread
- + (flags == TMSUSPEND ? " suspends" : flags == TMFAIL ? "
fails" : " ends")
- + " work on behalf of transaction branch "
- + txId,
- LOG_CHANNEL,
- DEBUG_LEVEL);
+ if (getLogger().isEnabled(LOG_CHANNEL, DEBUG_LEVEL)) {
+ getLogger().log(
+ "Thread "
+ + currentThread
+ + (flags == TMSUSPEND ? " suspends" : flags == TMFAIL ?
" fails" : " ends")
+ + " work on behalf of transaction branch "
+ + txId,
+ LOG_CHANNEL,
+ DEBUG_LEVEL);
+ }
switch (flags) {
case TMSUSPEND :
@@ -506,14 +510,17 @@
public synchronized void start(Xid xid, int flags) throws XAException {
Object txId = wrap(xid);
Thread currentThread = Thread.currentThread();
- getLogger().log(
- "Thread "
- + currentThread
- + (flags == TMNOFLAGS ? " starts" : flags == TMJOIN ? "
joins" : " resumes")
- + " work on behalf of transaction branch "
- + txId,
- LOG_CHANNEL,
- DEBUG_LEVEL);
+
+ if (getLogger().isEnabled(LOG_CHANNEL, DEBUG_LEVEL)) {
+ getLogger().log(
+ "Thread "
+ + currentThread
+ + (flags == TMNOFLAGS ? " starts" : flags == TMJOIN ? "
joins" : " resumes")
+ + " work on behalf of transaction branch "
+ + txId,
+ LOG_CHANNEL,
+ DEBUG_LEVEL);
+ }
switch (flags) {
// a new transaction
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]