Results 1 to 10 of 15

Hybrid View

  1. #1
    Member
    Join Date
    Sep 2007
    Location
    Chicago
    Posts
    20
    Perfect. I implemented it through the MD adapter and works great!

    Is there a way to log from the adapter? It will be great to log the user sessions through 'notifyUser'. I can add a logger but not sure where it will write the logs to? (Lightstreamer.log?)

  2. #2
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    1,092
    I'm not sure I understand your logging needs. If you need to log each new session and the related user, then you can do it only in "notifyNewSession", as "notifyUser" is called before session creation.
    Admittedly, the Server log lacks this item; while each session name is logged by the Server at session creation (even in the default logging configuration), the related user name is not logged and can only be inferred by nearby log lines.

    As far as we know, log4j support is a singleton and (as the Adapter is loaded by the Server in the Server's own ClassLoader) all logging configuration in "lightstreamer_log_conf.xml" is available to Adapter code. You can log on the Server loggers; in this case, your log will share the appenders of the Server log (the console and Lightstreamer.log).
    Otherwise (and preferably) you can add and configure your own loggers/categories and appenders; if you inherit from "LightstreamerLogger", you can still share the appenders of the Server log. You can extend "lightstreamer_log_conf.xml" or even load your own configuration file, which will be merged with the Server one. In the latter case, in order to avoid conflicts, just leave the "root" element configuration empty.

    Dario

 

 

Similar Threads

  1. Replies: 1
    Last Post: July 10th, 2012, 06:06 PM
  2. Replies: 7
    Last Post: June 7th, 2010, 09:38 AM
  3. Replies: 3
    Last Post: February 18th, 2010, 11:14 PM
  4. Replies: 1
    Last Post: September 18th, 2009, 09:13 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 02:52 AM.