You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by João Jandre Paraquetti <jo...@scclouds.com.br> on 2024/02/02 13:51:04 UTC

Regarding the Log4j upgrade

Hi all,

As some of you might already be aware, ACS version 4.20 will bring our 
logging library, log4j, from version 1.2 to 2.19. This change will bring 
us a number of benefits, such as:

   * Async Loggers - performance similar to logging switched off
   * Custom log levels
   * Automatically reload its configuration upon modification without
     loosing log events during reconfigurations.
   * Java 8-style lambda support for lazy logging (which enables methods
     to be executed only when necessary, i.e.: the right log level)
   * Log4j 2 is garbage-free (or at least low-garbage) since version 2.6
   * Plugin Architecture - easy to extend by building custom components
   * Log4j 2 API supports more than just logging Strings: CharSequences,
     Objects and custom Messages. Messages allow support for interesting
     and complex constructs to be passed through the logging system and
     be efficiently manipulated. Users are free to create their own
     Message types and write custom Layouts, Filters and Lookups to
     manipulate them.
   * Concurrency improvements: log4j2 uses java.util.concurrent libraries
     to perform locking at the lowest level possible. Log4j-1.x has known
     deadlock issues.
   * Configuration via XML, JSON, YAML, properties configuration files or
     programmatically.


Regarding the upgrade:

* To our devs:

     We are planning on merging #7131 as soon as 4.19 is released, this 
way, we will have plenty of time to fix any other PRs that might break 
with this change. If you have any issues regarding log4j2 in your PRs 
after the PR is merged, feel free to ping me (@JoaoJandre) on GitHub and 
I'll try my best to help you. Also, for any doubts, it might be a good 
idea to check the log4j documentation: 
https://logging.apache.org/log4j/2.x/manual/index.html.

* To our users:

     For users that haven't tinkered with the default log 
configurations, this change should not bring any work to you, when 
installing ACS 4.20, your package manager should ask you if you want to 
upgrade your log4j configuration, please accept this, as the old 
configuration will not work anymore.

     For those who have made modifications to the default configuration, 
please take a look at this documentation: 
https://logging.apache.org/log4j/2.x/manual/migration.html#Log4j2ConfigurationFormat; 
it should help you migrate your custom configuration.

     In any case, if you have problems upgrading from 4.19 to 4.20, feel 
free to create a thread on the users list so that we can try to help 
you. I should remind you that 4.20 will only be launched in the end of 
Q2/start of Q3, so you'll have plenty of time to review what needs to be 
done regarding the log4j2 configuration.

Best regards,
João Jandre.


Re: Regarding the Log4j upgrade

Posted by Guto Veronezi <gu...@apache.org>.
Hello guys

We finally merged PR #7131 [1]. With that, other PRs targeted to the 
branch "main" might get the conflict status. The PR #7131 [1] 
description contains instructions on how to fix the conflicts; however, 
if you have any doubts, do not hesitate to contact us. For those who 
have PRs targeted to the "main" and did not get the conflict status, we 
recommend merging the "main" and running the build, as for some cases 
git will not point out a conflict (e.g.: when the declaration is removed 
in order to inherit from the super class and the name of the logger 
instances are different).

Thank you to everyone involved, and if you have any doubt or problem, 
just contact us.

Best regards,
Daniel Salvador (gutoveronezi)

[1]: https://github.com/apache/cloudstack/pull/7131


On 2/2/24 10:51, João Jandre Paraquetti wrote:
> Hi all,
>
> As some of you might already be aware, ACS version 4.20 will bring our 
> logging library, log4j, from version 1.2 to 2.19. This change will 
> bring us a number of benefits, such as:
>
>   * Async Loggers - performance similar to logging switched off
>   * Custom log levels
>   * Automatically reload its configuration upon modification without
>     loosing log events during reconfigurations.
>   * Java 8-style lambda support for lazy logging (which enables methods
>     to be executed only when necessary, i.e.: the right log level)
>   * Log4j 2 is garbage-free (or at least low-garbage) since version 2.6
>   * Plugin Architecture - easy to extend by building custom components
>   * Log4j 2 API supports more than just logging Strings: CharSequences,
>     Objects and custom Messages. Messages allow support for interesting
>     and complex constructs to be passed through the logging system and
>     be efficiently manipulated. Users are free to create their own
>     Message types and write custom Layouts, Filters and Lookups to
>     manipulate them.
>   * Concurrency improvements: log4j2 uses java.util.concurrent libraries
>     to perform locking at the lowest level possible. Log4j-1.x has known
>     deadlock issues.
>   * Configuration via XML, JSON, YAML, properties configuration files or
>     programmatically.
>
>
> Regarding the upgrade:
>
> * To our devs:
>
>     We are planning on merging #7131 as soon as 4.19 is released, this 
> way, we will have plenty of time to fix any other PRs that might break 
> with this change. If you have any issues regarding log4j2 in your PRs 
> after the PR is merged, feel free to ping me (@JoaoJandre) on GitHub 
> and I'll try my best to help you. Also, for any doubts, it might be a 
> good idea to check the log4j documentation: 
> https://logging.apache.org/log4j/2.x/manual/index.html.
>
> * To our users:
>
>     For users that haven't tinkered with the default log 
> configurations, this change should not bring any work to you, when 
> installing ACS 4.20, your package manager should ask you if you want 
> to upgrade your log4j configuration, please accept this, as the old 
> configuration will not work anymore.
>
>     For those who have made modifications to the default 
> configuration, please take a look at this documentation: 
> https://logging.apache.org/log4j/2.x/manual/migration.html#Log4j2ConfigurationFormat; 
> it should help you migrate your custom configuration.
>
>     In any case, if you have problems upgrading from 4.19 to 4.20, 
> feel free to create a thread on the users list so that we can try to 
> help you. I should remind you that 4.20 will only be launched in the 
> end of Q2/start of Q3, so you'll have plenty of time to review what 
> needs to be done regarding the log4j2 configuration.
>
> Best regards,
> João Jandre.
>

Re: Regarding the Log4j upgrade

Posted by Guto Veronezi <gu...@apache.org>.
Hello guys

We finally merged PR #7131 [1]. With that, other PRs targeted to the 
branch "main" might get the conflict status. The PR #7131 [1] 
description contains instructions on how to fix the conflicts; however, 
if you have any doubts, do not hesitate to contact us. For those who 
have PRs targeted to the "main" and did not get the conflict status, we 
recommend merging the "main" and running the build, as for some cases 
git will not point out a conflict (e.g.: when the declaration is removed 
in order to inherit from the super class and the name of the logger 
instances are different).

Thank you to everyone involved, and if you have any doubt or problem, 
just contact us.

Best regards,
Daniel Salvador (gutoveronezi)

[1]: https://github.com/apache/cloudstack/pull/7131


On 2/2/24 10:51, João Jandre Paraquetti wrote:
> Hi all,
>
> As some of you might already be aware, ACS version 4.20 will bring our 
> logging library, log4j, from version 1.2 to 2.19. This change will 
> bring us a number of benefits, such as:
>
>   * Async Loggers - performance similar to logging switched off
>   * Custom log levels
>   * Automatically reload its configuration upon modification without
>     loosing log events during reconfigurations.
>   * Java 8-style lambda support for lazy logging (which enables methods
>     to be executed only when necessary, i.e.: the right log level)
>   * Log4j 2 is garbage-free (or at least low-garbage) since version 2.6
>   * Plugin Architecture - easy to extend by building custom components
>   * Log4j 2 API supports more than just logging Strings: CharSequences,
>     Objects and custom Messages. Messages allow support for interesting
>     and complex constructs to be passed through the logging system and
>     be efficiently manipulated. Users are free to create their own
>     Message types and write custom Layouts, Filters and Lookups to
>     manipulate them.
>   * Concurrency improvements: log4j2 uses java.util.concurrent libraries
>     to perform locking at the lowest level possible. Log4j-1.x has known
>     deadlock issues.
>   * Configuration via XML, JSON, YAML, properties configuration files or
>     programmatically.
>
>
> Regarding the upgrade:
>
> * To our devs:
>
>     We are planning on merging #7131 as soon as 4.19 is released, this 
> way, we will have plenty of time to fix any other PRs that might break 
> with this change. If you have any issues regarding log4j2 in your PRs 
> after the PR is merged, feel free to ping me (@JoaoJandre) on GitHub 
> and I'll try my best to help you. Also, for any doubts, it might be a 
> good idea to check the log4j documentation: 
> https://logging.apache.org/log4j/2.x/manual/index.html.
>
> * To our users:
>
>     For users that haven't tinkered with the default log 
> configurations, this change should not bring any work to you, when 
> installing ACS 4.20, your package manager should ask you if you want 
> to upgrade your log4j configuration, please accept this, as the old 
> configuration will not work anymore.
>
>     For those who have made modifications to the default 
> configuration, please take a look at this documentation: 
> https://logging.apache.org/log4j/2.x/manual/migration.html#Log4j2ConfigurationFormat; 
> it should help you migrate your custom configuration.
>
>     In any case, if you have problems upgrading from 4.19 to 4.20, 
> feel free to create a thread on the users list so that we can try to 
> help you. I should remind you that 4.20 will only be launched in the 
> end of Q2/start of Q3, so you'll have plenty of time to review what 
> needs to be done regarding the log4j2 configuration.
>
> Best regards,
> João Jandre.
>