From e11b753da59ea89db2a1fc419b0297ff358e9bc8 Mon Sep 17 00:00:00 2001 From: Pinaki Poddar Date: Fri, 27 Feb 2009 18:12:20 +0000 Subject: [PATCH] OPENJPA-924: Add localized statements for logging git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@748625 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/openjpa/jdbc/kernel/FinderCacheImpl.java | 3 ++- .../org/apache/openjpa/jdbc/kernel/localizer.properties | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/FinderCacheImpl.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/FinderCacheImpl.java index 8afc463ad..251514ed4 100644 --- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/FinderCacheImpl.java +++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/FinderCacheImpl.java @@ -174,7 +174,8 @@ public class FinderCacheImpl if (finder != null) { _delegate.put(mapping, finder); if (_log != null && _log.isTraceEnabled()) - _log.trace(_loc.get("finder-cached", finder)); + _log.trace(_loc.get("finder-cached", mapping, + finder.getQueryString())); } else { if (_log != null && _log.isWarnEnabled()) _log.warn(_loc.get("finder-not-cachable", mapping)); diff --git a/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties b/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties index 88c9f92c5..8cdc8b5cd 100644 --- a/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties +++ b/openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/kernel/localizer.properties @@ -135,4 +135,8 @@ uparam-no-pos: User parameter "{0}" does not appear in any position in the \ uparam-pc-key: Class "{0}" uses {1} primary key columns but corresponding \ positions {2} in the parameter list of the prepared query is not compatible. uparam-missing: Parameter {0} in SQL Query "{1}" is not given a value. The \ - parameters given is "{2}". \ No newline at end of file + parameters given is "{2}". +finder-cached: Cached finder for "{0}" SQL: "{1}" +finder-not-cachable: Finder for "{0}" is not cachable. +finder-add-pattern: Exclusion pattern "{0}" for finder query has invalidated \ + {1} existing entries "{2}" \ No newline at end of file