Arno, if you care about "slowing" string concatenations (although concatenation 
will be executed *anyway*: Time+Sep+Msg), then we could do something like this:

FDateFormat, FTimeFormat, FDateTimeFormat: string;
procedure SetDateTimeFormat(df, tf: string);
  FDateFormat := df;
  FTimeFormat := tf;
  FDateTimeFormat := FDateFormat + FLogSep + FTimeFormat;


procedure SetLogSep(ls: char);
  FLogSep := ls;
  FDateTimeFormat := FDateFormat + FLogSep + FTimeFormat;

- two methods are used to implement independence between format strings and log 
sep. Or, we really could just set DateTimeFormat as single string, not taking 
care about a separator between date and time. But also you should do something 
with code for .NET, to make output configurable too.
I sent Francois my modification of unit, it of course isn't ideal, but it's 
something to start from. Also there is a check of CR/LF in the end of logged 
line, to avoid doubling of these characters when Msg already contains them (FTP 
server responses, for example).

Regards, Anton
To unsubscribe or change your settings for TWSocket mailing list
please goto
Visit our website at

Reply via email to