You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by mt...@apache.org on 2007/03/04 17:22:11 UTC
svn commit: r514443 -
/incubator/xap/trunk/codebase/src/xap/util/ResourceDictionary.js
Author: mturyn
Date: Sun Mar 4 09:22:10 2007
New Revision: 514443
URL: http://svn.apache.org/viewvc?view=rev&rev=514443
Log:
Moved logger creation to the sole place where we would need it in order to avoid a cyclic dependency.
See http://issues.apache.org/jira/browse/XAP-320 .
Modified:
incubator/xap/trunk/codebase/src/xap/util/ResourceDictionary.js
Modified: incubator/xap/trunk/codebase/src/xap/util/ResourceDictionary.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/util/ResourceDictionary.js?view=diff&rev=514443&r1=514442&r2=514443
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/util/ResourceDictionary.js (original)
+++ incubator/xap/trunk/codebase/src/xap/util/ResourceDictionary.js Sun Mar 4 09:22:10 2007
@@ -39,7 +39,8 @@
// Class Variables.
//-------------------------------------------------------------------
xap.util.ResourceDictionary.s_classnameToResourceObject = new xap.util.Hashtable();
-xap.util.ResourceDictionary.s_log = xap.log.Logger.getLogger( "xap.util.ResourceDictionary" );
+// Set this later to avoid cyclic dependency on Logger/XapException:
+xap.util.ResourceDictionary.s_log = null ;
//-------------------------------------------------------------------
// Public Class Methods.
@@ -53,6 +54,10 @@
resourceObject = eval ( "new " + className + "Res();" );
xap.util.ResourceDictionary.s_classnameToResourceObject.put( className, resourceObject );
} catch ( e ){
+ if( ! xap.util.ResourceDictionary.s_log ){
+ xap.util.ResourceDictionary.s_log
+ = xap.log.Logger.getLogger( "xap.util.ResourceDictionary" );
+ }
xap.util.ResourceDictionary.s_log.error( "Exception getting message:" +
"id=" + msgId + ",classname=" + className +
", args:" + args + ", exception:" + e , e);