Announcement

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

    Can I log the developer console to file?

    The SmartClient Developer Console is very powerful but I am trying to debug the real time behaviour of a complex system and I would like to be able to write its log messages to file in real time.

    Then I can use BareTail to display all my system logs at the same time and can see issues as they arise.

    * Is it possible to stream log messages to file in any way?

    If not,

    * is it possible to save the log messages to file? At the moment I have to copy and paste.

    James

    #2
    There's an (undocumented) API isc.Log.getMessages() which will get you the entire contents of the log as one big string.

    With some snooping around Log.js (look at addToMasterLog()) you could find a spot to pick up messages one at a time. However sending these to the server is going to introduce a delay, so if you just write them to the server log you're not actually going to see them in proper relative order with server-side logs. To do that, you'd need to synchronize clocks and sort by timestamps.

    Comment


      #3
      How do I use Log.js?

      This sounds really exciting. I could use Smartclient's very powerful logging system for several things;
      * detailed debugging across JavaScript Client and server
      * A/B testing - which implementation works better?
      * goal tracking - where do users fall out of a process?


      This replaces systems like Google Analytics (web) and Flurry (mobile).

      I have found Log.js in a directory called "source". This is not part of the deployed SmartClient library.

      How do you recommend I use "Log.js" to achieve server-side logging?

      Comment


        #4
        We've explained how to get the log messages as a String - now if you want to save this String somewhere on the server, you would just use the general facilities of DataSource, RPCManager etc to do so.

        You could, for instance, save the full log as a DataSource Record along with other data (current userId, etc) whenever some unusual condition arises.

        Comment

        Working...
        X