Re: [VOTE] Release Apache Log4j Tools 0.3.0

2023-03-17 Thread Volkan Yazıcı
Adding my +1.

With that, the release passes with 3 binding +1 votes from me, Piotr, and
Matt.

(I will address Gary's Windows-related issues either in the mailing list or
in Slack.)

On Tue, Mar 14, 2023 at 10:08 PM Volkan Yazıcı  wrote:

> The Apache Log4j Tools 0.3.0 release is now available for voting.
>
> This release contains the following minor enhancements:
>
> * Upgrade the compiler version to Java 17, yet still target Java 8
> * Support multiple and formatting-agnostic template files (#44)
> * The changelog release models passed to the index template file
> (`.index.adoc.ftl`) is enriched with `changelogEntryCount` fields
> (#37)
>
> Source repository: https://github.com/apache/logging-log4j-tools
> Tag: rel/0.3.0-rc.1
> Commit: 243017d3f60410780dd6d15b8b677bc5b018d1cf
> CI run:
> https://github.com/apache/logging-log4j-tools/actions/runs/4420103110
> Artifacts: https://dist.apache.org/repos/dist/dev/logging/log4j/
> Nexus repository:
> https://repository.apache.org/content/repositories/orgapachelogging-1100
> Signing key:
> https://keyserver.ubuntu.com/pks/lookup?search=077e8893a6dcc33dd4a4d5b256e73ba9a0b592d0&fingerprint=on&op=index
>
> Please download, test, and cast your votes on the Log4j developers list.
>
> [ ] +1, release the artifacts
> [ ] -1, don't release, because...
>
> The vote will remain open for 24 hours (or more if required). All
> votes are welcome and we encourage everyone to test the release, but
> only the Logging Services PMC votes are officially counted. At least 3
> +1 votes and more positive than negative votes are required.
>


Log4j2 replacement of PropertyConfigurator APIs configureAndWatch and configure

2023-03-17 Thread Viraj Jasani
Hi,

Could you please help with log4j2 replacement for PropertyConfigurator APIs
configureAndWatch and configure?

For instance, this is the logic we have that we need to migrate to log4j2:



  protected void initLog() throws ServerException {
verifyDir(logDir);
LogManager.resetConfiguration();
File log4jFile = new File(configDir, name + "-log4j.properties");
if (log4jFile.exists()) {
  PropertyConfigurator.configureAndWatch(log4jFile.toString(), 10 *
1000); //every 10 secs
  log = LoggerFactory.getLogger(Server.class);
} else {
  Properties props = new Properties();
  try {
InputStream is = getResource(DEFAULT_LOG4J_PROPERTIES);
try {
  props.load(is);
} finally {
  is.close();
}
  } catch (IOException ex) {
throw new ServerException(ServerException.ERROR.S03,
DEFAULT_LOG4J_PROPERTIES, ex.getMessage(), ex);
  }
  PropertyConfigurator.configure(props);
  log = LoggerFactory.getLogger(Server.class);
  log.warn("Log4j [{}] configuration file not found, using default
configuration from classpath", log4jFile);
}
  }