On Tue, 23 Oct 2018 at 10:31, Andrea Aime <andrea.a...@geo-solutions.it>
wrote:

> Hi,
> months ago Jody wrote a proposal to upgrade Log4j to the latest version
> (2.x), the proposal is still here
> but has had little discussion and no voting:
> https://github.com/geoserver/geoserver/wiki/GSIP-167
>
> Upgrading log4j has little problems code wise, the API is a bit different,
> but not so much, and it affects
> only projects using it directly, that is, geowebcache and maybe geofence.
> It is also supposed to be faster
> and have more options, like asynch logging, so I'd be personally happy to
> see it happening.
>
> The main issue with the upgrade is that log4j 2 is a complete rewrite and
> it uses a rather different configuration
> syntax, which means, we'll have to change how logging is configured in the
> data directory.
>
> Currently log4j2 supports different configuration syntaxes:
>
>    - XML:
>    https://logging.apache.org/log4j/2.x/manual/configuration.html#XML
>    - JSON:
>    https://logging.apache.org/log4j/2.x/manual/configuration.html#JSON
>    - YAML:
>    https://logging.apache.org/log4j/2.x/manual/configuration.html#YAML
>    - Properties:
>    https://logging.apache.org/log4j/2.x/manual/configuration.html#Properties
>
> The properties syntax is not the same as log4j 1.x and there is no
> facility to migrate from the old config files,
> here we'll have to make a backwards incompatible change.
>
> Now, which config syntax to use for the new system?
> There is a debate on gitter, so far with two camps:
>
>    - Kevin dislikes properties and would like to use YAML
>    - Ian would prefer properties over YAML.
>
>
To be clearer I actually said XML, properties over json, yaml (with a real
dislike of the last 2 as they aren't native to java).

>
>    - I just hate YAML in a most irrational, from the bones out, complete
>    way, and will take anything but it, with a preference for property files
>
> Migration wise, I believe the easiest thing would be to have a different
> log configuration directory, e.g., from "logs" to "logging" (to match the
> config file
> that controls the logging configuration), and if empty or missing, we'd
> fill it with the config files form the WAR, like we do today.
> Using a different folder I also hope we'd be free to accept whatever
> config syntax (to be verified) with no conflicts and the discussion
> about would be limited to what we use for the default config file samples.
>
>
That sounds like the best plan, is it possible to let users pick and chose
the format they use if we provide a default in one or the other?

Ian
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to