I want to truncate priority of the logging event(DEBUG, INFO, WARN, ERROR, FATAL) from the end(not from the beginning). I am using conversion patterns like Sev_%.10p Application= "MyApp" Text= %m%n But it truncate from BEGINNING & it give me last character(G, O, N, R, L). I want only first character(D, I, W, E, F) Thanks v much, Rakesh
You have to extend pattern layout, override the createPatternParser, and create a PatternParser and a PatternConverter. Here is one I have that prints the first letter as you asked, and also prints the first 3 letters of each package level making them smaller as well.
Greg Bishop, Senior Software Engineer
CESI, 12000 Research Dr. Orlando Florida
You’ll find me in my office. I’ll probably be drinking. And reading this tiny ad.