Results 1 to 6 of 6

Thread: Logging to a webservice via ILogNotify or a custom Module

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Logging to a webservice via ILogNotify or a custom Module

    I have a requirement to send log values to an internal webservice for reporting on bandwidth and other analytics. I've researched this on the forum and have found several threads about this, and it seems like there are 3 main ways to do this:
    1. Put the webservice call in the onLog method of a custom ILogNotify class
    2. Put the webservice call in the disconnect or SessionDestroy event in a custom module
    3. Log4j Appender (I've ruled this out for my scenario)

    So, first off, I noticed several warnings from you guys about calling a webservice for logging because of performance issues, but I'm hoping to solve those problems by doing the following:
    1. Only logging certain types of events to the webservice
    2. Calling the webservice asynchronously using an ExecutorService and a CachedThreadPool

    Ok, now to my questions:

    First question:
    From my research of old forum posts, it seemed like a custom ILogNotify class was the way to go, but I ran into the following issue. Along with all the other properties that get logged, I need to send a few extra things to the webservice, like the username of the user watching the video. I have a custom module that pulls a encrypted token off of the request URL and then extracts some information (like the username) from it, so I need to know how to make the username available to my ILogNotify code from my module. How can I do that?

    Second Question:
    Should I really be using an ILogNotify class for this? It seems like it would fit better in the onDisconnect or onHTTPSessionDestroy event within my existing module. I looked at doing it this way, but it's not clear to me how to get all the same values that are being logged from within the module. Can I get all the same values from within a module as the WMSLoggerFactory.getGlobalLogValue() exposes in the ILogNotify onLog() method?

    I would prefer to write this functionality into my module if possible. Please let me know what you think.

    Last edited by seanngreen; 02-11-2013 at 05:16 PM.

Similar Threads

  1. Logging custom module to a different file
    By maugzoide in forum General Forum
    Replies: 7
    Last Post: 10-03-2014, 10:52 AM
  2. Custom Logging
    By kenji24 in forum Tutorials
    Replies: 6
    Last Post: 03-28-2014, 07:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts