Improve debugging output for invoking of initializer functions

Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/350b9064
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/350b9064
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/350b9064

Branch: refs/heads/5.4-js-rewrite
Commit: 350b906409b2f23969d54b5dd4430d9bcc4c6102
Parents: 7943c8f
Author: Howard M. Lewis Ship <[email protected]>
Authored: Wed Nov 7 09:41:57 2012 -0800
Committer: Howard M. Lewis Ship <[email protected]>
Committed: Wed Nov 7 09:41:57 2012 -0800

----------------------------------------------------------------------
 .../META-INF/modules/core/pageinit.coffee          |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/350b9064/tapestry-core/src/main/coffeescript/META-INF/modules/core/pageinit.coffee
----------------------------------------------------------------------
diff --git 
a/tapestry-core/src/main/coffeescript/META-INF/modules/core/pageinit.coffee 
b/tapestry-core/src/main/coffeescript/META-INF/modules/core/pageinit.coffee
index 1ad9de1..1a7cce1 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/core/pageinit.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/core/pageinit.coffee
@@ -96,7 +96,10 @@ define ["_", "core/console", "core/dom", "core/events"],
 
         fn = if functionName? then moduleLib[functionName] else moduleLib
 
-        console.debug "Invoking #{qualifiedName} with " + 
JSON.stringify(initArguments)
+        if console.debugEnabled
+          argsString = _.map(initArguments, JSON.stringify).join(", ")
+          console.debug "Invoking #{qualifiedName}(#{argsString})"
+
         fn.apply null, initArguments
 
 

Reply via email to