Author Topic: addp settings and its logging  (Read 8152 times)

minoru

  • Guest
addp settings and its logging
« on: August 14, 2007, 04:07:37 AM »
Hi!

I can't figure out how to show addp logging in using platform SDK.

Here is how I set it up:

PropertyConfiguration propertyCfg = new PropertyConfiguration();
    propertyCfg.SetOption("protocol", "addp");
    propertyCfg.SetOption("addp-timeout", "5");
    propertyCfg.SetOption("addp-remote-timeout", "10");
    propertyCfg.SetOption("addp-trace", "both");

    tserverProtocol.Configuration = propertyCfg; 
    tserverProtocol.Open();

I see addp trace in T-server logs, but what do I need to do to see addp trace inside my program?
I heard that there is a Log property for tserverProtocol object, but I cannot find it. tserverProtocol.Log does not exist! :-\

Where is .Log property and how do I use it?

M.

Offline victor

  • Administrator
  • Hero Member
  • *****
  • Posts: 1416
  • Karma: 18
Re: addp settings and its logging
« Reply #1 on: August 16, 2007, 07:45:41 AM »
  • Best Answer
  • Hi, Minoru,

    as far as I know, there is no way to log addp trace in Java SDK 7.2 . I am praying they will add it in later releases of 7.5.xxxx .


    What I do find bewildering is that what is the point of addp's "number-attempts" and "reconnect-timeout", if addp's timeout forces SDK protocol to issue a disconnect and it is up to a client to try to reconnect.

    How does addp-reconnect, number-attempts work in Java SDK?

    Offline bublepaw

    • Sr. Member
    • ****
    • Posts: 283
    • Karma: 10
    Re: addp settings and its logging
    « Reply #2 on: August 16, 2007, 08:03:54 AM »
  • Best Answer
  • Hi, Minoru,

    There is method called EnableLogging(ILogger). Using this method You can have access to interal library logging. I've checked it - there 2 messages for addp:

    Addp packet received: p
    Addp packet received: P

    I hope it helps. ( I've checked in .Net 7.2 SDK so it should work in 7.5 )

    Paul

    Offline bublepaw

    • Sr. Member
    • ****
    • Posts: 283
    • Karma: 10
    Re: addp settings and its logging
    « Reply #3 on: August 16, 2007, 10:18:52 AM »
  • Best Answer
  • Hi,

    I little update - in 7.5 ILogger interface was changed and message about addp additionaly contains server address and port.

    Paul

    Offline victor

    • Administrator
    • Hero Member
    • *****
    • Posts: 1416
    • Karma: 18
    Re: addp settings and its logging
    « Reply #4 on: September 03, 2007, 06:47:12 AM »
  • Best Answer
  • [quote author=bublepaw link=topic=2413.msg9077#msg9077 date=1187251434]
    Hi, Minoru,

    There is method called EnableLogging(ILogger). Using this method You can have access to interal library logging. I've checked it - there 2 messages for addp:

    Addp packet received: p
    Addp packet received: P

    I hope it helps. ( I've checked in .Net 7.2 SDK so it should work in 7.5 )

    Paul
    [/quote]

    Bubblepaw,

    Judging by Minoru's code, it seems to be Java.  I could bet there was no such a function for Platform SDK for Java in 7.2!  :-\