public class AlmostAsIsEscapeUtil extends RestrictedEscapeUtil
FileNamePattern
.Constructor and Description |
---|
AlmostAsIsEscapeUtil() |
Modifier and Type | Method and Description |
---|---|
void |
escape(java.lang.String escapeChars,
java.lang.StringBuffer buf,
char next,
int pointer)
Do not perform any character escaping, except for '%', and ')'.
|
public void escape(java.lang.String escapeChars, java.lang.StringBuffer buf, char next, int pointer)
Here is the rationale. First, filename patterns do not include escape combinations such as \r or \n. Moreover, characters which have special meaning in logback parsers, such as '{', or '}' cannot be part of file names (so me thinks). The left parenthesis character has special meaning only if it is preceded by %. Thus, the only characters that needs escaping are '%' and ')'.
Note that this method assumes that it is called after the escape character has been consumed.
escape
in interface IEscapeUtil
escape
in class RestrictedEscapeUtil
Copyright © 2010 - 2020 Adobe. All Rights Reserved