Skip to main content
Participating Frequently
October 9, 2009
Question

user information logging / extend access.log

  • October 9, 2009
  • 2 replies
  • 1199 views

Hi!

is it possible to extend the access.log file? I want to pass user information via the connect method to the application and want to include this data in the access.log file.

Is this possible?

    This topic has been closed for replies.

    2 replies

    Participant
    July 27, 2010

    Hi,

    As you have explained we can add string at the time of connect, but what if we want to add some custom string after that. If I am playing a video and I want to append some string every time when that video is played, which is in some way useful to me in analyzing FMS log, then is there anything provided or some function in which we can just pass the string as an input argument that appends it into the log.

    Thank you.

    Participating Frequently
    July 27, 2010

    Sehr geehrte Damen und Herren,

    ich bin ab 26.07 auf Urlaub. Danach befinden wir uns bis zum 13.08.2010 auf Betriebsurlaub.

    In dringenden Angelegenheiten wenden Sie sich bitte an meine Kollegen (kundenservice@parkside.at).

    Mit freundlichen Grüßen

    Thomas Friedl

    November 13, 2009

    It's not clear what kind of user info you want to log in access.log. One way is to pass some info in query string while you connect to the server, as in

    var info:string = getInfo();//gets the info u want

    nc.connect("rtmp://yourserver/your app?" +info);

    then you can change logger.xml in conf directory where in in the tag fields inside access append cs-uri-query separated by semi-colon.

    as in

    <access>

         <Fields> x-category;x-event;date;......,cs-uri-query<Fields>

    </access>

    Save the file and restart the server.

    This will log the query string with each access event. You can also check all the fields you can use in the comments in the logger.xml to see if some field exactly meets your requirement. In that case just change logger.xml and restart the server and you won't need appending the query string. Some fields related to user are

    <!--   21. cs-uri-query     query portion of s-uri                          -->
          <!--   22. c-referrer       uri of the referrer                             -->
          <!--   23. c-user-agent     user agent                                      -->
          <!--   24. c-client-id      client id                                       -->