Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Logging to console?

    Hi,

    What are the available ways to log from the client? I've been trying to do things like SC.logWarn(), SC.echo(), and have been looking for the mentioned logDebug()/logInfo()/logWarn(), but no luck for some reason.

    The docs say:
    "The core log methods (logDebug(), logInfo(), logWarn()) and the "echo" facilities (echo() and echoAll()) are available on every Smart GWT component and Class."

    But I'm not finding them. :-(

    I don't have a preference whether the logging is to the dev console, or otherwise...just some logging that works.

    Thanks!

    #2
    try GWT.log()

    Comment


      #3
      Hmm, not seeing the output. Am I supposed to enable something? Is it actually the gwt-log package, and do I have to a "deferred command" initialization in the onModuleLoad() method (I saw mention of this in the gwt-log docs).

      As an aside, the GWT.log() asks for an exception. I note that the SC.logEcho() and similar also all take these extra parameters like a "javascript object" or a Canvas. My somewhat rhetorical question is: why do these all have extra params and not just a "logDebug(String)" signature?

      Anyhoo...thanks.

      Comment


        #4
        Ok, so I just found the output. :-) I passed a null for the 2nd paramter into the GWT.log(String,Throwable) call. Thanks for this...it'll help a lot.

        Anyone know if/how to write into the SmartGWT debug console? That'd be nice, too.

        Thanks.

        Comment


          #5
          SC.logWarn() can take only a string, nothing else.

          Comment

          Working...
          X