<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I've completed a first stab at this using the JBoss logging tools.
Once merged we will have the ability to do i18n/l10n on our log
messages and also use message numbers.<br>
<br>
Here is the commit to show you how it turns out converting the log
messages in KeycloakApplication:<br>
<a class="moz-txt-link-freetext" href="https://github.com/ssilvert/keycloak/commit/54faba37cb4797fc337569899d8ac8eaa7f0ad1a#diff-72ce0a0a72ebd57f8627c059f7f1ea03R1">https://github.com/ssilvert/keycloak/commit/54faba37cb4797fc337569899d8ac8eaa7f0ad1a#diff-72ce0a0a72ebd57f8627c059f7f1ea03R1</a><br>
<br>
So, now a message coming from the KeycloakApplication class in the
services module looks like this:<br>
<br>
15:29:31,515 INFO [<b>org.keycloak.services</b>] (ServerService
Thread Pool -- 50)<b> KC-SERVICES0001</b>: Loading config from
c:\GitHub\keycloak\distribution\server-dist\target\keycloak-1.9.0.CR1-SNAPSHOT\standalone\configuration\keycloak-server.json<br>
<br>
We need to decide how we want to structure this. In WildFly, we
typically have one logger per maven module. If you want to have one
logger per package then you would need to create a new interface in
each package, which gets hairy.<br>
<br>
I do suggest that we prefix all of our messages with "KC-" or
something else that is unique across products. Also, we should
standardize the "padding" for the message numbers.<br>
<br>
Another possibility is to have all keycloak messages start with
"KEYCLOAK". This would mean that we would need for each module to
reserve a number range. There are annotations to enforce this if we
want to go that route. The downside is that somewhere we need to
maintain a registry. I think WildFly did this but eventually
abandoned it. Notice that WildFly messages are like "WFLYUT" for
Undertow or "WFLYJSF" for JSF.<br>
<br>
BTW, localization works nicely. Just add a bundle for a new
language. The tool even creates a skeleton properties file for you.<br>
<br>
If you want more details on the i18n framework, see
<a class="moz-txt-link-freetext" href="https://developer.jboss.org/wiki/JBossLoggingTooling">https://developer.jboss.org/wiki/JBossLoggingTooling</a>.<br>
<br>
Stan<br>
</body>
</html>