public class LoggingPatternFormatter extends Formatter
Sized element support justify pattern. {[+|-]<size>[:<maxPo>]}. '+' is left justify, '-' rigth justify, size the prefered size for the element if it is not bigger. If maxPos option is present blanc is not add if it go up to maxPos.
SubString
L'element SubString a les memes possibilites que le pattern justify, et permet en plus de suprimer une sous chaine, cela permet de supprimer le debut du nom d'une classe. Syntaxe : {*<substring>|[+|-]<size>[:<maxPos>]} {<substring>*|[+|-]<size>[:<maxPos>]} L'etoile represente le texte qui restera.
Modifier and Type | Class and Description |
---|---|
protected static class |
LoggingPatternFormatter.Argument |
protected static class |
LoggingPatternFormatter.ClassNameArgument |
protected static class |
LoggingPatternFormatter.DateArgument |
protected static class |
LoggingPatternFormatter.ExceptionArgument |
protected static class |
LoggingPatternFormatter.FreeMemoryArgument |
protected static class |
LoggingPatternFormatter.MessageArgument |
protected static class |
LoggingPatternFormatter.MethodNameArgument |
protected static class |
LoggingPatternFormatter.OctetArgument |
protected static class |
LoggingPatternFormatter.PriorityLevelArgument |
protected static class |
LoggingPatternFormatter.SizedArgument |
protected static class |
LoggingPatternFormatter.StringArgument |
protected static class |
LoggingPatternFormatter.SubStringArgument |
protected static class |
LoggingPatternFormatter.ThreadArgument |
protected static class |
LoggingPatternFormatter.TotalMemoryArgument |
Modifier and Type | Field and Description |
---|---|
protected HashMap<String,Class<?>> |
arguments |
protected ArrayList<LoggingPatternFormatter.Argument> |
compile |
protected String |
pattern |
Constructor and Description |
---|
LoggingPatternFormatter() |
Modifier and Type | Method and Description |
---|---|
protected void |
compilePattern(String pattern)
Genere a partir de la chaine la liste des objet Argument.
|
protected String[] |
findNextPattern(String s)
Recherche dans la chaine le prochaine pattern.
|
String |
format(LogRecord record)
Methode qui formate le record
|
protected void |
initArguments()
Si vous souhaitez ajouter des type d'argument
Surcharger cette methode et a la fin fait un super.initArguments()
|
protected LoggingPatternFormatter.Argument |
patternToArgument(String s)
Converti un pattern en un objet Argument
|
formatMessage, getHead, getTail
protected ArrayList<LoggingPatternFormatter.Argument> compile
protected String pattern
protected void initArguments()
protected void compilePattern(String pattern)
pattern
- FIXMEprotected String[] findNextPattern(String s)
s
- FIXMEprotected LoggingPatternFormatter.Argument patternToArgument(String s)
s
- FIXMECopyright © 2004–2020 CodeLutin. All rights reserved.