Home Server

How Do I use Logwriter in Webtier

edited August 2006 in Server
Hello

I want to write some entries into the webtier's log file

How do I do this?

The report server component has a LogWriter property which

Cheers

Paul

Comments

  • edited August 2006

    Here is a simple example. The gWebLog is a global instance that you can use.
    The RequestID and SessinID are integer values - you can pass 0 if you do not
    have access to them.


    uses
    rsWebLog,

    gWebLog.WriteEvent('My custom message', weOther, myRequestID, mySessionID);

    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited August 2006
    Hi Nard

    Even though Verbose is true the only messages that are getting into the log
    file are those that occur after an exception?

    Cheers

    Paul

  • edited August 2006
    this has now started to work, although I have no idea why

    However, I create a new web request using rsWebTier.CreateWebRequest, and I
    dont get a sessionid or request id in the object returned

    What am I doing wrong?

    objWebRequest:=rsWebTier.CreateWebRequest(objParametersList,strContent);
    FSessionID:=objWebRequest.SessionID; This is blank
    FRequestID:=objWebRequest.RequestID;This is 0
    ............

    Result:=rsWebTier.ProcessWebRequest(objWebRequest);


  • edited August 2006

    - the WebTier.SessionExists(aRequest: TrsWebRequest): Boolean function can
    be called to determine whether a session exists for the request.

    - for an existing session, the SessionID is always passed as one of the HTTP
    query or content params

    - if the HTTP params do not include a SessionID, then one will be created
    and assigned when the request is processed by the web tier. Without a
    session, there will not be request id either. It is part of the session.




    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.