luetzkendorf 2004/12/07 09:55:33
Modified: src/stores/org/apache/slide/store/txfile
XMLResourceDescriptor.java
Log:
logging now checked composing message
Revision Changes Path
1.16 +18 -8
jakarta-slide/src/stores/org/apache/slide/store/txfile/XMLResourceDescriptor.java
Index: XMLResourceDescriptor.java
===================================================================
RCS file:
/home/cvs/jakarta-slide/src/stores/org/apache/slide/store/txfile/XMLResourceDescriptor.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- XMLResourceDescriptor.java 28 Jul 2004 09:33:56 -0000 1.15
+++ XMLResourceDescriptor.java 7 Dec 2004 17:55:33 -0000 1.16
@@ -89,7 +89,9 @@
if (txId == null) {
store.throwInternalError("Not inside tx");
}
- logger.logFine("Tx " + txId + " saves data for " + loadPath);
+ if (logger.isFineEnabled()) {
+ logger.logFine("Tx " + txId + " saves data for " + loadPath);
+ }
OutputStream os = null;
try {
@@ -121,7 +123,9 @@
* @throws ObjectAlreadyExistsException if the descriptor already exists
*/
public void create() throws ServiceAccessException,
ObjectAlreadyExistsException {
- logger.logFiner("Tx " + txId + " creates " + loadPath);
+ if (logger.isFinerEnabled()) {
+ logger.logFiner("Tx " + txId + " creates " + loadPath);
+ }
if (txId == null) {
store.throwInternalError("Not inside tx");
}
@@ -144,7 +148,9 @@
* @throws ObjectNotFoundException if the descriptor does not exist
*/
public void delete() throws ServiceAccessException,
ObjectNotFoundException {
- logger.logFiner("Tx " + txId + " deletes " + loadPath);
+ if (logger.isFinerEnabled()) {
+ logger.logFiner("Tx " + txId + " deletes " + loadPath);
+ }
if (txId == null) {
store.throwInternalError("Not inside tx");
}
@@ -168,7 +174,9 @@
* @throws ObjectNotFoundException if the descriptor does not exist
*/
public void load() throws ServiceAccessException,
ObjectNotFoundException {
- logger.logFiner("Tx " + txId + " loads data for " + loadPath);
+ if (logger.isFinerEnabled()) {
+ logger.logFiner("Tx " + txId + " loads data for " + loadPath);
+ }
InputStream is = null;
try {
@@ -180,7 +188,9 @@
init();
}
} else {
- logger.logFinest("Faking read access from outside tx for " +
loadPath);
+ if (logger.isFinestEnabled()) {
+ logger.logFinest("Faking read access from outside tx for
" + loadPath);
+ }
if (rm.resourceExists(loadPath)) {
is = rm.readResource(loadPath);
load(is);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]