Skip to content

Commit

Permalink
upgrade log4j
Browse files Browse the repository at this point in the history
  • Loading branch information
kwarunek committed Mar 5, 2024
1 parent 34b8472 commit 2771c41
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>net.iponweb.disthene</groupId>
<artifactId>disthene</artifactId>
<packaging>jar</packaging>
<version>1.4.0</version>
<version>1.5.0</version>
<name>disthene</name>
<url>http://maven.apache.org</url>
<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/net/iponweb/disthene/Disthene.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ public static void main(String[] args) throws MalformedURLException {

try {
CommandLine commandLine = parser.parse(options, args);
System.getProperties().setProperty("log4j.configuration", "file:" + commandLine.getOptionValue("l", DEFAULT_LOG_CONFIG_LOCATION));
logger = Logger.getLogger(Disthene.class);
System.getProperties().setProperty("log4j.configurationFile", "file:" + commandLine.getOptionValue("l", DEFAULT_LOG_CONFIG_LOCATION));
logger = LogManager.getLogger(Disthene.class);

new Disthene(commandLine.getOptionValue("c", DEFAULT_CONFIG_LOCATION),
commandLine.getOptionValue("b", DEFAULT_BLACKLIST_LOCATION),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

public class CarbonServer {
private static final int MAX_FRAME_LENGTH = 8192 ;
private Logger logger = Logger.getLogger(CarbonServer.class);
private static final Logger logger = LogManager.getLogger(CarbonServer.class);

private DistheneConfiguration configuration;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* @author Andrei Ivanov
*/
public class CarbonServerHandler extends ChannelInboundHandlerAdapter {
private Logger logger = Logger.getLogger(CarbonServerHandler.class);
private static final Logger logger = LogManager.getLogger(CarbonServerHandler.class);

private MBassador<DistheneEvent> bus;
private Rollup rollup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class AggregateService {
private static final int RATE = 10;
private volatile boolean shuttingDown = false;

private Logger logger = Logger.getLogger(AggregateService.class);
private static final Logger logger = LogManager.getLogger(AggregateService.class);

private MBassador<DistheneEvent> bus;
private DistheneConfiguration distheneConfiguration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class RollupService {
private static final int RATE = 60;
private volatile boolean shuttingDown = false;

private Logger logger = Logger.getLogger(RollupService.class);
private static final Logger logger = LogManager.getLogger(RollupService.class);

private MBassador<DistheneEvent> bus;
private DistheneConfiguration distheneConfiguration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class SumService {
private static final int RATE = 60;
private volatile boolean shuttingDown = false;

private Logger logger = Logger.getLogger(SumService.class);
private static final Logger logger = LogManager.getLogger(SumService.class);

private MBassador<DistheneEvent> bus;
private DistheneConfiguration distheneConfiguration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
public class IndexService {
private static final String SCHEDULER_NAME = "distheneIndexCacheExpire";

private Logger logger = Logger.getLogger(IndexService.class);
private static final Logger logger = LogManager.getLogger(IndexService.class);

private IndexConfiguration indexConfiguration;
private IndexThread indexThread;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* @author Andrei Ivanov
*/
public class IndexThread extends Thread {
private Logger logger = Logger.getLogger(IndexThread.class);
private static final Logger logger = LogManager.getLogger(IndexThread.class);
private OpenSearchClient client;
private String index;
private String type;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
public class StatsService implements StatsServiceMBean {
private static final String SCHEDULER_NAME = "distheneStatsFlusher";

private Logger logger = Logger.getLogger(StatsService.class);
private static final Logger logger = LogManager.getLogger(StatsService.class);

private StatsConfiguration statsConfiguration;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class BatchWriterThread extends WriterThread {
//todo: interval via config?
private static final long INTERVAL = 60_000;

private Logger logger = Logger.getLogger(BatchWriterThread.class);
private static final Logger logger = LogManager.getLogger(BatchWriterThread.class);

private int batchSize;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*/
@Listener(references = References.Strong)
public class CassandraService {
private Logger logger = Logger.getLogger(CassandraService.class);
private static final Logger logger = LogManager.getLogger(CassandraService.class);

private Cluster cluster;
private Session session;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @author Andrei Ivanov
*/
public class SingleWriterThread extends WriterThread {
private Logger logger = Logger.getLogger(SingleWriterThread.class);
private static final Logger logger = LogManager.getLogger(SingleWriterThread.class);

public SingleWriterThread(String name, MBassador<DistheneEvent> bus, Session session, PreparedStatement statement, Queue<Metric> metrics, Executor executor) {
super(name, bus, session, statement, metrics, executor);
Expand Down

0 comments on commit 2771c41

Please sign in to comment.