diff --git a/pom.xml b/pom.xml
index 302164d3..3fe6cbfc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,8 +21,8 @@
org.apache.logging.log4j
- log4j-core
- 2.14.1
+ log4j-api
+ 2.20.0
diff --git a/src/main/java/core/basesyntax/Counter.java b/src/main/java/core/basesyntax/Counter.java
index 4af46bd4..feb1ad7d 100644
--- a/src/main/java/core/basesyntax/Counter.java
+++ b/src/main/java/core/basesyntax/Counter.java
@@ -12,7 +12,7 @@ public Counter(int value) {
this.value = value;
}
- public void decreaseValue() {
+ public synchronized void decreaseValue() {
logger.info(String.format(MESSAGE,
"Before decrementing", Thread.currentThread().getName(), value));
value--;