3 Replies Latest reply on Jul 23, 2014 12:18 AM by ryanrutan

    What is the best way to log action on jive app onto the node.js server?

    pawans

      Hi Ryan, Aron,

      Do jive apps / add-ons developed over jive-sdk have a feature to log stuff?

      I want to log all actions happening on an app to the jive-sdk node.js server.

      Right now I have exposed an end point in node.js. I do an ajax call to send random data / log to this node.js endpoint using osapi.http.post or connects api.

      Is there any better way to log data or send any data to node server (without expecting a response) other than the isual ajax calls?

        • Re: What is the best way to log action on jive app onto the node.js server?

          Have you tried adding this to your jiveclientconfiguration.json:

              "logLevel":"DEBUG",

          I'll have to go back and check if this will log incoming requests from routes that you add yourself, but it might. If not, it can certainly serve as a pattern of how to instrument this yourself.

            • Re: What is the best way to log action on jive app onto the node.js server?
              pawans

              Hi Mark Weitzel,

              Not sure if this is correct for my case(or may be I misunderstood jive app logging).

              Here's an example of what I am trying to do.

              When my app loads, the javascript is loaded at run time from node.js jive-sdk server.

              Lets say I have two simple buttons on the app.

              When I click one button, it triggers a jive javascript api call to get / post some date.

              The other button has more simpler logic, say it just does 2+2, period.

              Now these two events (a jive javascript api call and a random non-jive logic), I want to log that these events happened or may be there output on my jive-sdk node.js server (and not jive website's default sbs.log).

              Usually all i do on client side is a console.log which logs everything in a browser.

              In this case, do i have a special way to call some logger method (instead of console.log) and send the logs to node.js server?

               

              Or is the only way to have a node,js end point (independent of jive-sdk) and make ajax calls to log all such client actions ?