I would love this feature. I like the way Eclipse allows you to do this. Copied from the Java->Appearance tab of Eclipse preferences:

"Compression pattern (e.g givin a package name 'org.eclipse.jdt' pattern '.' will compress it to '..jdt' '0' to 'jdt', '1~' to 'o~.e~jdt')"

We should probably have different pattern specificier chars, and keep the exitsing syntax and meaning.

cheers,

Paul

Curt Arnold wrote:

I wanted to get opinions on adding support in the pattern layout for abbreviated forms of the logger and class names. Fully qualified class names and logger names typically are fairly long and could be usually be radically abbreviated with little loss of information. For example, a logger name of "com.example.foobar.Widget" could be abbreviated "c.e.f.Widget".

The current options for shortening the names are use of a width specifier. for example, "%10c" which result in "com.exampl" and path element count, for example, "$c{2}" which would result in "foobar.Widget".

There are a couple of approaches:

a) use abbreviation instead of truncation to meet width specifier. "%10c" of "%10logger" would result in "c.e.f.Wdgt". Names shorter than the width specifier would be fully expressed.

b) Add a "%shortlogger" (and shortclass) conversion specifier to complement the existing and equivalent "%logger" and "%c" specifier. %shortlogger would always abbreviate even if the logger name could fit in available width and width would still be right truncation.

c) Abbreviate output of "%logger" and %class and add "%fulllogger" and "%fullclass" to be equivalent with existing specifiers.

d) Add an additional parameter to the existing format specifiers to indicate abbreviation, for example, %c{2}{true}" might output "f.Widget".

Any other options, thoughts or preferences?



---------------------------------------------------------------------
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