Skip to content

Commit

Permalink
Removed references to apache commons logging (#7907)
Browse files Browse the repository at this point in the history
code-howtos and build.gradle still referenced apache commons, but slf4j
should be used instead.
CleanupUrlFormatter was the only class still using it, but never
actually used the logger, so it was removed.
  • Loading branch information
btut authored Jul 14, 2021
1 parent b6a287f commit 477118c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,6 @@ jlink {
provides 'org.mariadb.jdbc.credential.CredentialPlugin' with 'org.mariadb.jdbc.credential.aws.AwsIamCredentialPlugin',
'org.mariadb.jdbc.credential.env.EnvCredentialPlugin',
'org.mariadb.jdbc.credential.system.PropertiesCredentialPlugin'
provides 'org.apache.commons.logging.LogFactory' with 'org.apache.logging.log4j.jcl.LogFactoryImpl'
provides 'org.slf4j.spi.SLF4JServiceProvider' with 'org.apache.logging.slf4j.SLF4JServiceProvider'
provides 'org.apache.logging.log4j.spi.Provider' with 'org.apache.logging.log4j.core.impl.Log4jProvider'
provides 'java.security.Provider' with 'org.bouncycastle.jce.provider.BouncyCastleProvider',
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-into-the-code/code-howtos.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ JabRef uses the logging facade [SLF4j](https://www.slf4j.org/). All log messages
* Obtaining a logger for a class:

```java
private static final Log LOGGER = LogFactory.getLog(<ClassName>.class);
private static final Logger LOGGER = LoggerFactory.getLogger(<ClassName>.class);
```

* If the logging event is caused by an exception, please add the exception to the log message as:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@
import org.jabref.logic.cleanup.Formatter;
import org.jabref.logic.l10n.Localization;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
* Cleanup URL link
*/
public class CleanupUrlFormatter extends Formatter {

private static final Log LOGGER = LogFactory.getLog(CleanupUrlFormatter.class);
// This regexp find "url=" or "to=" parameter in full link and get text after them
private static final Pattern PATTERN_URL = Pattern.compile("(?:url|to)=([^&]*)");

Expand Down

0 comments on commit 477118c

Please sign in to comment.