from the javadoc for java.util.Properties.load method (Which is used to read
a properties file)

Every line other than a blank line or a comment line describes one property
to be added to the table (except that if a line ends with \, then the
following line, if it exists, is treated as a continuation line, as
described below). The key consists of all the characters in the line
starting with the first non-whitespace character and up to, but not
including, the first ASCII =, :, or whitespace character. All of the key
termination characters may be included in the key by preceding them with a
\. Any whitespace after the key is skipped; if the first non-whitespace
character after the key is = or :, then it is ignored and any whitespace
characters after it are also skipped. All remaining characters on the line
become part of the associated element string. Within the element string, the
ASCII escape sequences \t, \n, \r, \\, \", \', \    (a backslash and a
space), and \\uxxxx are recognized and converted to single characters.
Moreover, if the last character on the line is \, then the next line is
treated as a continuation of the current line; the \ and line terminator are
simply discarded, and any leading whitespace characters on the continuation
line are also discarded and are not part of the element
string.

It looks like whitespace after the = is ignored.
I'm not sure, but you may be able to use \t instead of a real tab

Chris
-----Original Message-----
From: Otis Gospodnetic [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 16, 2001 12:11 PM
To: [EMAIL PROTECTED]
Subject: logging pattern with a leading tab


Hello,

I am trying to use a logging pattern that has tabs in it, so I am using the
following pattern:

log4j.appender.SERVERLOG.layout.ConversionPattern=      D=%d    T=%t    ML=%p   C=%c
M=%m%n

The problem is that I can't get the leading tab (the one between
'...ConversionPattern=' and 'D=') to work.
Instead of the leading tab in the log file I see 'D=....' At the beginning
of each log line.
All other tabs really are tabs in the log file.

Is this a bug?
Is there a workaround?

Thanks,

Otis



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to