Long file names -- truncated?
Kevin Spicer
kevins at BMRB.CO.UK
Sat Sep 13 09:22:20 IST 2003
On Sat, 2003-09-13 at 03:25, Julian Field wrote:
>The syslog never goes to a user, so it is nowhere near as important.
>Also,
>to a fair extent that is your syslogd's problem and not mine. I have to
>draw the line somewhere. The real original filename might be useful to
>a
>site admin, I know I would be annoyed if there was *no* way of getting
>at
>the original real name.
Yes, but very long strings of text shouldn't be included in syslog
messages, because a syslog packet (not just the message text) should be
less than 1024 bytes (RFC3164 section 4.0). There is (AFAIK) no
provision for spanning a syslog message across two parts (presumably as
it uses UDP). I don't know whether the perl syslog API or various
syslog servers impose this limit, but even if they don't I'd point out
that making a message much longer is likely to exceed the MTU on some
systems, causing problems for those who log to a remote host.
Perhaps a happy compromise is to make the filename the last part of the
log entry then truncate to some sensible value (1024 - maximum length of
headers) before sending.
BMRB International
http://www.bmrb.co.uk
+44 (0)20 8566 5000
_________________________________________________________________
This message (and any attachment) is intended only for the
recipient and may contain confidential and/or privileged
material. If you have received this in error, please contact the
sender and delete this message immediately. Disclosure, copying
or other action taken in respect of this email or in
reliance on it is prohibited. BMRB International Limited
accepts no liability in relation to any personal emails, or
content of any email which does not directly relate to our
business.
More information about the MailScanner
mailing list