Thread View: borland.public.cppbuilder.internet.socket
5 messages
5 total messages
Started by Paul
Wed, 15 Mar 2006 17:10
Indy 9 SysLogMessage Question....
Author: Paul
Date: Wed, 15 Mar 2006 17:10
Date: Wed, 15 Mar 2006 17:10
27 lines
1658 bytes
1658 bytes
Hi,
I'm trying to work out how to fill in the TIdSysLogMessage from the client
end. Is the following correct as I don't seem to be able to get the
Process, PID, and Msg Content to appear on the server?
Paul
------------------
TIdSysLogMessage * sl = new TIdSysLogMessage(NULL);
// default data set by class constructor
sl->Hostname = GetMyHost();
sl->Msg->Process = GetName();
sl->Msg->PID = GetID();
sl->Msg->PIDAvailable = true;
// run time data
sl->TimeStamp = Now();
sl->Msg->Content = msg->str;
sl->Severity = msg->severity;
sl->Facility = msg->facility;
// sl->Pri; // this is set by setting "Severity and Facility"
// sl->Peer; // this is....?
// sl->Version; // is built in Indy (read only)
Re: Indy 9 SysLogMessage Question....
Author: Remy Lebeau (TeamB)
Date: Wed, 15 Mar 2006 17:59
Date: Wed, 15 Mar 2006 17:59
17 lines
1359 bytes
1359 bytes
"Paul" <plmacca@clara.co.uk> wrote in message news:44184a9c@newsgroups.borland.com... > I don't seem to be able to get the Process, PID, and Msg Content to appear on the server? Are you calling the TIdSysLogMessage.SendToHost() method? What values are you actually assigning to the Hostname, Process, PID, and Content properties? What value is returned by the TIdSysMessage.EncodeMessage() method? That is the same data that SendToHost() actually sends. Gambit
Re: Indy 9 SysLogMessage Question....
Author: Paul
Date: Thu, 16 Mar 2006 10:03
Date: Thu, 16 Mar 2006 10:03
50 lines
2635 bytes
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?
>
Re: Indy 9 SysLogMessage Question....
Author: Remy Lebeau (TeamB)
Date: Thu, 16 Mar 2006 11:56
Date: Thu, 16 Mar 2006 11:56
23 lines
1694 bytes
1694 bytes
"Paul" <plmacca@clara.co.uk> wrote in message news:441937f4$1@newsgroups.borland.com... > 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. That is because the TIdSysLogMsgPart.Text property does not do any parsing when a new value is assigned to it. I have just re-written TIdSysLogMessage to do more complete parsing. I will check in the new code sometime during the next few days. > What does PIDAvailable actually do On the client side, it is used to format the PID property when encoding data for transmission. On the server side, it does not do anything. Gambit
Re: Indy 9 SysLogMessage Question....
Author: Paul
Date: Thu, 16 Mar 2006 19:03
Date: Thu, 16 Mar 2006 19:03
11 lines
1318 bytes
1318 bytes
Thanks Remy. "Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message news:4419520d$1@newsgroups.borland.com... > > On the client side, it is used to format the PID property when encoding > data > for transmission. > > On the server side, it does not do anything.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads