logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SCOTT FARQUHAR" <SCOTT.FARQU...@sydneywater.com.au>
Subject Antw: Re: PaternLayout: allign to the left don't work asexpected
Date Thu, 05 Apr 2001 01:38:43 GMT
the "-20" says to right pad with spaces if less than 20 characters

the".30" says to truncate from the left.

>From the documentation there seems to be no way to truncat from the right.  This would
be an easy change in the code if you wished to do it.

And I retract my statement about it being the useful part.  I use this for my class names,
and usually don't trim anything of importance.

If you make the change to the code, make sure you submit it as a patch. I'm sure that others
in future will have this problem.

Cheers,
Scott

PS - I have to apologise for the tone of my last email - it sounded rude, and that's not what
I had intended.

>>> Lohmann@hhla.de 04/04/01 07:09pm >>>
Scott,

This depends on needs. Nevertheless this I expected from no minus in the format string - right?

Regards
Frank-Olaf Lohmann


>>> "SCOTT FARQUHAR" <SCOTT.FARQUHAR@sydneywater.com.au> 03.04.2001  22.37
Uhr >>>
"truncated from the beginning"
ie
"beginning is truncated"

so if you start truncating from the beginning, you will end up with only the last characters
left, which IMHO is usually the most useful part.

>>> Lohmann@hhla.de 04/04/01 03:16am >>>
Hello all,

the following format string '%-20.30c' don't work as I understand that it should. If the string
is longer than 30 characters the last 30 chars are selected but I expect the first 30. 
Am I wrong? The javadoc says '... then truncated from the beginning.' this let some space
to misunderstand what is intended.

Kind regards
Frank-Olaf Lohmann



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org 
For additional commands, e-mail: log4j-user-help@jakarta.apache.org 



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org 
For additional commands, e-mail: log4j-user-help@jakarta.apache.org 



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org 
For additional commands, e-mail: log4j-user-help@jakarta.apache.org 



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message