What can be the issue for this ?
On Tue, May 19, 2015 at 6:01 PM, Chathura Priyankara <
[email protected]> wrote:
> Hi all,
>
> I created following simple converter to append @ sign in to a log record,
>
> @Plugin(name="AtSignPatternConverter", category = "Converter")
> @ConverterKeys({"@"})
> public class AtSignPatternConverter extends LogEventPatternConverter{
>
> protected AtSignPatternConverter(String name, String style) {
> super(name, style);
> }
>
> public static AtSignPatternConverter newInstance(String[] options){
> return new AtSignPatternConverter("@","@");
> }
>
> @Override
> public void format(LogEvent event, StringBuilder toAppendTo) {
> toAppendTo.append("@");
> }
> }
>
> However when I'm using %@ for conversion pattern. I'm getting following
> exception.
>
> 2015-05-19 17:53:55,301 ERROR Unrecognized format specifier []
> 2015-05-19 17:53:55,302 ERROR Empty conversion specifier starting at
> position 7 in conversion pattern.
>
> (There are other some converters which are working fine in the same
> package with this)
>
> In log4j2 is it not allowed create converter for this symbol ?
> can anyone please explain me why this is happening ?
>
> Thanks,
> Any help is highly appreciated.
>
> --
> Chathura Priyankara,
> Faculty of Information Technology,
> University of Moratuwa.
>
--
Chathura Priyankara,
Faculty of Information Technology,
University of Moratuwa.
Blog : www.codeoncloud.blogspot.com