Projects tigase _server server-core Issues #1055
Some log entries doesn't correctly substitute variables (#1055)
Closed
wojciech.kapcia@tigase.net opened 5 years ago

Instead having variable value placeholder ({0}) is printed, eg:

2019-07-31 22:13:30.577 [in_5-c2s]         ClientConnectionManager.processCommand()  WARNING: Cant find sevice for STARTTLS command: {0}
wojciech.kapcia@tigase.net commented 5 years ago

Logger internally uses MessageFormat, which documentation says:

Within a String, a pair of single quotes can be used to quote any arbitrary characters except single quotes. For example, pattern string "'{0}'" represents string "{0}", not a FormatElement. A single quote itself must be represented by doubled single quotes '' throughout a String. For example, pattern string "'{''}'" is interpreted as a sequence of '{ (start of quoting and a left curly brace), '' (a single quote), and }' (a right curly brace and end of quoting), not '{' and '}' (quoted left and right curly braces): representing string "{'}", not "{}".

I was thinking about modifying our formatter to replace it on the fly, but performance penalty made no sense so I replaced all offending log entries manually.

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
Spent time
45m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#1055
Please wait...
Page is in error, reload to recover