🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #2619

Re: Indy 9 SysLogMessage Question....

#2619
From: Paul
Date: Thu, 16 Mar 2006 10:03
50 lines
2635 bytes
Hi,

Made a bit a mistake, I was trying to set the Hostname to the PC name, which 
isn't the same thing!  I was also having a problem passing the message 
string into my class method and it was getting lost/overwritten.

Client Code now looks like below, and seems to work ok.

By the way, the server side receives the data correctly, but the 
"PIDAvailable" seems to be false even though the "PID" has the correct data 
sent by the client.  What does PIDAvailable actually do; client and server 
end?  (just spotted your name in the change details in Indy10 source).

Thanks

Paul

**********************************

    TIdSysLogMessage * sl = new TIdSysLogMessage(NULL);

    // default data set by class constructor
    sl->Msg->Process = GetTaskName(); // from the application title
    sl->Msg->PIDAvailable = true;            // not sure what this does???
    sl->Msg->PID = GetTaskID();            // int dummy = 4096, for testing

    // run time data (parameters to class method)
    sl->TimeStamp = Now();
    sl->Msg->Content = message;
    sl->Severity = sv;
    sl->Facility = fc;

    // sl->Pri;            // this is set by setting "Severity and Facility"
    // sl->Peer;         // this is?
    // sl->Hostname  // is this machines IP address unless you want to 
change it?
    // sl->Version;    // is built in Indy (read only)

    ....
    IdSysLog->SendLogMessage( sl, false );
    ....



"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:441855bb@newsgroups.borland.com...
>
> What values are you actually assigning to the Hostname, Process, PID, and
> Content properties?
>
Technical Details
Message-ID: <441937f4$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44184a9c@newsgroups.borland.com> <441855bb@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,53d527dfd39dc90c
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Paul" <plmacca@clara.co.uk>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <44184a9c@newsgroups.borland.com> <441855bb@newsgroups.borland.com>
Subject: Re: Indy 9 SysLogMessage Question....
Date: Thu, 16 Mar 2006 10:03:41 -0000
Lines: 52
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 81.151.177.148
Message-ID: <441937f4$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1142503412 81.151.177.148 (16 Mar 2006 02:03:32 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail