diff --git a/azure/src/main/java/ch/cyberduck/core/azure/AzureCopyFeature.java b/azure/src/main/java/ch/cyberduck/core/azure/AzureCopyFeature.java index f318817e5f1..86ffeceb430 100644 --- a/azure/src/main/java/ch/cyberduck/core/azure/AzureCopyFeature.java +++ b/azure/src/main/java/ch/cyberduck/core/azure/AzureCopyFeature.java @@ -29,7 +29,8 @@ import ch.cyberduck.core.preferences.HostPreferences; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.net.URI; import java.net.URISyntaxException; @@ -41,7 +42,7 @@ import com.microsoft.azure.storage.blob.CloudBlob; public class AzureCopyFeature implements Copy { - private static final Logger log = Logger.getLogger(AzureCopyFeature.class); + private static final Logger log = LogManager.getLogger(AzureCopyFeature.class); private final AzureSession session; diff --git a/azure/src/main/java/ch/cyberduck/core/azure/AzureReadFeature.java b/azure/src/main/java/ch/cyberduck/core/azure/AzureReadFeature.java index cf487f0f6b2..bec3237346f 100644 --- a/azure/src/main/java/ch/cyberduck/core/azure/AzureReadFeature.java +++ b/azure/src/main/java/ch/cyberduck/core/azure/AzureReadFeature.java @@ -33,7 +33,8 @@ import org.apache.commons.io.input.ProxyInputStream; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.exception.ExceptionUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; @@ -48,7 +49,7 @@ import com.microsoft.azure.storage.core.SR; public class AzureReadFeature implements Read { - private static final Logger log = Logger.getLogger(AzureReadFeature.class); + private static final Logger log = LogManager.getLogger(AzureReadFeature.class); private final AzureSession session; diff --git a/azure/src/main/java/ch/cyberduck/core/azure/AzureSession.java b/azure/src/main/java/ch/cyberduck/core/azure/AzureSession.java index bb2164817db..c7434874932 100644 --- a/azure/src/main/java/ch/cyberduck/core/azure/AzureSession.java +++ b/azure/src/main/java/ch/cyberduck/core/azure/AzureSession.java @@ -58,7 +58,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpHeaders; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.slf4j.LoggerFactory; import javax.net.ssl.HttpsURLConnection; @@ -77,7 +78,7 @@ import com.microsoft.azure.storage.blob.CloudBlobClient; public class AzureSession extends SSLSession { - private static final Logger log = Logger.getLogger(AzureSession.class); + private static final Logger log = LogManager.getLogger(AzureSession.class); private final OperationContext context = new OperationContext(); diff --git a/azure/src/main/java/ch/cyberduck/core/azure/AzureWriteFeature.java b/azure/src/main/java/ch/cyberduck/core/azure/AzureWriteFeature.java index bfc8605b6df..bd77590e343 100644 --- a/azure/src/main/java/ch/cyberduck/core/azure/AzureWriteFeature.java +++ b/azure/src/main/java/ch/cyberduck/core/azure/AzureWriteFeature.java @@ -41,7 +41,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.http.HttpHeaders; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.bouncycastle.util.encoders.Base64; import java.io.IOException; @@ -60,7 +61,7 @@ import com.microsoft.azure.storage.core.SR; public class AzureWriteFeature extends AppendWriteFeature implements Write { - private static final Logger log = Logger.getLogger(AzureWriteFeature.class); + private static final Logger log = LogManager.getLogger(AzureWriteFeature.class); private final AzureSession session; private final OperationContext context; diff --git a/backblaze/src/main/java/ch/cyberduck/core/b2/B2AuthorizedUrlProvider.java b/backblaze/src/main/java/ch/cyberduck/core/b2/B2AuthorizedUrlProvider.java index f6f22456cdc..b8949b71219 100644 --- a/backblaze/src/main/java/ch/cyberduck/core/b2/B2AuthorizedUrlProvider.java +++ b/backblaze/src/main/java/ch/cyberduck/core/b2/B2AuthorizedUrlProvider.java @@ -28,7 +28,8 @@ import ch.cyberduck.core.features.PromptUrlProvider; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.net.URI; @@ -39,7 +40,7 @@ import synapticloop.b2.exception.B2ApiException; public class B2AuthorizedUrlProvider implements PromptUrlProvider { - private static final Logger log = Logger.getLogger(B2AuthorizedUrlProvider.class); + private static final Logger log = LogManager.getLogger(B2AuthorizedUrlProvider.class); private final PathContainerService containerService = new B2PathContainerService(); diff --git a/backblaze/src/main/java/ch/cyberduck/core/b2/B2DeleteFeature.java b/backblaze/src/main/java/ch/cyberduck/core/b2/B2DeleteFeature.java index dfe6f52803c..5f751451965 100644 --- a/backblaze/src/main/java/ch/cyberduck/core/b2/B2DeleteFeature.java +++ b/backblaze/src/main/java/ch/cyberduck/core/b2/B2DeleteFeature.java @@ -25,7 +25,8 @@ import ch.cyberduck.core.features.Delete; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.Map; @@ -33,7 +34,7 @@ import synapticloop.b2.exception.B2ApiException; public class B2DeleteFeature implements Delete { - private static final Logger log = Logger.getLogger(B2DeleteFeature.class); + private static final Logger log = LogManager.getLogger(B2DeleteFeature.class); private final PathContainerService containerService = new B2PathContainerService(); diff --git a/backblaze/src/main/java/ch/cyberduck/core/b2/B2ErrorResponseInterceptor.java b/backblaze/src/main/java/ch/cyberduck/core/b2/B2ErrorResponseInterceptor.java index 39374bff655..db3b6ebcd85 100644 --- a/backblaze/src/main/java/ch/cyberduck/core/b2/B2ErrorResponseInterceptor.java +++ b/backblaze/src/main/java/ch/cyberduck/core/b2/B2ErrorResponseInterceptor.java @@ -28,14 +28,15 @@ import org.apache.http.entity.BufferedHttpEntity; import org.apache.http.protocol.HttpContext; import org.apache.http.util.EntityUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import synapticloop.b2.exception.B2ApiException; public class B2ErrorResponseInterceptor extends DisabledServiceUnavailableRetryStrategy implements HttpRequestInterceptor { - private static final Logger log = Logger.getLogger(B2ErrorResponseInterceptor.class); + private static final Logger log = LogManager.getLogger(B2ErrorResponseInterceptor.class); private static final int MAX_RETRIES = 1; diff --git a/backblaze/src/main/java/ch/cyberduck/core/b2/B2ExceptionMappingService.java b/backblaze/src/main/java/ch/cyberduck/core/b2/B2ExceptionMappingService.java index 14aec657f18..01cefb46e78 100644 --- a/backblaze/src/main/java/ch/cyberduck/core/b2/B2ExceptionMappingService.java +++ b/backblaze/src/main/java/ch/cyberduck/core/b2/B2ExceptionMappingService.java @@ -27,14 +27,15 @@ import org.apache.http.HttpStatus; import org.apache.http.client.HttpResponseException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.time.Duration; import synapticloop.b2.exception.B2ApiException; public class B2ExceptionMappingService extends AbstractExceptionMappingService { - private static final Logger log = Logger.getLogger(B2ExceptionMappingService.class); + private static final Logger log = LogManager.getLogger(B2ExceptionMappingService.class); private final B2VersionIdProvider fileid; diff --git a/backblaze/src/main/java/ch/cyberduck/core/b2/B2LargeCopyFeature.java b/backblaze/src/main/java/ch/cyberduck/core/b2/B2LargeCopyFeature.java index 03da9f06bff..99b3b683a7b 100644 --- a/backblaze/src/main/java/ch/cyberduck/core/b2/B2LargeCopyFeature.java +++ b/backblaze/src/main/java/ch/cyberduck/core/b2/B2LargeCopyFeature.java @@ -35,7 +35,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import ch.cyberduck.core.worker.DefaultExceptionMappingService; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.ArrayList; @@ -54,7 +55,7 @@ import static ch.cyberduck.core.b2.B2MetadataFeature.X_BZ_INFO_SRC_LAST_MODIFIED_MILLIS; public class B2LargeCopyFeature implements Copy { - private static final Logger log = Logger.getLogger(B2LargeCopyFeature.class); + private static final Logger log = LogManager.getLogger(B2LargeCopyFeature.class); private final PathContainerService containerService = new B2PathContainerService(); diff --git a/backblaze/src/main/java/ch/cyberduck/core/b2/B2LargeUploadPartService.java b/backblaze/src/main/java/ch/cyberduck/core/b2/B2LargeUploadPartService.java index 63aeee15a29..a106cd5841e 100644 --- a/backblaze/src/main/java/ch/cyberduck/core/b2/B2LargeUploadPartService.java +++ b/backblaze/src/main/java/ch/cyberduck/core/b2/B2LargeUploadPartService.java @@ -22,7 +22,8 @@ import ch.cyberduck.core.exception.BackgroundException; import org.apache.commons.codec.binary.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.ArrayList; @@ -38,7 +39,7 @@ import synapticloop.b2.response.B2UploadPartResponse; public class B2LargeUploadPartService { - private static final Logger log = Logger.getLogger(B2LargeUploadPartService.class); + private static final Logger log = LogManager.getLogger(B2LargeUploadPartService.class); private final PathContainerService containerService = new B2PathContainerService(); diff --git a/backblaze/src/main/java/ch/cyberduck/core/b2/B2LargeUploadService.java b/backblaze/src/main/java/ch/cyberduck/core/b2/B2LargeUploadService.java index 8990f8105db..4e467d5a641 100644 --- a/backblaze/src/main/java/ch/cyberduck/core/b2/B2LargeUploadService.java +++ b/backblaze/src/main/java/ch/cyberduck/core/b2/B2LargeUploadService.java @@ -38,7 +38,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import ch.cyberduck.core.worker.DefaultExceptionMappingService; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.security.MessageDigest; @@ -59,7 +60,7 @@ import static ch.cyberduck.core.b2.B2MetadataFeature.X_BZ_INFO_SRC_LAST_MODIFIED_MILLIS; public class B2LargeUploadService extends HttpUploadFeature { - private static final Logger log = Logger.getLogger(B2LargeUploadService.class); + private static final Logger log = LogManager.getLogger(B2LargeUploadService.class); /** * The maximum allowed parts in a multipart upload. diff --git a/backblaze/src/main/java/ch/cyberduck/core/b2/B2LargeUploadWriteFeature.java b/backblaze/src/main/java/ch/cyberduck/core/b2/B2LargeUploadWriteFeature.java index 00186d65ebd..59a8631f26f 100644 --- a/backblaze/src/main/java/ch/cyberduck/core/b2/B2LargeUploadWriteFeature.java +++ b/backblaze/src/main/java/ch/cyberduck/core/b2/B2LargeUploadWriteFeature.java @@ -34,7 +34,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.http.entity.ByteArrayEntity; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -56,7 +57,7 @@ import static ch.cyberduck.core.b2.B2MetadataFeature.X_BZ_INFO_SRC_LAST_MODIFIED_MILLIS; public class B2LargeUploadWriteFeature implements MultipartWrite { - private static final Logger log = Logger.getLogger(B2LargeUploadWriteFeature.class); + private static final Logger log = LogManager.getLogger(B2LargeUploadWriteFeature.class); private final PathContainerService containerService = new B2PathContainerService(); diff --git a/backblaze/src/main/java/ch/cyberduck/core/b2/B2ObjectListService.java b/backblaze/src/main/java/ch/cyberduck/core/b2/B2ObjectListService.java index 7409dcf88cc..a8f925db04d 100644 --- a/backblaze/src/main/java/ch/cyberduck/core/b2/B2ObjectListService.java +++ b/backblaze/src/main/java/ch/cyberduck/core/b2/B2ObjectListService.java @@ -31,7 +31,8 @@ import ch.cyberduck.core.preferences.HostPreferences; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.EnumSet; @@ -47,7 +48,7 @@ import static ch.cyberduck.core.b2.B2MetadataFeature.X_BZ_INFO_SRC_LAST_MODIFIED_MILLIS; public class B2ObjectListService implements ListService { - private static final Logger log = Logger.getLogger(B2ObjectListService.class); + private static final Logger log = LogManager.getLogger(B2ObjectListService.class); private final PathContainerService containerService = new DefaultPathContainerService(); diff --git a/backblaze/src/main/java/ch/cyberduck/core/b2/B2SingleUploadService.java b/backblaze/src/main/java/ch/cyberduck/core/b2/B2SingleUploadService.java index ba93917bf61..d6f43afd29d 100644 --- a/backblaze/src/main/java/ch/cyberduck/core/b2/B2SingleUploadService.java +++ b/backblaze/src/main/java/ch/cyberduck/core/b2/B2SingleUploadService.java @@ -24,7 +24,8 @@ import ch.cyberduck.core.preferences.HostPreferences; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; @@ -36,7 +37,7 @@ import synapticloop.b2.response.BaseB2Response; public class B2SingleUploadService extends HttpUploadFeature { - private static final Logger log = Logger.getLogger(B2SingleUploadService.class); + private static final Logger log = LogManager.getLogger(B2SingleUploadService.class); private final B2Session session; private Write writer; diff --git a/backblaze/src/main/java/ch/cyberduck/core/b2/B2ThresholdCopyFeature.java b/backblaze/src/main/java/ch/cyberduck/core/b2/B2ThresholdCopyFeature.java index f964cd98611..07cd25f43a8 100644 --- a/backblaze/src/main/java/ch/cyberduck/core/b2/B2ThresholdCopyFeature.java +++ b/backblaze/src/main/java/ch/cyberduck/core/b2/B2ThresholdCopyFeature.java @@ -23,10 +23,11 @@ import ch.cyberduck.core.preferences.HostPreferences; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class B2ThresholdCopyFeature implements Copy { - private static final Logger log = Logger.getLogger(B2ThresholdCopyFeature.class); + private static final Logger log = LogManager.getLogger(B2ThresholdCopyFeature.class); private final B2Session session; private final B2VersionIdProvider fileid; diff --git a/backblaze/src/main/java/ch/cyberduck/core/b2/B2ThresholdUploadService.java b/backblaze/src/main/java/ch/cyberduck/core/b2/B2ThresholdUploadService.java index ec3ec1e144b..784ace91197 100644 --- a/backblaze/src/main/java/ch/cyberduck/core/b2/B2ThresholdUploadService.java +++ b/backblaze/src/main/java/ch/cyberduck/core/b2/B2ThresholdUploadService.java @@ -26,12 +26,13 @@ import ch.cyberduck.core.preferences.HostPreferences; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import synapticloop.b2.response.BaseB2Response; public class B2ThresholdUploadService implements Upload { - private static final Logger log = Logger.getLogger(B2ThresholdUploadService.class); + private static final Logger log = LogManager.getLogger(B2ThresholdUploadService.class); private final B2Session session; private final B2VersionIdProvider fileid; diff --git a/backblaze/src/main/java/ch/cyberduck/core/b2/B2VersionIdProvider.java b/backblaze/src/main/java/ch/cyberduck/core/b2/B2VersionIdProvider.java index d6ec0441e58..db40699b6df 100644 --- a/backblaze/src/main/java/ch/cyberduck/core/b2/B2VersionIdProvider.java +++ b/backblaze/src/main/java/ch/cyberduck/core/b2/B2VersionIdProvider.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; @@ -37,7 +38,7 @@ import synapticloop.b2.response.B2ListFilesResponse; public class B2VersionIdProvider implements VersionIdProvider { - private static final Logger log = Logger.getLogger(B2VersionIdProvider.class); + private static final Logger log = LogManager.getLogger(B2VersionIdProvider.class); private final PathContainerService containerService = new B2PathContainerService(); private final B2Session session; diff --git a/backblaze/src/main/java/ch/cyberduck/core/b2/B2WriteFeature.java b/backblaze/src/main/java/ch/cyberduck/core/b2/B2WriteFeature.java index a7c09bd8b18..039a94b5963 100644 --- a/backblaze/src/main/java/ch/cyberduck/core/b2/B2WriteFeature.java +++ b/backblaze/src/main/java/ch/cyberduck/core/b2/B2WriteFeature.java @@ -32,7 +32,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.http.entity.AbstractHttpEntity; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.HashMap; @@ -50,7 +51,7 @@ import static ch.cyberduck.core.b2.B2MetadataFeature.X_BZ_INFO_SRC_LAST_MODIFIED_MILLIS; public class B2WriteFeature extends AbstractHttpWriteFeature implements Write { - private static final Logger log = Logger.getLogger(B2WriteFeature.class); + private static final Logger log = LogManager.getLogger(B2WriteFeature.class); private final PathContainerService containerService = new B2PathContainerService(); diff --git a/binding/src/main/java/ch/cyberduck/binding/AlertController.java b/binding/src/main/java/ch/cyberduck/binding/AlertController.java index b76d56797c3..63825cc55d2 100644 --- a/binding/src/main/java/ch/cyberduck/binding/AlertController.java +++ b/binding/src/main/java/ch/cyberduck/binding/AlertController.java @@ -26,14 +26,15 @@ import ch.cyberduck.core.local.BrowserLauncherFactory; import ch.cyberduck.ui.InputValidator; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import org.rococoa.Rococoa; import org.rococoa.cocoa.CGFloat; import org.rococoa.cocoa.foundation.NSRect; public abstract class AlertController extends SheetController implements SheetCallback, InputValidator { - private static final Logger log = Logger.getLogger(AlertController.class); + private static final Logger log = LogManager.getLogger(AlertController.class); protected static final int SUBVIEWS_VERTICAL_SPACE = 4; diff --git a/binding/src/main/java/ch/cyberduck/binding/BundleController.java b/binding/src/main/java/ch/cyberduck/binding/BundleController.java index 5d6898a47b5..948c9f3b64a 100644 --- a/binding/src/main/java/ch/cyberduck/binding/BundleController.java +++ b/binding/src/main/java/ch/cyberduck/binding/BundleController.java @@ -31,10 +31,11 @@ import ch.cyberduck.core.FactoryException; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public abstract class BundleController extends ProxyController { - private static final Logger log = Logger.getLogger(BundleController.class); + private static final Logger log = LogManager.getLogger(BundleController.class); public static final NSMutableParagraphStyle PARAGRAPH_STYLE_LEFT_ALIGNMENT_TRUNCATE_MIDDLE; public static final NSMutableParagraphStyle PARAGRAPH_STYLE_LEFT_ALIGNMENT_TRUNCATE_TAIL; diff --git a/binding/src/main/java/ch/cyberduck/binding/ListDataSource.java b/binding/src/main/java/ch/cyberduck/binding/ListDataSource.java index 602ef4f3ad5..7b07b87ac12 100644 --- a/binding/src/main/java/ch/cyberduck/binding/ListDataSource.java +++ b/binding/src/main/java/ch/cyberduck/binding/ListDataSource.java @@ -26,13 +26,14 @@ import ch.cyberduck.binding.foundation.NSObject; import ch.cyberduck.binding.foundation.NSURL; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.cocoa.foundation.NSInteger; import org.rococoa.cocoa.foundation.NSPoint; import org.rococoa.cocoa.foundation.NSUInteger; public abstract class ListDataSource extends ProxyController implements NSTableView.DataSource, NSDraggingSource { - private static final Logger log = Logger.getLogger(ListDataSource.class); + private static final Logger log = LogManager.getLogger(ListDataSource.class); @Override public void tableView_setObjectValue_forTableColumn_row(NSTableView view, NSObject value, NSTableColumn tableColumn, NSInteger row) { diff --git a/binding/src/main/java/ch/cyberduck/binding/OutlineDataSource.java b/binding/src/main/java/ch/cyberduck/binding/OutlineDataSource.java index 34cc86e749e..c17ae5527d1 100644 --- a/binding/src/main/java/ch/cyberduck/binding/OutlineDataSource.java +++ b/binding/src/main/java/ch/cyberduck/binding/OutlineDataSource.java @@ -25,13 +25,14 @@ import ch.cyberduck.binding.foundation.NSObject; import ch.cyberduck.binding.foundation.NSURL; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.cocoa.foundation.NSInteger; import org.rococoa.cocoa.foundation.NSPoint; import org.rococoa.cocoa.foundation.NSUInteger; public abstract class OutlineDataSource extends ProxyController implements NSOutlineView.DataSource, NSDraggingSource { - private static final Logger log = Logger.getLogger(OutlineDataSource.class); + private static final Logger log = LogManager.getLogger(OutlineDataSource.class); @Override public void outlineView_setObjectValue_forTableColumn_byItem(final NSOutlineView outlineView, NSObject value, diff --git a/binding/src/main/java/ch/cyberduck/binding/Proxy.java b/binding/src/main/java/ch/cyberduck/binding/Proxy.java index 2434f819884..737e8641236 100644 --- a/binding/src/main/java/ch/cyberduck/binding/Proxy.java +++ b/binding/src/main/java/ch/cyberduck/binding/Proxy.java @@ -4,13 +4,14 @@ import ch.cyberduck.binding.foundation.NSObject; import ch.cyberduck.binding.foundation.NSThread; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import org.rococoa.ID; import org.rococoa.Rococoa; public class Proxy { - private static final Logger log = Logger.getLogger(Proxy.class); + private static final Logger log = LogManager.getLogger(Proxy.class); /** * You need to keep a reference to the returned value for as long as it is diff --git a/binding/src/main/java/ch/cyberduck/binding/ProxyController.java b/binding/src/main/java/ch/cyberduck/binding/ProxyController.java index 566d6ade45f..26c1d523146 100644 --- a/binding/src/main/java/ch/cyberduck/binding/ProxyController.java +++ b/binding/src/main/java/ch/cyberduck/binding/ProxyController.java @@ -18,11 +18,12 @@ import ch.cyberduck.core.AbstractController; import ch.cyberduck.core.threading.MainAction; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.ID; public class ProxyController extends AbstractController { - private static final Logger log = Logger.getLogger(ProxyController.class); + private static final Logger log = LogManager.getLogger(ProxyController.class); private final Proxy proxy = new Proxy(this); diff --git a/binding/src/main/java/ch/cyberduck/binding/SheetController.java b/binding/src/main/java/ch/cyberduck/binding/SheetController.java index 49d7fdb3846..49dde4c8fb1 100644 --- a/binding/src/main/java/ch/cyberduck/binding/SheetController.java +++ b/binding/src/main/java/ch/cyberduck/binding/SheetController.java @@ -22,11 +22,12 @@ import ch.cyberduck.binding.application.SheetCallback; import ch.cyberduck.ui.InputValidator; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.ID; public abstract class SheetController extends WindowController implements SheetCallback, InputValidator { - private static final Logger log = Logger.getLogger(SheetController.class); + private static final Logger log = LogManager.getLogger(SheetController.class); private final NSApplication application = NSApplication.sharedApplication(); diff --git a/binding/src/main/java/ch/cyberduck/binding/SheetInvoker.java b/binding/src/main/java/ch/cyberduck/binding/SheetInvoker.java index 88e26294aa3..5513f243d44 100644 --- a/binding/src/main/java/ch/cyberduck/binding/SheetInvoker.java +++ b/binding/src/main/java/ch/cyberduck/binding/SheetInvoker.java @@ -21,7 +21,8 @@ import ch.cyberduck.binding.foundation.NSThread; import ch.cyberduck.core.threading.DefaultMainAction; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import org.rococoa.ID; @@ -32,7 +33,7 @@ import com.google.common.util.concurrent.Uninterruptibles; public class SheetInvoker extends ProxyController { - private static final Logger log = Logger.getLogger(SheetInvoker.class); + private static final Logger log = LogManager.getLogger(SheetInvoker.class); /** * Keep a reference to the sheet to protect it from being deallocated as a weak reference before the callback from diff --git a/binding/src/main/java/ch/cyberduck/binding/ToolbarWindowController.java b/binding/src/main/java/ch/cyberduck/binding/ToolbarWindowController.java index 392d8304149..c2d7bc25d73 100644 --- a/binding/src/main/java/ch/cyberduck/binding/ToolbarWindowController.java +++ b/binding/src/main/java/ch/cyberduck/binding/ToolbarWindowController.java @@ -30,7 +30,8 @@ import ch.cyberduck.core.preferences.Preferences; import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import org.rococoa.Rococoa; import org.rococoa.cocoa.foundation.NSPoint; @@ -47,7 +48,7 @@ * A window controller with a toolbar populated from a tabbed view. */ public abstract class ToolbarWindowController extends WindowController implements NSToolbar.Delegate, NSTabView.Delegate { - private static final Logger log = Logger.getLogger(ToolbarWindowController.class); + private static final Logger log = LogManager.getLogger(ToolbarWindowController.class); private final Preferences preferences = PreferencesFactory.get(); diff --git a/binding/src/main/java/ch/cyberduck/binding/WindowController.java b/binding/src/main/java/ch/cyberduck/binding/WindowController.java index f1bd9a29ab5..953d97263a7 100644 --- a/binding/src/main/java/ch/cyberduck/binding/WindowController.java +++ b/binding/src/main/java/ch/cyberduck/binding/WindowController.java @@ -30,7 +30,8 @@ import ch.cyberduck.core.ProviderHelpServiceFactory; import ch.cyberduck.core.local.BrowserLauncherFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import org.rococoa.ID; import org.rococoa.cocoa.foundation.NSPoint; @@ -40,7 +41,7 @@ import java.util.Set; public abstract class WindowController extends BundleController implements NSWindow.Delegate { - private static final Logger log = Logger.getLogger(WindowController.class); + private static final Logger log = LogManager.getLogger(WindowController.class); protected static final String DEFAULT = LocaleFactory.localizedString("Default"); diff --git a/binding/src/main/java/ch/cyberduck/binding/application/AlertSheetReturnCodeMapper.java b/binding/src/main/java/ch/cyberduck/binding/application/AlertSheetReturnCodeMapper.java index 1bc68262479..235a4ff2b7c 100644 --- a/binding/src/main/java/ch/cyberduck/binding/application/AlertSheetReturnCodeMapper.java +++ b/binding/src/main/java/ch/cyberduck/binding/application/AlertSheetReturnCodeMapper.java @@ -17,10 +17,11 @@ * Bug fixes, suggestions and comments should be sent to feedback@cyberduck.ch */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public final class AlertSheetReturnCodeMapper { - private static final Logger log = Logger.getLogger(AlertSheetReturnCodeMapper.class); + private static final Logger log = LogManager.getLogger(AlertSheetReturnCodeMapper.class); /** * Translate return codes from sheet selection diff --git a/binding/src/main/java/ch/cyberduck/binding/application/NSApplication.java b/binding/src/main/java/ch/cyberduck/binding/application/NSApplication.java index e2d9aefd628..ebcb6c99cda 100644 --- a/binding/src/main/java/ch/cyberduck/binding/application/NSApplication.java +++ b/binding/src/main/java/ch/cyberduck/binding/application/NSApplication.java @@ -25,7 +25,8 @@ import ch.cyberduck.binding.foundation.NSNotification; import ch.cyberduck.binding.foundation.NSObject; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.ID; import org.rococoa.ObjCClass; import org.rococoa.Rococoa; @@ -36,7 +37,7 @@ public abstract class NSApplication extends NSObject { private static final _Class CLASS = Rococoa.createClass("NSApplication", _Class.class); //$NON-NLS-1$ - private static final Logger log = Logger.getLogger(NSApplication.class); + private static final Logger log = LogManager.getLogger(NSApplication.class); public interface Delegate { /** diff --git a/bonjour/src/main/java/ch/cyberduck/core/bonjour/AbstractRendezvous.java b/bonjour/src/main/java/ch/cyberduck/core/bonjour/AbstractRendezvous.java index dcfc01afb8b..07f8b1459ca 100644 --- a/bonjour/src/main/java/ch/cyberduck/core/bonjour/AbstractRendezvous.java +++ b/bonjour/src/main/java/ch/cyberduck/core/bonjour/AbstractRendezvous.java @@ -29,7 +29,8 @@ import ch.cyberduck.core.UserDateFormatterFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; import java.util.Date; @@ -40,7 +41,7 @@ import java.util.concurrent.ConcurrentHashMap; public abstract class AbstractRendezvous implements Rendezvous { - private static final Logger log = Logger.getLogger(AbstractRendezvous.class); + private static final Logger log = LogManager.getLogger(AbstractRendezvous.class); /** * sftp-ssh @@ -228,4 +229,4 @@ protected void remove(final String identifier) { notifier.serviceLost(host); } -} \ No newline at end of file +} diff --git a/bonjour/src/main/java/ch/cyberduck/core/bonjour/LimitedRendezvousListener.java b/bonjour/src/main/java/ch/cyberduck/core/bonjour/LimitedRendezvousListener.java index 7f0ff2e4f79..b348b82953d 100644 --- a/bonjour/src/main/java/ch/cyberduck/core/bonjour/LimitedRendezvousListener.java +++ b/bonjour/src/main/java/ch/cyberduck/core/bonjour/LimitedRendezvousListener.java @@ -21,7 +21,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.concurrent.TimedSemaphore; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.net.InetAddress; import java.net.UnknownHostException; @@ -29,7 +30,7 @@ import java.util.concurrent.TimeUnit; public class LimitedRendezvousListener implements RendezvousListener { - private static final Logger log = Logger.getLogger(LimitedRendezvousListener.class); + private static final Logger log = LogManager.getLogger(LimitedRendezvousListener.class); /** * Rate limit for notifications diff --git a/bonjour/src/main/java/ch/cyberduck/core/bonjour/RendezvousResponder.java b/bonjour/src/main/java/ch/cyberduck/core/bonjour/RendezvousResponder.java index 2f96f686e45..15792f0a728 100644 --- a/bonjour/src/main/java/ch/cyberduck/core/bonjour/RendezvousResponder.java +++ b/bonjour/src/main/java/ch/cyberduck/core/bonjour/RendezvousResponder.java @@ -29,13 +29,14 @@ import ch.cyberduck.core.threading.ActionOperationBatcher; import ch.cyberduck.core.threading.ActionOperationBatcherFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; public final class RendezvousResponder extends AbstractRendezvous implements BrowseListener, ResolveListener { - private static final Logger log = Logger.getLogger(RendezvousResponder.class); + private static final Logger log = LogManager.getLogger(RendezvousResponder.class); private final Map browsers; @@ -154,4 +155,4 @@ public void serviceResolved(final DNSSDService resolver, final int flags, final autorelease.operate(); } } -} \ No newline at end of file +} diff --git a/box/src/main/java/ch/cyberduck/core/box/BoxChunkedWriteFeature.java b/box/src/main/java/ch/cyberduck/core/box/BoxChunkedWriteFeature.java index 4a3efa5b2a3..996b4267560 100644 --- a/box/src/main/java/ch/cyberduck/core/box/BoxChunkedWriteFeature.java +++ b/box/src/main/java/ch/cyberduck/core/box/BoxChunkedWriteFeature.java @@ -33,12 +33,13 @@ import org.apache.http.client.methods.HttpPut; import org.apache.http.entity.AbstractHttpEntity; import org.apache.http.message.BasicHeader; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; public class BoxChunkedWriteFeature extends AbstractHttpWriteFeature { - private static final Logger log = Logger.getLogger(BoxChunkedWriteFeature.class); + private static final Logger log = LogManager.getLogger(BoxChunkedWriteFeature.class); private final BoxSession session; private final BoxApiClient client; diff --git a/box/src/main/java/ch/cyberduck/core/box/BoxFileidProvider.java b/box/src/main/java/ch/cyberduck/core/box/BoxFileidProvider.java index e2acaab42f1..69983a721f8 100644 --- a/box/src/main/java/ch/cyberduck/core/box/BoxFileidProvider.java +++ b/box/src/main/java/ch/cyberduck/core/box/BoxFileidProvider.java @@ -25,10 +25,11 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class BoxFileidProvider implements FileIdProvider { - private static final Logger log = Logger.getLogger(BoxFileidProvider.class); + private static final Logger log = LogManager.getLogger(BoxFileidProvider.class); public static final String ROOT = "0"; diff --git a/box/src/main/java/ch/cyberduck/core/box/BoxLargeUploadService.java b/box/src/main/java/ch/cyberduck/core/box/BoxLargeUploadService.java index 28708c633a3..ffc29003f56 100644 --- a/box/src/main/java/ch/cyberduck/core/box/BoxLargeUploadService.java +++ b/box/src/main/java/ch/cyberduck/core/box/BoxLargeUploadService.java @@ -36,7 +36,8 @@ import ch.cyberduck.core.transfer.SegmentRetryCallable; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.security.MessageDigest; import java.util.ArrayList; @@ -48,7 +49,7 @@ import java.util.stream.Collectors; public class BoxLargeUploadService extends HttpUploadFeature { - private static final Logger log = Logger.getLogger(BoxLargeUploadService.class); + private static final Logger log = LogManager.getLogger(BoxLargeUploadService.class); public static final String UPLOAD_SESSION_ID = "uploadSessionId"; public static final String OVERALL_LENGTH = "overall-length"; diff --git a/box/src/main/java/ch/cyberduck/core/box/BoxListService.java b/box/src/main/java/ch/cyberduck/core/box/BoxListService.java index 0a7463c293b..5be28188842 100644 --- a/box/src/main/java/ch/cyberduck/core/box/BoxListService.java +++ b/box/src/main/java/ch/cyberduck/core/box/BoxListService.java @@ -30,7 +30,8 @@ import ch.cyberduck.core.preferences.HostPreferences; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.EnumSet; import java.util.Map; @@ -38,7 +39,7 @@ import com.fasterxml.jackson.core.JsonProcessingException; public class BoxListService implements ListService { - private static final Logger log = Logger.getLogger(BoxListService.class); + private static final Logger log = LogManager.getLogger(BoxListService.class); private final BoxSession session; private final BoxFileidProvider fileid; diff --git a/box/src/main/java/ch/cyberduck/core/box/BoxMultipartWriteFeature.java b/box/src/main/java/ch/cyberduck/core/box/BoxMultipartWriteFeature.java index e68a7b60622..95f73b96909 100644 --- a/box/src/main/java/ch/cyberduck/core/box/BoxMultipartWriteFeature.java +++ b/box/src/main/java/ch/cyberduck/core/box/BoxMultipartWriteFeature.java @@ -36,7 +36,8 @@ import org.apache.http.client.methods.HttpPut; import org.apache.http.entity.ByteArrayEntity; import org.apache.http.message.BasicHeader; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -49,7 +50,7 @@ import java.util.stream.Collectors; public class BoxMultipartWriteFeature implements Write { - private static final Logger log = Logger.getLogger(BoxMultipartWriteFeature.class); + private static final Logger log = LogManager.getLogger(BoxMultipartWriteFeature.class); private final BoxSession session; private final BoxFileidProvider fileid; diff --git a/box/src/main/java/ch/cyberduck/core/box/BoxReadFeature.java b/box/src/main/java/ch/cyberduck/core/box/BoxReadFeature.java index 1f17ff09286..b82df64b9ba 100644 --- a/box/src/main/java/ch/cyberduck/core/box/BoxReadFeature.java +++ b/box/src/main/java/ch/cyberduck/core/box/BoxReadFeature.java @@ -27,13 +27,14 @@ import org.apache.http.HttpHeaders; import org.apache.http.client.methods.HttpGet; import org.apache.http.message.BasicHeader; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; public class BoxReadFeature implements Read { - private static final Logger log = Logger.getLogger(BoxReadFeature.class); + private static final Logger log = LogManager.getLogger(BoxReadFeature.class); private final BoxSession session; private final BoxFileidProvider fileid; diff --git a/box/src/main/java/ch/cyberduck/core/box/BoxSession.java b/box/src/main/java/ch/cyberduck/core/box/BoxSession.java index 1efb29294e6..c0f34976484 100644 --- a/box/src/main/java/ch/cyberduck/core/box/BoxSession.java +++ b/box/src/main/java/ch/cyberduck/core/box/BoxSession.java @@ -47,13 +47,14 @@ import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.Collections; public class BoxSession extends HttpSession { - private static final Logger log = Logger.getLogger(BoxSession.class); + private static final Logger log = LogManager.getLogger(BoxSession.class); private final BoxFileidProvider fileid = new BoxFileidProvider(this); diff --git a/box/src/main/java/ch/cyberduck/core/box/BoxUploadHelper.java b/box/src/main/java/ch/cyberduck/core/box/BoxUploadHelper.java index 082068e8713..18dd82a9acc 100644 --- a/box/src/main/java/ch/cyberduck/core/box/BoxUploadHelper.java +++ b/box/src/main/java/ch/cyberduck/core/box/BoxUploadHelper.java @@ -41,7 +41,8 @@ import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.ByteArrayEntity; import org.apache.http.message.BasicHeader; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -49,7 +50,7 @@ import java.util.Objects; public class BoxUploadHelper { - private static final Logger log = Logger.getLogger(BoxUploadHelper.class); + private static final Logger log = LogManager.getLogger(BoxUploadHelper.class); private final BoxSession session; private final BoxFileidProvider fileid; diff --git a/box/src/main/java/ch/cyberduck/core/box/BoxWriteFeature.java b/box/src/main/java/ch/cyberduck/core/box/BoxWriteFeature.java index c5c1e2770d8..6f78babb3a5 100644 --- a/box/src/main/java/ch/cyberduck/core/box/BoxWriteFeature.java +++ b/box/src/main/java/ch/cyberduck/core/box/BoxWriteFeature.java @@ -40,14 +40,15 @@ import org.apache.http.entity.ContentType; import org.apache.http.entity.mime.MultipartEntityBuilder; import org.apache.http.message.BasicHeader; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.joda.time.DateTime; import java.io.ByteArrayOutputStream; import java.io.IOException; public class BoxWriteFeature extends AbstractHttpWriteFeature { - private static final Logger log = Logger.getLogger(BoxWriteFeature.class); + private static final Logger log = LogManager.getLogger(BoxWriteFeature.class); private final BoxSession session; private final BoxFileidProvider fileid; diff --git a/brick/src/main/java/ch/cyberduck/core/brick/BrickCopyFeature.java b/brick/src/main/java/ch/cyberduck/core/brick/BrickCopyFeature.java index f1e7e46baac..bfb388d494d 100644 --- a/brick/src/main/java/ch/cyberduck/core/brick/BrickCopyFeature.java +++ b/brick/src/main/java/ch/cyberduck/core/brick/BrickCopyFeature.java @@ -28,12 +28,13 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; public class BrickCopyFeature extends BrickFileMigrationFeature implements Copy { - private static final Logger log = Logger.getLogger(BrickCopyFeature.class); + private static final Logger log = LogManager.getLogger(BrickCopyFeature.class); private final BrickSession session; diff --git a/brick/src/main/java/ch/cyberduck/core/brick/BrickExceptionMappingService.java b/brick/src/main/java/ch/cyberduck/core/brick/BrickExceptionMappingService.java index 363fe2362a3..392c6fe8126 100644 --- a/brick/src/main/java/ch/cyberduck/core/brick/BrickExceptionMappingService.java +++ b/brick/src/main/java/ch/cyberduck/core/brick/BrickExceptionMappingService.java @@ -26,7 +26,8 @@ import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.http.HttpStatus; import org.apache.http.client.HttpResponseException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.StringReader; @@ -39,7 +40,7 @@ import com.google.gson.JsonPrimitive; public class BrickExceptionMappingService extends AbstractExceptionMappingService { - private static final Logger log = Logger.getLogger(BrickExceptionMappingService.class); + private static final Logger log = LogManager.getLogger(BrickExceptionMappingService.class); @Override public BackgroundException map(final ApiException failure) { diff --git a/brick/src/main/java/ch/cyberduck/core/brick/BrickFileMigrationFeature.java b/brick/src/main/java/ch/cyberduck/core/brick/BrickFileMigrationFeature.java index 35037d03435..3ddb5d9690c 100644 --- a/brick/src/main/java/ch/cyberduck/core/brick/BrickFileMigrationFeature.java +++ b/brick/src/main/java/ch/cyberduck/core/brick/BrickFileMigrationFeature.java @@ -23,7 +23,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import ch.cyberduck.core.threading.ScheduledThreadPool; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -32,7 +33,7 @@ import com.google.common.util.concurrent.Uninterruptibles; public class BrickFileMigrationFeature { - private static final Logger log = Logger.getLogger(BrickFileMigrationFeature.class); + private static final Logger log = LogManager.getLogger(BrickFileMigrationFeature.class); private final Preferences preferences = PreferencesFactory.get(); diff --git a/brick/src/main/java/ch/cyberduck/core/brick/BrickMoveFeature.java b/brick/src/main/java/ch/cyberduck/core/brick/BrickMoveFeature.java index 399cb86206d..3e34cf37d8e 100644 --- a/brick/src/main/java/ch/cyberduck/core/brick/BrickMoveFeature.java +++ b/brick/src/main/java/ch/cyberduck/core/brick/BrickMoveFeature.java @@ -29,12 +29,13 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; public class BrickMoveFeature extends BrickFileMigrationFeature implements Move { - private static final Logger log = Logger.getLogger(BrickMoveFeature.class); + private static final Logger log = LogManager.getLogger(BrickMoveFeature.class); private final BrickSession session; private final Preferences preferences = PreferencesFactory.get(); diff --git a/brick/src/main/java/ch/cyberduck/core/brick/BrickMultipartWriteFeature.java b/brick/src/main/java/ch/cyberduck/core/brick/BrickMultipartWriteFeature.java index 73e93bdcb31..b6202893ac0 100644 --- a/brick/src/main/java/ch/cyberduck/core/brick/BrickMultipartWriteFeature.java +++ b/brick/src/main/java/ch/cyberduck/core/brick/BrickMultipartWriteFeature.java @@ -36,7 +36,8 @@ import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.joda.time.DateTime; import java.io.ByteArrayInputStream; @@ -49,7 +50,7 @@ import java.util.stream.Collectors; public class BrickMultipartWriteFeature implements MultipartWrite { - private static final Logger log = Logger.getLogger(BrickMultipartWriteFeature.class); + private static final Logger log = LogManager.getLogger(BrickMultipartWriteFeature.class); private final BrickSession session; private final Integer partsize; diff --git a/brick/src/main/java/ch/cyberduck/core/brick/BrickPairingFeature.java b/brick/src/main/java/ch/cyberduck/core/brick/BrickPairingFeature.java index cf0a6825f1b..ffff522701b 100644 --- a/brick/src/main/java/ch/cyberduck/core/brick/BrickPairingFeature.java +++ b/brick/src/main/java/ch/cyberduck/core/brick/BrickPairingFeature.java @@ -49,12 +49,13 @@ import org.apache.http.config.RegistryBuilder; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; public class BrickPairingFeature implements Pairing { - private static final Logger log = Logger.getLogger(BrickPairingFeature.class); + private static final Logger log = LogManager.getLogger(BrickPairingFeature.class); private final HostPasswordStore store = PasswordStoreFactory.get(); diff --git a/brick/src/main/java/ch/cyberduck/core/brick/BrickPairingSchedulerFeature.java b/brick/src/main/java/ch/cyberduck/core/brick/BrickPairingSchedulerFeature.java index 5fe7d8df2c4..21ac99f2a04 100644 --- a/brick/src/main/java/ch/cyberduck/core/brick/BrickPairingSchedulerFeature.java +++ b/brick/src/main/java/ch/cyberduck/core/brick/BrickPairingSchedulerFeature.java @@ -37,7 +37,8 @@ import org.apache.http.client.HttpResponseException; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.AbstractResponseHandler; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -52,7 +53,7 @@ import com.google.gson.JsonPrimitive; public class BrickPairingSchedulerFeature { - private static final Logger log = Logger.getLogger(BrickPairingSchedulerFeature.class); + private static final Logger log = LogManager.getLogger(BrickPairingSchedulerFeature.class); private final BrickSession session; private final String token; diff --git a/brick/src/main/java/ch/cyberduck/core/brick/BrickReadFeature.java b/brick/src/main/java/ch/cyberduck/core/brick/BrickReadFeature.java index 060ec2da988..63a783575ea 100644 --- a/brick/src/main/java/ch/cyberduck/core/brick/BrickReadFeature.java +++ b/brick/src/main/java/ch/cyberduck/core/brick/BrickReadFeature.java @@ -36,13 +36,14 @@ import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.message.BasicHeader; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; public class BrickReadFeature implements Read { - private static final Logger log = Logger.getLogger(BrickReadFeature.class); + private static final Logger log = LogManager.getLogger(BrickReadFeature.class); private final BrickSession session; diff --git a/brick/src/main/java/ch/cyberduck/core/brick/BrickSession.java b/brick/src/main/java/ch/cyberduck/core/brick/BrickSession.java index 9ac2d7b9fb1..a45b55ca726 100644 --- a/brick/src/main/java/ch/cyberduck/core/brick/BrickSession.java +++ b/brick/src/main/java/ch/cyberduck/core/brick/BrickSession.java @@ -46,7 +46,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.net.InetAddress; @@ -55,7 +56,7 @@ import java.util.concurrent.CountDownLatch; public class BrickSession extends HttpSession { - private static final Logger log = Logger.getLogger(BrickSession.class); + private static final Logger log = LogManager.getLogger(BrickSession.class); private BrickUnauthorizedRetryStrategy retryHandler; diff --git a/brick/src/main/java/ch/cyberduck/core/brick/BrickUnauthorizedRetryStrategy.java b/brick/src/main/java/ch/cyberduck/core/brick/BrickUnauthorizedRetryStrategy.java index 2edcc5c1ab3..070f76e3af8 100644 --- a/brick/src/main/java/ch/cyberduck/core/brick/BrickUnauthorizedRetryStrategy.java +++ b/brick/src/main/java/ch/cyberduck/core/brick/BrickUnauthorizedRetryStrategy.java @@ -34,13 +34,14 @@ import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.apache.http.protocol.HttpContext; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.concurrent.Semaphore; public class BrickUnauthorizedRetryStrategy extends DisabledServiceUnavailableRetryStrategy implements HttpRequestInterceptor { - private static final Logger log = Logger.getLogger(BrickUnauthorizedRetryStrategy.class); + private static final Logger log = LogManager.getLogger(BrickUnauthorizedRetryStrategy.class); private static final int MAX_RETRIES = 1; diff --git a/brick/src/main/java/ch/cyberduck/core/brick/BrickUploadFeature.java b/brick/src/main/java/ch/cyberduck/core/brick/BrickUploadFeature.java index 74de3a9edc0..bb30e97baa1 100644 --- a/brick/src/main/java/ch/cyberduck/core/brick/BrickUploadFeature.java +++ b/brick/src/main/java/ch/cyberduck/core/brick/BrickUploadFeature.java @@ -41,7 +41,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.joda.time.DateTime; import java.security.MessageDigest; @@ -53,7 +54,7 @@ import java.util.stream.Collectors; public class BrickUploadFeature extends HttpUploadFeature { - private static final Logger log = Logger.getLogger(BrickUploadFeature.class); + private static final Logger log = LogManager.getLogger(BrickUploadFeature.class); /** * The maximum allowed parts in a multipart upload. diff --git a/brick/src/main/java/ch/cyberduck/core/brick/BrickWriteFeature.java b/brick/src/main/java/ch/cyberduck/core/brick/BrickWriteFeature.java index 7b3a22ba824..83179bc3807 100644 --- a/brick/src/main/java/ch/cyberduck/core/brick/BrickWriteFeature.java +++ b/brick/src/main/java/ch/cyberduck/core/brick/BrickWriteFeature.java @@ -44,7 +44,8 @@ import org.apache.http.entity.AbstractHttpEntity; import org.apache.http.entity.BufferedHttpEntity; import org.apache.http.util.EntityUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.text.MessageFormat; @@ -52,7 +53,7 @@ import java.util.concurrent.atomic.AtomicBoolean; public class BrickWriteFeature extends AbstractHttpWriteFeature { - private static final Logger log = Logger.getLogger(BrickWriteFeature.class); + private static final Logger log = LogManager.getLogger(BrickWriteFeature.class); private final BrickSession session; diff --git a/cli/src/main/java/ch/cyberduck/cli/ClasspathResourcesFinder.java b/cli/src/main/java/ch/cyberduck/cli/ClasspathResourcesFinder.java index 567afd96bc9..f5839a63cdf 100644 --- a/cli/src/main/java/ch/cyberduck/cli/ClasspathResourcesFinder.java +++ b/cli/src/main/java/ch/cyberduck/cli/ClasspathResourcesFinder.java @@ -19,14 +19,15 @@ import ch.cyberduck.core.LocalFactory; import ch.cyberduck.core.preferences.ApplicationResourcesFinder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.File; import java.net.URI; public class ClasspathResourcesFinder implements ApplicationResourcesFinder { - private static final Logger log = Logger.getLogger(ClasspathResourcesFinder.class); + private static final Logger log = LogManager.getLogger(ClasspathResourcesFinder.class); @Override public Local find() { diff --git a/cli/src/main/java/ch/cyberduck/cli/CommandLineUriParser.java b/cli/src/main/java/ch/cyberduck/cli/CommandLineUriParser.java index 7fec2b2bd6e..63502a20ad4 100644 --- a/cli/src/main/java/ch/cyberduck/cli/CommandLineUriParser.java +++ b/cli/src/main/java/ch/cyberduck/cli/CommandLineUriParser.java @@ -25,10 +25,11 @@ import ch.cyberduck.core.exception.HostParserException; import org.apache.commons.cli.CommandLine; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class CommandLineUriParser { - private static final Logger log = Logger.getLogger(CommandLineUriParser.class); + private static final Logger log = LogManager.getLogger(CommandLineUriParser.class); private final CommandLine input; private final ProtocolFactory factory; diff --git a/cli/src/main/java/ch/cyberduck/cli/DownloadGlobFilter.java b/cli/src/main/java/ch/cyberduck/cli/DownloadGlobFilter.java index 987fad6b12e..2f7eba46340 100644 --- a/cli/src/main/java/ch/cyberduck/cli/DownloadGlobFilter.java +++ b/cli/src/main/java/ch/cyberduck/cli/DownloadGlobFilter.java @@ -20,13 +20,14 @@ import ch.cyberduck.core.Path; import ch.cyberduck.core.filter.DownloadDuplicateFilter; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Objects; import java.util.regex.Pattern; public class DownloadGlobFilter extends DownloadDuplicateFilter { - private static final Logger log = Logger.getLogger(DownloadGlobFilter.class); + private static final Logger log = LogManager.getLogger(DownloadGlobFilter.class); private final Pattern pattern; diff --git a/cli/src/main/java/ch/cyberduck/cli/GlobTransferItemFinder.java b/cli/src/main/java/ch/cyberduck/cli/GlobTransferItemFinder.java index 37cd7c3970a..2faa23f4dd1 100644 --- a/cli/src/main/java/ch/cyberduck/cli/GlobTransferItemFinder.java +++ b/cli/src/main/java/ch/cyberduck/cli/GlobTransferItemFinder.java @@ -29,7 +29,8 @@ import org.apache.commons.cli.CommandLine; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.nio.file.FileSystems; import java.nio.file.InvalidPathException; @@ -40,7 +41,7 @@ import java.util.Set; public class GlobTransferItemFinder implements TransferItemFinder { - private static final Logger log = Logger.getLogger(GlobTransferItemFinder.class); + private static final Logger log = LogManager.getLogger(GlobTransferItemFinder.class); @Override public Set find(final CommandLine input, final TerminalAction action, final Path remote) throws AccessDeniedException { diff --git a/cli/src/main/java/ch/cyberduck/cli/LinuxTerminalPreferences.java b/cli/src/main/java/ch/cyberduck/cli/LinuxTerminalPreferences.java index dafe5819d0b..e3fe8cf2bce 100644 --- a/cli/src/main/java/ch/cyberduck/cli/LinuxTerminalPreferences.java +++ b/cli/src/main/java/ch/cyberduck/cli/LinuxTerminalPreferences.java @@ -27,14 +27,15 @@ import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.awt.*; import java.io.IOException; import java.nio.charset.Charset; public class LinuxTerminalPreferences extends TerminalPreferences { - private static final Logger log = Logger.getLogger(LinuxTerminalPreferences.class); + private static final Logger log = LogManager.getLogger(LinuxTerminalPreferences.class); public LinuxTerminalPreferences() { super(new MemoryPreferences()); diff --git a/cli/src/main/java/ch/cyberduck/cli/Terminal.java b/cli/src/main/java/ch/cyberduck/cli/Terminal.java index 20d673aa9c6..a4792083d04 100644 --- a/cli/src/main/java/ch/cyberduck/cli/Terminal.java +++ b/cli/src/main/java/ch/cyberduck/cli/Terminal.java @@ -92,7 +92,8 @@ import org.apache.commons.cli.ParseException; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.Collections; @@ -104,7 +105,7 @@ import com.google.common.util.concurrent.Uninterruptibles; public class Terminal { - private static final Logger log = Logger.getLogger(Terminal.class); + private static final Logger log = LogManager.getLogger(Terminal.class); static { System.err.close(); diff --git a/cli/src/main/java/ch/cyberduck/cli/TerminalAppender.java b/cli/src/main/java/ch/cyberduck/cli/TerminalAppender.java index 113efc2ca75..5d107b68239 100644 --- a/cli/src/main/java/ch/cyberduck/cli/TerminalAppender.java +++ b/cli/src/main/java/ch/cyberduck/cli/TerminalAppender.java @@ -15,21 +15,29 @@ * GNU General Public License for more details. */ -import org.apache.log4j.AppenderSkeleton; -import org.apache.log4j.spi.LoggingEvent; +import org.apache.logging.log4j.core.Layout; +import org.apache.logging.log4j.core.LogEvent; +import org.apache.logging.log4j.core.appender.AbstractAppender; +import org.apache.logging.log4j.core.config.Property; import org.fusesource.jansi.Ansi; -public class TerminalAppender extends AppenderSkeleton { +import java.nio.charset.StandardCharsets; + +public class TerminalAppender extends AbstractAppender { private final Console console = new Console(); + public TerminalAppender(final Layout layout) { + super(TerminalAppender.class.getName(), null, layout, true, Property.EMPTY_ARRAY); + } + @Override - public void append(final LoggingEvent event) { + public void append(final LogEvent event) { if(null == event.getMessage()) { return; } final StringBuilder buffer = new StringBuilder(); - buffer.append(layout.format(event)); + buffer.append(new String(getLayout().toByteArray(event), StandardCharsets.UTF_8)); console.printf("\r%s%s%s", Ansi.ansi() .fg(Ansi.Color.YELLOW) .saveCursorPosition() @@ -37,14 +45,4 @@ public void append(final LoggingEvent event) { .restoreCursorPosition(), buffer.toString(), Ansi.ansi().reset()); } - - @Override - public void close() { - // - } - - @Override - public boolean requiresLayout() { - return false; - } } diff --git a/cli/src/main/java/ch/cyberduck/cli/TerminalPreferences.java b/cli/src/main/java/ch/cyberduck/cli/TerminalPreferences.java index c2ab6eb3b38..f43a4a69dad 100644 --- a/cli/src/main/java/ch/cyberduck/cli/TerminalPreferences.java +++ b/cli/src/main/java/ch/cyberduck/cli/TerminalPreferences.java @@ -22,14 +22,21 @@ import ch.cyberduck.core.transfer.TransferAction; import org.apache.commons.cli.CommandLine; -import org.apache.log4j.Appender; -import org.apache.log4j.Logger; -import org.apache.log4j.PatternLayout; - +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.core.Appender; +import org.apache.logging.log4j.core.LoggerContext; +import org.apache.logging.log4j.core.config.AppenderRef; +import org.apache.logging.log4j.core.config.Configuration; +import org.apache.logging.log4j.core.config.LoggerConfig; +import org.apache.logging.log4j.core.layout.PatternLayout; + +import java.nio.charset.StandardCharsets; import java.util.List; public class TerminalPreferences extends Preferences { - private static final Logger log = Logger.getLogger(TerminalPreferences.class); + private static final Logger log = LogManager.getLogger(TerminalPreferences.class); private final Preferences proxy; @@ -58,11 +65,18 @@ protected void setFactories() { @Override protected void configureLogging(final String level) { super.configureLogging(level); - // Send log output to system.log - Logger root = Logger.getRootLogger(); - final Appender appender = new TerminalAppender(); - appender.setLayout(new PatternLayout("[%t] %-5p %c - %m%n")); - root.addAppender(appender); + final LoggerContext ctx = (LoggerContext) LogManager.getContext(false); + final Configuration config = ctx.getConfiguration(); + final Appender appender = new TerminalAppender(PatternLayout.newBuilder().withConfiguration(config).withPattern("[%t] %-5p %c - %m%n").withCharset(StandardCharsets.UTF_8).build()); + appender.start(); + config.addAppender(appender); + final AppenderRef ref = AppenderRef.createAppenderRef("File", null, null); + final AppenderRef[] refs = new AppenderRef[]{ref}; + LoggerConfig loggerConfig = LoggerConfig.createLogger(false, Level.getLevel(level), LogManager.ROOT_LOGGER_NAME, + "true", refs, null, config, null); + loggerConfig.addAppender(appender, null, null); + config.addLogger(LogManager.ROOT_LOGGER_NAME, loggerConfig); + ctx.updateLoggers(); } @Override diff --git a/core/dylib/src/main/java/ch/cyberduck/core/ApplescriptTerminalService.java b/core/dylib/src/main/java/ch/cyberduck/core/ApplescriptTerminalService.java index 3dc374dfe6a..e0d82ea5338 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/ApplescriptTerminalService.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/ApplescriptTerminalService.java @@ -11,13 +11,14 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.ObjCObjectByReference; import java.text.MessageFormat; public class ApplescriptTerminalService implements TerminalService { - private static final Logger log = Logger.getLogger(ApplescriptTerminalService.class); + private static final Logger log = LogManager.getLogger(ApplescriptTerminalService.class); private final ApplicationFinder finder = ApplicationFinderFactory.get(); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/IOKitSleepPreventer.java b/core/dylib/src/main/java/ch/cyberduck/core/IOKitSleepPreventer.java index 48342c72fa0..e0b2fff88c1 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/IOKitSleepPreventer.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/IOKitSleepPreventer.java @@ -21,10 +21,11 @@ import ch.cyberduck.core.library.Native; import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public final class IOKitSleepPreventer implements SleepPreventer { - private static final Logger log = Logger.getLogger(IOKitSleepPreventer.class); + private static final Logger log = LogManager.getLogger(IOKitSleepPreventer.class); static { Native.load("core"); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/KeychainCertificateStore.java b/core/dylib/src/main/java/ch/cyberduck/core/KeychainCertificateStore.java index afdca81dd67..71cf231635f 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/KeychainCertificateStore.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/KeychainCertificateStore.java @@ -34,7 +34,8 @@ import ch.cyberduck.core.ssl.KeychainX509KeyManager; import org.apache.commons.codec.binary.Base64; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.cocoa.foundation.NSUInteger; import java.io.ByteArrayInputStream; @@ -50,7 +51,7 @@ import com.sun.jna.ptr.PointerByReference; public final class KeychainCertificateStore implements CertificateStore { - private static final Logger log = Logger.getLogger(KeychainCertificateStore.class); + private static final Logger log = LogManager.getLogger(KeychainCertificateStore.class); /** * @param certificates Chain of certificates diff --git a/core/dylib/src/main/java/ch/cyberduck/core/KeychainPasswordStore.java b/core/dylib/src/main/java/ch/cyberduck/core/KeychainPasswordStore.java index 3e2945a702a..56755859245 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/KeychainPasswordStore.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/KeychainPasswordStore.java @@ -23,7 +23,8 @@ import ch.cyberduck.core.keychain.SecKeychainItemRef; import ch.cyberduck.core.keychain.SecurityFunctions; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.nio.charset.StandardCharsets; @@ -33,7 +34,7 @@ import static ch.cyberduck.core.keychain.SecurityFunctions.*; public final class KeychainPasswordStore extends DefaultHostPasswordStore implements PasswordStore { - private static final Logger log = Logger.getLogger(KeychainPasswordStore.class); + private static final Logger log = LogManager.getLogger(KeychainPasswordStore.class); private static final Object lock = new Object(); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/diagnostics/SystemConfigurationReachability.java b/core/dylib/src/main/java/ch/cyberduck/core/diagnostics/SystemConfigurationReachability.java index 86eff38aabf..68fad9c6db0 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/diagnostics/SystemConfigurationReachability.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/diagnostics/SystemConfigurationReachability.java @@ -25,11 +25,12 @@ import ch.cyberduck.core.Host; import ch.cyberduck.core.idna.PunycodeConverter; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; public final class SystemConfigurationReachability implements Reachability { - private static final Logger log = Logger.getLogger(SystemConfigurationReachability.class); + private static final Logger log = LogManager.getLogger(SystemConfigurationReachability.class); private final NSNotificationCenter notificationCenter = NSNotificationCenter.defaultCenter(); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/editor/FSEventWatchEditor.java b/core/dylib/src/main/java/ch/cyberduck/core/editor/FSEventWatchEditor.java index 1650b412cc8..6bd1bfe28b8 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/editor/FSEventWatchEditor.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/editor/FSEventWatchEditor.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.local.FileWatcherListener; import ch.cyberduck.core.pool.SessionPool; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; @@ -37,7 +38,7 @@ * An editor listing for file system notifications on a particular folder */ public class FSEventWatchEditor extends AbstractEditor { - private static final Logger log = Logger.getLogger(FSEventWatchEditor.class); + private static final Logger log = LogManager.getLogger(FSEventWatchEditor.class); private final FileWatcher monitor = new FileWatcher(new FSEventWatchService()); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/i18n/BundleRegexLocale.java b/core/dylib/src/main/java/ch/cyberduck/core/i18n/BundleRegexLocale.java index 1c5758b601f..a3880d1c20f 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/i18n/BundleRegexLocale.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/i18n/BundleRegexLocale.java @@ -19,12 +19,13 @@ import org.apache.commons.lang3.LocaleUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.List; public class BundleRegexLocale extends BundleLocale { - private static final Logger log = Logger.getLogger(BundleRegexLocale.class.getName()); + private static final Logger log = LogManager.getLogger(BundleRegexLocale.class.getName()); /** * For lookup in *.strings.1 diff --git a/core/dylib/src/main/java/ch/cyberduck/core/importer/CloudMounterBookmarkCollection.java b/core/dylib/src/main/java/ch/cyberduck/core/importer/CloudMounterBookmarkCollection.java index f963eb25f3d..65f1aa55823 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/importer/CloudMounterBookmarkCollection.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/importer/CloudMounterBookmarkCollection.java @@ -28,12 +28,13 @@ import ch.cyberduck.core.serializer.impl.jna.PlistDeserializer; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.List; public class CloudMounterBookmarkCollection extends ThirdpartyBookmarkCollection { - private static final Logger log = Logger.getLogger(CloudMounterBookmarkCollection.class); + private static final Logger log = LogManager.getLogger(CloudMounterBookmarkCollection.class); @Override public String getName() { diff --git a/core/dylib/src/main/java/ch/cyberduck/core/importer/FetchBookmarkCollection.java b/core/dylib/src/main/java/ch/cyberduck/core/importer/FetchBookmarkCollection.java index 46ba7a3cff0..61483093408 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/importer/FetchBookmarkCollection.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/importer/FetchBookmarkCollection.java @@ -30,12 +30,13 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import ch.cyberduck.core.serializer.impl.jna.PlistDeserializer; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.List; public class FetchBookmarkCollection extends ThirdpartyBookmarkCollection { - private static final Logger log = Logger.getLogger(FetchBookmarkCollection.class); + private static final Logger log = LogManager.getLogger(FetchBookmarkCollection.class); private static final long serialVersionUID = -7544710198776572190L; diff --git a/core/dylib/src/main/java/ch/cyberduck/core/importer/FlowBookmarkCollection.java b/core/dylib/src/main/java/ch/cyberduck/core/importer/FlowBookmarkCollection.java index 590a50872ec..ff09cf8056d 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/importer/FlowBookmarkCollection.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/importer/FlowBookmarkCollection.java @@ -31,12 +31,13 @@ import ch.cyberduck.core.serializer.impl.jna.PlistDeserializer; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.List; public class FlowBookmarkCollection extends ThirdpartyBookmarkCollection { - private static final Logger log = Logger.getLogger(FlowBookmarkCollection.class); + private static final Logger log = LogManager.getLogger(FlowBookmarkCollection.class); private static final long serialVersionUID = 2017398431454618548L; diff --git a/core/dylib/src/main/java/ch/cyberduck/core/importer/InterarchyBookmarkCollection.java b/core/dylib/src/main/java/ch/cyberduck/core/importer/InterarchyBookmarkCollection.java index 99197fd43fa..62000ce2e87 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/importer/InterarchyBookmarkCollection.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/importer/InterarchyBookmarkCollection.java @@ -29,12 +29,13 @@ import ch.cyberduck.core.serializer.impl.jna.PlistDeserializer; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.List; public class InterarchyBookmarkCollection extends ThirdpartyBookmarkCollection { - private static final Logger log = Logger.getLogger(InterarchyBookmarkCollection.class); + private static final Logger log = LogManager.getLogger(InterarchyBookmarkCollection.class); private static final long serialVersionUID = 999209774019642938L; diff --git a/core/dylib/src/main/java/ch/cyberduck/core/importer/Transmit5BookmarkCollection.java b/core/dylib/src/main/java/ch/cyberduck/core/importer/Transmit5BookmarkCollection.java index 070876de8d2..27c88778c1c 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/importer/Transmit5BookmarkCollection.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/importer/Transmit5BookmarkCollection.java @@ -29,10 +29,11 @@ import ch.cyberduck.core.serializer.impl.jna.PlistDeserializer; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class Transmit5BookmarkCollection extends ThirdpartyBookmarkCollection { - private static final Logger log = Logger.getLogger(Transmit5BookmarkCollection.class); + private static final Logger log = LogManager.getLogger(Transmit5BookmarkCollection.class); private static final long serialVersionUID = 2422398644582883578L; diff --git a/core/dylib/src/main/java/ch/cyberduck/core/io/watchservice/FSEventWatchService.java b/core/dylib/src/main/java/ch/cyberduck/core/io/watchservice/FSEventWatchService.java index f2e06459607..ff392ba6ec6 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/io/watchservice/FSEventWatchService.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/io/watchservice/FSEventWatchService.java @@ -23,7 +23,8 @@ import ch.cyberduck.binding.foundation.CFStringRef; import ch.cyberduck.core.threading.NamedThreadFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.File; import java.io.IOException; @@ -54,7 +55,7 @@ * @author Steve McLeod */ public class FSEventWatchService extends AbstractWatchService { - private static final Logger log = Logger.getLogger(FSEventWatchService.class); + private static final Logger log = LogManager.getLogger(FSEventWatchService.class); private final FSEvents library = FSEvents.library; diff --git a/core/dylib/src/main/java/ch/cyberduck/core/local/AbstractPromptBookmarkResolver.java b/core/dylib/src/main/java/ch/cyberduck/core/local/AbstractPromptBookmarkResolver.java index 7cc070d95ae..ece10e201c7 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/local/AbstractPromptBookmarkResolver.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/local/AbstractPromptBookmarkResolver.java @@ -31,7 +31,8 @@ import ch.cyberduck.core.preferences.TemporarySupportDirectoryFinder; import ch.cyberduck.core.threading.DefaultMainAction; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.ObjCObjectByReference; import org.rococoa.Rococoa; import org.rococoa.cocoa.foundation.NSError; @@ -41,7 +42,7 @@ import java.util.concurrent.atomic.AtomicReference; public abstract class AbstractPromptBookmarkResolver implements FilesystemBookmarkResolver { - private static final Logger log = Logger.getLogger(AbstractPromptBookmarkResolver.class); + private static final Logger log = LogManager.getLogger(AbstractPromptBookmarkResolver.class); private final int create; private final int resolve; diff --git a/core/dylib/src/main/java/ch/cyberduck/core/local/FileManagerTrashFeature.java b/core/dylib/src/main/java/ch/cyberduck/core/local/FileManagerTrashFeature.java index e6bba31fd2b..c732d228335 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/local/FileManagerTrashFeature.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/local/FileManagerTrashFeature.java @@ -21,12 +21,13 @@ import ch.cyberduck.core.exception.LocalAccessDeniedException; import ch.cyberduck.core.local.features.Trash; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.ObjCObjectByReference; import org.rococoa.cocoa.foundation.NSError; public class FileManagerTrashFeature implements Trash { - private static final Logger log = Logger.getLogger(FileManagerTrashFeature.class); + private static final Logger log = LogManager.getLogger(FileManagerTrashFeature.class); @Override public void trash(final Local file) throws LocalAccessDeniedException { diff --git a/core/dylib/src/main/java/ch/cyberduck/core/local/FilesystemBookmarkResolverFactory.java b/core/dylib/src/main/java/ch/cyberduck/core/local/FilesystemBookmarkResolverFactory.java index eb8040fa868..c533b1a204b 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/local/FilesystemBookmarkResolverFactory.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/local/FilesystemBookmarkResolverFactory.java @@ -18,10 +18,11 @@ import ch.cyberduck.binding.foundation.NSURL; import ch.cyberduck.core.Factory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class FilesystemBookmarkResolverFactory extends Factory> { - private static final Logger log = Logger.getLogger(FilesystemBookmarkResolverFactory.class); + private static final Logger log = LogManager.getLogger(FilesystemBookmarkResolverFactory.class); public FilesystemBookmarkResolverFactory() { super("factory.bookmarkresolver.class"); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/local/FinderLocal.java b/core/dylib/src/main/java/ch/cyberduck/core/local/FinderLocal.java index d8168174787..753fd66647c 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/local/FinderLocal.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/local/FinderLocal.java @@ -32,7 +32,8 @@ import org.apache.commons.io.input.ProxyInputStream; import org.apache.commons.io.output.ProxyOutputStream; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import java.io.IOException; @@ -43,7 +44,7 @@ import java.nio.file.Paths; public class FinderLocal extends Local { - private static final Logger log = Logger.getLogger(FinderLocal.class); + private static final Logger log = LogManager.getLogger(FinderLocal.class); static { Native.load("core"); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/local/FinderLocalAttributes.java b/core/dylib/src/main/java/ch/cyberduck/core/local/FinderLocalAttributes.java index b8045f9ae46..caef4410d39 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/local/FinderLocalAttributes.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/local/FinderLocalAttributes.java @@ -31,7 +31,8 @@ import ch.cyberduck.core.exception.LocalNotfoundException; import ch.cyberduck.core.exception.NotfoundException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.ObjCObjectByReference; import org.rococoa.Rococoa; import org.rococoa.cocoa.foundation.NSError; @@ -42,7 +43,7 @@ * @see ch.cyberduck.binding.foundation.NSFileManager */ public class FinderLocalAttributes extends LocalAttributes { - private static final Logger log = Logger.getLogger(FinderLocalAttributes.class); + private static final Logger log = LogManager.getLogger(FinderLocalAttributes.class); private final FinderLocal local; diff --git a/core/dylib/src/main/java/ch/cyberduck/core/local/FinderSidebarService.java b/core/dylib/src/main/java/ch/cyberduck/core/local/FinderSidebarService.java index 394d76fa98d..dd0dad3d3c3 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/local/FinderSidebarService.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/local/FinderSidebarService.java @@ -21,10 +21,11 @@ import ch.cyberduck.core.exception.LocalAccessDeniedException; import ch.cyberduck.core.library.Native; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class FinderSidebarService implements SidebarService { - private static final Logger log = Logger.getLogger(FinderSidebarService.class); + private static final Logger log = LogManager.getLogger(FinderSidebarService.class); static { Native.load("core"); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/local/LaunchServicesApplicationFinder.java b/core/dylib/src/main/java/ch/cyberduck/core/local/LaunchServicesApplicationFinder.java index 0c21a14b6a9..29d63d26fcd 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/local/LaunchServicesApplicationFinder.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/local/LaunchServicesApplicationFinder.java @@ -29,14 +29,15 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.Collections; import java.util.List; public final class LaunchServicesApplicationFinder implements ApplicationFinder { - private static final Logger log = Logger.getLogger(LaunchServicesApplicationFinder.class); + private static final Logger log = LogManager.getLogger(LaunchServicesApplicationFinder.class); static { Native.load("core"); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/local/LaunchServicesQuarantineService.java b/core/dylib/src/main/java/ch/cyberduck/core/local/LaunchServicesQuarantineService.java index 91aa977ecbf..3bcd2555974 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/local/LaunchServicesQuarantineService.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/local/LaunchServicesQuarantineService.java @@ -23,10 +23,11 @@ import ch.cyberduck.core.library.Native; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public final class LaunchServicesQuarantineService implements QuarantineService { - private static final Logger log = Logger.getLogger(LaunchServicesQuarantineService.class); + private static final Logger log = LogManager.getLogger(LaunchServicesQuarantineService.class); static { Native.load("core"); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/local/WorkspaceApplicationLauncher.java b/core/dylib/src/main/java/ch/cyberduck/core/local/WorkspaceApplicationLauncher.java index bdffe941f62..26ded850b60 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/local/WorkspaceApplicationLauncher.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/local/WorkspaceApplicationLauncher.java @@ -25,14 +25,15 @@ import ch.cyberduck.core.Local; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import java.util.HashMap; import java.util.Map; public final class WorkspaceApplicationLauncher implements ApplicationLauncher { - private static final Logger log = Logger.getLogger(WorkspaceApplicationLauncher.class); + private static final Logger log = LogManager.getLogger(WorkspaceApplicationLauncher.class); private final NSWorkspace workspace = NSWorkspace.sharedWorkspace(); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/local/WorkspaceBrowserLauncher.java b/core/dylib/src/main/java/ch/cyberduck/core/local/WorkspaceBrowserLauncher.java index 6b1452066d5..12ec65b4f48 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/local/WorkspaceBrowserLauncher.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/local/WorkspaceBrowserLauncher.java @@ -22,10 +22,11 @@ import ch.cyberduck.binding.foundation.NSURL; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class WorkspaceBrowserLauncher implements BrowserLauncher { - private static final Logger log = Logger.getLogger(WorkspaceBrowserLauncher.class); + private static final Logger log = LogManager.getLogger(WorkspaceBrowserLauncher.class); private final NSWorkspace workspace = NSWorkspace.sharedWorkspace(); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/local/WorkspaceSymlinkFeature.java b/core/dylib/src/main/java/ch/cyberduck/core/local/WorkspaceSymlinkFeature.java index 039c23953a8..fe5bbc2a64e 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/local/WorkspaceSymlinkFeature.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/local/WorkspaceSymlinkFeature.java @@ -24,12 +24,13 @@ import ch.cyberduck.core.exception.LocalAccessDeniedException; import ch.cyberduck.core.local.features.Symlink; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.ObjCObjectByReference; import org.rococoa.cocoa.foundation.NSError; public class WorkspaceSymlinkFeature implements Symlink { - private static final Logger log = Logger.getLogger(WorkspaceSymlinkFeature.class); + private static final Logger log = LogManager.getLogger(WorkspaceSymlinkFeature.class); @Override public void symlink(final Local file, final String target) throws AccessDeniedException { diff --git a/core/dylib/src/main/java/ch/cyberduck/core/local/WorkspaceTrashFeature.java b/core/dylib/src/main/java/ch/cyberduck/core/local/WorkspaceTrashFeature.java index 55d868616d9..e825f161b5f 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/local/WorkspaceTrashFeature.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/local/WorkspaceTrashFeature.java @@ -25,10 +25,11 @@ import ch.cyberduck.core.unicode.NFDNormalizer; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class WorkspaceTrashFeature implements Trash { - private static final Logger log = Logger.getLogger(WorkspaceTrashFeature.class); + private static final Logger log = LogManager.getLogger(WorkspaceTrashFeature.class); private final NSWorkspace workspace = NSWorkspace.sharedWorkspace(); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/logging/SystemLogAppender.java b/core/dylib/src/main/java/ch/cyberduck/core/logging/SystemLogAppender.java index 9455f93cf31..c6f75424dbb 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/logging/SystemLogAppender.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/logging/SystemLogAppender.java @@ -20,11 +20,15 @@ import ch.cyberduck.binding.foundation.FoundationKitFunctions; -import org.apache.log4j.AppenderSkeleton; -import org.apache.log4j.Layout; -import org.apache.log4j.spi.LoggingEvent; +import org.apache.commons.lang3.exception.ExceptionUtils; +import org.apache.logging.log4j.core.Layout; +import org.apache.logging.log4j.core.LogEvent; +import org.apache.logging.log4j.core.appender.AbstractAppender; +import org.apache.logging.log4j.core.config.Property; +import org.apache.logging.log4j.util.Strings; import org.rococoa.internal.RococoaTypeMapper; +import java.nio.charset.StandardCharsets; import java.util.Collections; import com.sun.jna.Library; @@ -33,37 +37,33 @@ /** * Redirect to NSLog(). Logs an error message to the Apple System Log facility. */ -public class SystemLogAppender extends AppenderSkeleton { +public class SystemLogAppender extends AbstractAppender { private static final FoundationKitFunctions library = Native.load( "Foundation", FoundationKitFunctions.class, Collections.singletonMap(Library.OPTION_TYPE_MAPPER, new RococoaTypeMapper())); + public SystemLogAppender(final Layout layout) { + super(SystemLogAppender.class.getName(), null, layout, true, Property.EMPTY_ARRAY); + } + @Override - protected void append(final LoggingEvent event) { + public void append(final LogEvent event) { if(null == event.getMessage()) { return; } final StringBuilder buffer = new StringBuilder(); - buffer.append(layout.format(event)); - if(layout.ignoresThrowable()) { - final String[] trace = event.getThrowableStrRep(); - if(trace != null) { - buffer.append(Layout.LINE_SEP); + buffer.append(new String(getLayout().toByteArray(event), StandardCharsets.UTF_8)); + if(ignoreExceptions()) { + + final Throwable thrown = event.getThrown(); + if(thrown != null) { + buffer.append(Strings.LINE_SEPARATOR); + final String[] trace = ExceptionUtils.getStackFrames(thrown); for(final String t : trace) { - buffer.append(t).append(Layout.LINE_SEP); + buffer.append(t).append(Strings.LINE_SEPARATOR); } } } library.NSLog("%@", buffer.toString()); } - - @Override - public void close() { - // - } - - @Override - public boolean requiresLayout() { - return true; - } } diff --git a/core/dylib/src/main/java/ch/cyberduck/core/logging/UnifiedSystemLogAppender.java b/core/dylib/src/main/java/ch/cyberduck/core/logging/UnifiedSystemLogAppender.java index c6eff4c37de..38942b4879f 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/logging/UnifiedSystemLogAppender.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/logging/UnifiedSystemLogAppender.java @@ -17,14 +17,16 @@ import ch.cyberduck.core.library.Native; -import org.apache.log4j.AppenderSkeleton; -import org.apache.log4j.Level; -import org.apache.log4j.spi.LoggingEvent; +import org.apache.commons.lang3.exception.ExceptionUtils; +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.core.LogEvent; +import org.apache.logging.log4j.core.appender.AbstractAppender; +import org.apache.logging.log4j.core.config.Property; /** * Redirect to NSLog(). Logs an error message to the Apple System Log facility. */ -public class UnifiedSystemLogAppender extends AppenderSkeleton { +public class UnifiedSystemLogAppender extends AbstractAppender { static { Native.load("core"); @@ -69,34 +71,35 @@ public class UnifiedSystemLogAppender extends AppenderSkeleton { */ public static final int OS_LOG_TYPE_FAULT = 0x11; + public UnifiedSystemLogAppender() { + super(UnifiedSystemLogAppender.class.getName(), null, null, true, Property.EMPTY_ARRAY); + } + @Override - protected void append(final LoggingEvent event) { + public void append(final LogEvent event) { if(null == event.getMessage()) { return; } // Category name - final String logger = String.format("%s %s", event.getThreadName(), event.getLogger().getName()); - switch(event.getLevel().toInt()) { - case Level.FATAL_INT: - case Level.ERROR_INT: - this.log(OS_LOG_TYPE_ERROR, logger, event.getMessage().toString()); - break; - case Level.TRACE_INT: - this.log(OS_LOG_TYPE_DEBUG, logger, event.getMessage().toString()); - break; - case Level.DEBUG_INT: - case Level.INFO_INT: - this.log(OS_LOG_TYPE_INFO, logger, event.getMessage().toString()); - break; - case Level.WARN_INT: - default: - this.log(OS_LOG_TYPE_DEFAULT, logger, event.getMessage().toString()); - break; + final String logger = String.format("%s %s", event.getThreadName(), event.getLoggerName()); + Level level = event.getLevel(); + if(Level.FATAL.equals(level) || Level.ERROR.equals(level)) { + this.log(OS_LOG_TYPE_ERROR, logger, event.getMessage().toString()); + } + else if(Level.TRACE.equals(level)) { + this.log(OS_LOG_TYPE_DEBUG, logger, event.getMessage().toString()); } - if(layout.ignoresThrowable()) { + else if(Level.DEBUG.equals(level) || Level.INFO.equals(level)) { + this.log(OS_LOG_TYPE_INFO, logger, event.getMessage().toString()); + } + else { + this.log(OS_LOG_TYPE_DEFAULT, logger, event.getMessage().toString()); + } + if(ignoreExceptions()) { // Appender responsible for rendering - final String[] trace = event.getThrowableStrRep(); - if(trace != null) { + final Throwable thrown = event.getThrown(); + if(thrown != null) { + final String[] trace = ExceptionUtils.getStackFrames(thrown); for(final String t : trace) { this.log(OS_LOG_TYPE_DEFAULT, logger, t); } @@ -105,15 +108,5 @@ protected void append(final LoggingEvent event) { } public native void log(int type, String category, String message); - - @Override - public void close() { - // - } - - @Override - public boolean requiresLayout() { - return true; - } } diff --git a/core/dylib/src/main/java/ch/cyberduck/core/notification/NotificationCenter.java b/core/dylib/src/main/java/ch/cyberduck/core/notification/NotificationCenter.java index e3e0ba9a1b1..9f74bc48215 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/notification/NotificationCenter.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/notification/NotificationCenter.java @@ -28,7 +28,8 @@ import ch.cyberduck.core.resources.IconCacheFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import java.util.Collections; @@ -36,7 +37,7 @@ import java.util.Set; public class NotificationCenter extends ProxyController implements NotificationService, NSUserNotificationCenter.Delegate { - private static final Logger log = Logger.getLogger(NotificationCenter.class); + private static final Logger log = LogManager.getLogger(NotificationCenter.class); /** * Methods involve talking to a server process, so calling them repeatedly can have a negative effect on diff --git a/core/dylib/src/main/java/ch/cyberduck/core/preferences/ApplicationSupportDirectoryFinder.java b/core/dylib/src/main/java/ch/cyberduck/core/preferences/ApplicationSupportDirectoryFinder.java index 7002b4b95f8..b8046cfe450 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/preferences/ApplicationSupportDirectoryFinder.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/preferences/ApplicationSupportDirectoryFinder.java @@ -23,11 +23,12 @@ import ch.cyberduck.core.Local; import ch.cyberduck.core.local.FinderLocal; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.cocoa.foundation.NSUInteger; public class ApplicationSupportDirectoryFinder implements SupportDirectoryFinder { - private static final Logger log = Logger.getLogger(ApplicationSupportDirectoryFinder.class); + private static final Logger log = LogManager.getLogger(ApplicationSupportDirectoryFinder.class); private final Preferences preferences = PreferencesFactory.get(); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/preferences/BundleApplicationResourcesFinder.java b/core/dylib/src/main/java/ch/cyberduck/core/preferences/BundleApplicationResourcesFinder.java index 04e05d02115..21bc8206b7c 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/preferences/BundleApplicationResourcesFinder.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/preferences/BundleApplicationResourcesFinder.java @@ -25,10 +25,11 @@ import ch.cyberduck.core.local.FinderLocal; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class BundleApplicationResourcesFinder implements ApplicationResourcesFinder { - private static final Logger log = Logger.getLogger(BundleApplicationResourcesFinder.class); + private static final Logger log = LogManager.getLogger(BundleApplicationResourcesFinder.class); private NSBundle cached; diff --git a/core/dylib/src/main/java/ch/cyberduck/core/preferences/LibraryLogDirectoryFinder.java b/core/dylib/src/main/java/ch/cyberduck/core/preferences/LibraryLogDirectoryFinder.java index 7dda7cf8426..3d4b5ec3d02 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/preferences/LibraryLogDirectoryFinder.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/preferences/LibraryLogDirectoryFinder.java @@ -20,11 +20,12 @@ import ch.cyberduck.core.Local; import ch.cyberduck.core.local.FinderLocal; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.cocoa.foundation.NSUInteger; public class LibraryLogDirectoryFinder implements LogDirectoryFinder { - private static final Logger log = Logger.getLogger(LibraryLogDirectoryFinder.class); + private static final Logger log = LogManager.getLogger(LibraryLogDirectoryFinder.class); private final Preferences preferences = PreferencesFactory.get(); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/preferences/SecurityApplicationGroupSupportDirectoryFinder.java b/core/dylib/src/main/java/ch/cyberduck/core/preferences/SecurityApplicationGroupSupportDirectoryFinder.java index a84b72955cd..37719ffd4e5 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/preferences/SecurityApplicationGroupSupportDirectoryFinder.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/preferences/SecurityApplicationGroupSupportDirectoryFinder.java @@ -29,14 +29,15 @@ import ch.cyberduck.core.local.features.Trash; import org.apache.commons.io.FileUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import java.io.File; import java.io.IOException; public class SecurityApplicationGroupSupportDirectoryFinder implements SupportDirectoryFinder { - private static final Logger log = Logger.getLogger(SecurityApplicationGroupSupportDirectoryFinder.class); + private static final Logger log = LogManager.getLogger(SecurityApplicationGroupSupportDirectoryFinder.class); private final String identifier; diff --git a/core/dylib/src/main/java/ch/cyberduck/core/preferences/ServiceManagementApplicationLoginRegistry.java b/core/dylib/src/main/java/ch/cyberduck/core/preferences/ServiceManagementApplicationLoginRegistry.java index ff6c4c3f8d8..5c5d143a2f5 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/preferences/ServiceManagementApplicationLoginRegistry.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/preferences/ServiceManagementApplicationLoginRegistry.java @@ -23,10 +23,11 @@ import ch.cyberduck.core.local.FinderLocal; import ch.cyberduck.core.local.LaunchServicesApplicationFinder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class ServiceManagementApplicationLoginRegistry implements ApplicationLoginRegistry { - private static final Logger log = Logger.getLogger(ServiceManagementApplicationLoginRegistry.class); + private static final Logger log = LogManager.getLogger(ServiceManagementApplicationLoginRegistry.class); private final LaunchServicesApplicationFinder finder = new LaunchServicesApplicationFinder(); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/preferences/UserDefaultsPreferences.java b/core/dylib/src/main/java/ch/cyberduck/core/preferences/UserDefaultsPreferences.java index 37fc9a81374..de273489be8 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/preferences/UserDefaultsPreferences.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/preferences/UserDefaultsPreferences.java @@ -33,7 +33,8 @@ import ch.cyberduck.core.sparkle.Sandbox; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Rococoa; import java.util.ArrayList; @@ -49,7 +50,7 @@ * @see ch.cyberduck.binding.foundation.NSUserDefaults */ public class UserDefaultsPreferences extends DefaultPreferences { - private static final Logger log = Logger.getLogger(UserDefaultsPreferences.class); + private static final Logger log = LogManager.getLogger(UserDefaultsPreferences.class); private final NSBundle bundle = new BundleApplicationResourcesFinder().bundle(); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/proxy/SystemConfigurationProxy.java b/core/dylib/src/main/java/ch/cyberduck/core/proxy/SystemConfigurationProxy.java index 4f9f1731d03..2eb7940030e 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/proxy/SystemConfigurationProxy.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/proxy/SystemConfigurationProxy.java @@ -23,13 +23,14 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.net.URI; import java.net.URISyntaxException; public final class SystemConfigurationProxy extends AbstractProxyFinder implements ProxyFinder { - private static final Logger log = Logger.getLogger(SystemConfigurationProxy.class); + private static final Logger log = LogManager.getLogger(SystemConfigurationProxy.class); static { Native.load("core"); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/quicklook/QuartzQuickLook.java b/core/dylib/src/main/java/ch/cyberduck/core/quicklook/QuartzQuickLook.java index 99ecfcfbea0..ef76f046724 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/quicklook/QuartzQuickLook.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/quicklook/QuartzQuickLook.java @@ -22,7 +22,8 @@ import ch.cyberduck.core.Local; import ch.cyberduck.ui.quicklook.QuickLook; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.ID; import org.rococoa.cocoa.foundation.NSInteger; @@ -30,7 +31,7 @@ import java.util.List; public final class QuartzQuickLook implements QuickLook { - private static final Logger log = Logger.getLogger(QuartzQuickLook.class); + private static final Logger log = LogManager.getLogger(QuartzQuickLook.class); private final List previews = new ArrayList(); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/resources/NSImageIconCache.java b/core/dylib/src/main/java/ch/cyberduck/core/resources/NSImageIconCache.java index 3cb4938633c..827e9d96a77 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/resources/NSImageIconCache.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/resources/NSImageIconCache.java @@ -28,13 +28,14 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.cocoa.foundation.NSPoint; import org.rococoa.cocoa.foundation.NSRect; import org.rococoa.cocoa.foundation.NSSize; public class NSImageIconCache implements IconCache { - private static final Logger log = Logger.getLogger(NSImageIconCache.class); + private static final Logger log = LogManager.getLogger(NSImageIconCache.class); private final static NSRect NSZeroRect = new NSRect(0, 0); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/serializer/impl/jna/PlistDeserializer.java b/core/dylib/src/main/java/ch/cyberduck/core/serializer/impl/jna/PlistDeserializer.java index a1b28bf2b3f..b9f10264f96 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/serializer/impl/jna/PlistDeserializer.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/serializer/impl/jna/PlistDeserializer.java @@ -25,7 +25,8 @@ import ch.cyberduck.binding.foundation.NSString; import ch.cyberduck.core.serializer.Deserializer; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Rococoa; import java.util.ArrayList; @@ -34,7 +35,7 @@ import java.util.Map; public class PlistDeserializer implements Deserializer { - private static final Logger log = Logger.getLogger(PlistDeserializer.class); + private static final Logger log = LogManager.getLogger(PlistDeserializer.class); final NSDictionary dict; diff --git a/core/dylib/src/main/java/ch/cyberduck/core/serializer/impl/jna/PlistReader.java b/core/dylib/src/main/java/ch/cyberduck/core/serializer/impl/jna/PlistReader.java index 750a1d9f918..2d7ccdea43d 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/serializer/impl/jna/PlistReader.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/serializer/impl/jna/PlistReader.java @@ -29,11 +29,12 @@ import ch.cyberduck.core.exception.LocalAccessDeniedException; import ch.cyberduck.core.serializer.Reader; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Rococoa; public abstract class PlistReader implements Reader { - private static final Logger log = Logger.getLogger(PlistReader.class); + private static final Logger log = LogManager.getLogger(PlistReader.class); @Override public Collection readCollection(final Local file) throws AccessDeniedException { diff --git a/core/dylib/src/main/java/ch/cyberduck/core/sparkle/Sandbox.java b/core/dylib/src/main/java/ch/cyberduck/core/sparkle/Sandbox.java index 85e24b5bc5a..0698b26a241 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/sparkle/Sandbox.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/sparkle/Sandbox.java @@ -20,10 +20,11 @@ import ch.cyberduck.core.library.Native; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public final class Sandbox { - private static final Logger log = Logger.getLogger(Sandbox.class); + private static final Logger log = LogManager.getLogger(Sandbox.class); static { Native.load("core"); diff --git a/core/dylib/src/main/java/ch/cyberduck/core/urlhandler/LaunchServicesSchemeHandler.java b/core/dylib/src/main/java/ch/cyberduck/core/urlhandler/LaunchServicesSchemeHandler.java index d5827df4f2a..b9663d92062 100644 --- a/core/dylib/src/main/java/ch/cyberduck/core/urlhandler/LaunchServicesSchemeHandler.java +++ b/core/dylib/src/main/java/ch/cyberduck/core/urlhandler/LaunchServicesSchemeHandler.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.local.ApplicationFinder; import ch.cyberduck.core.local.ApplicationFinderFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.ObjCObjectByReference; import org.rococoa.Rococoa; @@ -38,7 +39,7 @@ * A wrapper for the handler functions in ApplicationServices.h */ public final class LaunchServicesSchemeHandler extends AbstractSchemeHandler { - private static final Logger log = Logger.getLogger(LaunchServicesSchemeHandler.class); + private static final Logger log = LogManager.getLogger(LaunchServicesSchemeHandler.class); static { Native.load("core"); diff --git a/core/dylib/src/test/java/ch/cyberduck/core/logging/SystemLogAppenderTest.java b/core/dylib/src/test/java/ch/cyberduck/core/logging/SystemLogAppenderTest.java index 109cbd43244..445c0a45209 100644 --- a/core/dylib/src/test/java/ch/cyberduck/core/logging/SystemLogAppenderTest.java +++ b/core/dylib/src/test/java/ch/cyberduck/core/logging/SystemLogAppenderTest.java @@ -1,18 +1,16 @@ package ch.cyberduck.core.logging; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.apache.log4j.SimpleLayout; -import org.apache.log4j.spi.LoggingEvent; +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.core.impl.Log4jLogEvent; +import org.apache.logging.log4j.core.layout.PatternLayout; +import org.apache.logging.log4j.message.SimpleMessage; import org.junit.Test; public class SystemLogAppenderTest { @Test public void testAppend() { - final SystemLogAppender a = new SystemLogAppender(); - a.setLayout(new SimpleLayout()); - a.append(new LoggingEvent("f", Logger.getLogger(SystemLogAppender.class), - Level.ERROR, "Test", new RuntimeException())); + final SystemLogAppender a = new SystemLogAppender(PatternLayout.newBuilder().withPattern("%level - %m%n").build()); + a.append(new Log4jLogEvent.Builder().setLoggerName(SystemLogAppender.class.getCanonicalName()).setLevel(Level.ERROR).setThrown(new RuntimeException()).setMessage(new SimpleMessage("Test")).build()); } } diff --git a/core/dylib/src/test/java/ch/cyberduck/core/logging/UnifiedSystemLogAppenderTest.java b/core/dylib/src/test/java/ch/cyberduck/core/logging/UnifiedSystemLogAppenderTest.java index 2c3ec144f7b..ad9568001a6 100644 --- a/core/dylib/src/test/java/ch/cyberduck/core/logging/UnifiedSystemLogAppenderTest.java +++ b/core/dylib/src/test/java/ch/cyberduck/core/logging/UnifiedSystemLogAppenderTest.java @@ -15,10 +15,9 @@ * GNU General Public License for more details. */ -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.apache.log4j.SimpleLayout; -import org.apache.log4j.spi.LoggingEvent; +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.core.impl.Log4jLogEvent; +import org.apache.logging.log4j.message.SimpleMessage; import org.junit.Test; public class UnifiedSystemLogAppenderTest { @@ -26,17 +25,13 @@ public class UnifiedSystemLogAppenderTest { @Test public void testAppend() { final UnifiedSystemLogAppender a = new UnifiedSystemLogAppender(); - a.setLayout(new SimpleLayout()); - a.append(new LoggingEvent("f", Logger.getLogger(UnifiedSystemLogAppender.class), - Level.DEBUG, "Test", new RuntimeException())); - a.append(new LoggingEvent("f", Logger.getLogger(UnifiedSystemLogAppender.class), - Level.ERROR, "Test", new RuntimeException())); + a.append(new Log4jLogEvent.Builder().setLoggerName(UnifiedSystemLogAppender.class.getCanonicalName()).setLevel(Level.DEBUG).setThrown(new RuntimeException()).setMessage(new SimpleMessage("Test")).build()); + a.append(new Log4jLogEvent.Builder().setLoggerName(UnifiedSystemLogAppender.class.getCanonicalName()).setLevel(Level.ERROR).setThrown(new RuntimeException()).setMessage(new SimpleMessage("Test")).build()); } @Test public void testAppend유준환() { final UnifiedSystemLogAppender a = new UnifiedSystemLogAppender(); - a.setLayout(new SimpleLayout()); a.log(UnifiedSystemLogAppender.OS_LOG_TYPE_INFO, "http-유준환.txt-1", "유준환"); } } diff --git a/core/native/refresh/src/main/csharp/ViewModels/Preferences/Pages/ProfilesViewModel.cs b/core/native/refresh/src/main/csharp/ViewModels/Preferences/Pages/ProfilesViewModel.cs index 530680bae16..805cdc45952 100644 --- a/core/native/refresh/src/main/csharp/ViewModels/Preferences/Pages/ProfilesViewModel.cs +++ b/core/native/refresh/src/main/csharp/ViewModels/Preferences/Pages/ProfilesViewModel.cs @@ -3,7 +3,7 @@ using Ch.Cyberduck.Core.Refresh.Services; using DynamicData; using DynamicData.Binding; -using org.apache.log4j; +using org.apache.logging.log4j; using ReactiveUI; using ReactiveUI.Fody.Helpers; using System; @@ -21,7 +21,7 @@ namespace Ch.Cyberduck.Core.Refresh.ViewModels.Preferences.Pages public class ProfilesViewModel : ReactiveObject { - private static Logger log = Logger.getLogger(typeof(ProfilesViewModel).FullName); + private static Logger log = LogManager.getLogger(typeof(ProfilesViewModel).FullName); private readonly Dictionary installed = new(); diff --git a/core/pom.xml b/core/pom.xml index b114c58f32e..2d107e8bba9 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -97,8 +97,8 @@ slf4j-api - org.slf4j - slf4j-log4j12 + org.apache.logging.log4j + log4j-slf4j-impl org.slf4j diff --git a/core/src/main/csharp/ch/cyberduck/core/CredentialManagerPasswordStore.cs b/core/src/main/csharp/ch/cyberduck/core/CredentialManagerPasswordStore.cs index 8758587be24..c79c88779fe 100644 --- a/core/src/main/csharp/ch/cyberduck/core/CredentialManagerPasswordStore.cs +++ b/core/src/main/csharp/ch/cyberduck/core/CredentialManagerPasswordStore.cs @@ -19,7 +19,7 @@ using ch.cyberduck.core; using ch.cyberduck.core.exception; using Ch.Cyberduck.Core.CredentialManager; -using org.apache.log4j; +using org.apache.logging.log4j; using System; using System.Collections.Generic; using System.Linq; @@ -31,7 +31,7 @@ namespace Ch.Cyberduck.Core { public class CredentialManagerPasswordStore : DefaultHostPasswordStore { - private static Logger logger = Logger.getLogger(typeof(CredentialManagerPasswordStore).FullName); + private static Logger logger = LogManager.getLogger(typeof(CredentialManagerPasswordStore).FullName); private readonly HostUrlProvider hostUrlProvider = new HostUrlProvider(); diff --git a/core/src/main/csharp/ch/cyberduck/core/DataProtector.cs b/core/src/main/csharp/ch/cyberduck/core/DataProtector.cs index 614fd809664..e44f20a5987 100644 --- a/core/src/main/csharp/ch/cyberduck/core/DataProtector.cs +++ b/core/src/main/csharp/ch/cyberduck/core/DataProtector.cs @@ -19,13 +19,13 @@ using System; using System.Security.Cryptography; using System.Text; -using org.apache.log4j; +using org.apache.logging.log4j; namespace Ch.Cyberduck.Core { public class DataProtector { - private static readonly Logger Log = Logger.getLogger(typeof (DataProtector).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof (DataProtector).FullName); public static string Encrypt(string data) { @@ -57,4 +57,4 @@ public static string Decrypt(string base64) } } } -} \ No newline at end of file +} diff --git a/core/src/main/csharp/ch/cyberduck/core/DataProtectorPasswordStore.cs b/core/src/main/csharp/ch/cyberduck/core/DataProtectorPasswordStore.cs index 95c8a8f31dc..e0205e5a501 100644 --- a/core/src/main/csharp/ch/cyberduck/core/DataProtectorPasswordStore.cs +++ b/core/src/main/csharp/ch/cyberduck/core/DataProtectorPasswordStore.cs @@ -19,13 +19,13 @@ using System; using ch.cyberduck.core; using ch.cyberduck.core.preferences; -using org.apache.log4j; +using org.apache.logging.log4j; namespace Ch.Cyberduck.Core { public class DataProtectorPasswordStore : DefaultHostPasswordStore { - private static readonly Logger Log = Logger.getLogger(typeof(DataProtectorPasswordStore).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof(DataProtectorPasswordStore).FullName); // Login Password public override void addPassword(Scheme scheme, int port, String hostname, String user, String password) diff --git a/core/src/main/csharp/ch/cyberduck/core/PasswordStoreFacade.cs b/core/src/main/csharp/ch/cyberduck/core/PasswordStoreFacade.cs index 722a39f509c..606fda0cf95 100644 --- a/core/src/main/csharp/ch/cyberduck/core/PasswordStoreFacade.cs +++ b/core/src/main/csharp/ch/cyberduck/core/PasswordStoreFacade.cs @@ -17,7 +17,7 @@ // using ch.cyberduck.core; -using org.apache.log4j; +using org.apache.logging.log4j; using System; using System.Collections.Generic; using System.Linq; @@ -28,7 +28,7 @@ namespace Ch.Cyberduck.Core { public class PasswordStoreFacade : DefaultHostPasswordStore { - private readonly Logger logger = Logger.getLogger(typeof(PasswordStoreFacade).AssemblyQualifiedName); + private readonly Logger logger = LogManager.getLogger(typeof(PasswordStoreFacade).AssemblyQualifiedName); private readonly CredentialManagerPasswordStore credentialManagerPasswordStore = new CredentialManagerPasswordStore(); private readonly DataProtectorPasswordStore dataProtectorPasswordStore = new DataProtectorPasswordStore(); diff --git a/core/src/main/csharp/ch/cyberduck/core/SshTerminalService.cs b/core/src/main/csharp/ch/cyberduck/core/SshTerminalService.cs index 3cbe923467f..abd1a68c4ae 100644 --- a/core/src/main/csharp/ch/cyberduck/core/SshTerminalService.cs +++ b/core/src/main/csharp/ch/cyberduck/core/SshTerminalService.cs @@ -19,7 +19,7 @@ using ch.cyberduck.core; using ch.cyberduck.core.local; using ch.cyberduck.core.preferences; -using org.apache.log4j; +using org.apache.logging.log4j; using System; using System.Diagnostics; using System.IO; @@ -34,7 +34,7 @@ namespace Ch.Cyberduck.Core { public class SshTerminalService : TerminalService { - private static Logger logger = Logger.getLogger(typeof(SshTerminalService).FullName); + private static Logger logger = LogManager.getLogger(typeof(SshTerminalService).FullName); public void open(Host host, ch.cyberduck.core.Path workdir) { diff --git a/core/src/main/csharp/ch/cyberduck/core/SystemCertificateStore.cs b/core/src/main/csharp/ch/cyberduck/core/SystemCertificateStore.cs index e19f5454230..865c89f1eb3 100644 --- a/core/src/main/csharp/ch/cyberduck/core/SystemCertificateStore.cs +++ b/core/src/main/csharp/ch/cyberduck/core/SystemCertificateStore.cs @@ -28,14 +28,14 @@ using java.security; using java.security.cert; using java.util; -using org.apache.log4j; +using org.apache.logging.log4j; using X509Certificate = java.security.cert.X509Certificate; namespace Ch.Cyberduck.Core { public class SystemCertificateStore : CertificateStore { - private static readonly Logger Log = Logger.getLogger(typeof(SystemCertificateStore).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof(SystemCertificateStore).FullName); public X509Certificate choose(CertificateIdentityCallback prompt, string[] keyTypes, Principal[] issuers, Host bookmark) { diff --git a/core/src/main/csharp/ch/cyberduck/core/Utils.cs b/core/src/main/csharp/ch/cyberduck/core/Utils.cs index 44ffe6070d0..a6c214e518e 100644 --- a/core/src/main/csharp/ch/cyberduck/core/Utils.cs +++ b/core/src/main/csharp/ch/cyberduck/core/Utils.cs @@ -31,7 +31,7 @@ using java.util; using Microsoft.Win32; using org.apache.commons.io; -using org.apache.log4j; +using org.apache.logging.log4j; using Collection = java.util.Collection; using Path = ch.cyberduck.core.Path; @@ -104,7 +104,7 @@ public static bool IsRunningAsUWP } } - private static readonly Logger Log = Logger.getLogger(typeof (Utils).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof (Utils).FullName); public static bool IsBlank(string value) { diff --git a/core/src/main/csharp/ch/cyberduck/core/credentialmanager/WinCredentialManager.cs b/core/src/main/csharp/ch/cyberduck/core/credentialmanager/WinCredentialManager.cs index bfe865a962f..a0256212a4a 100644 --- a/core/src/main/csharp/ch/cyberduck/core/credentialmanager/WinCredentialManager.cs +++ b/core/src/main/csharp/ch/cyberduck/core/credentialmanager/WinCredentialManager.cs @@ -16,7 +16,7 @@ // feedback@cyberduck.io // -using org.apache.log4j; +using org.apache.logging.log4j; using System; using System.ComponentModel; using System.Diagnostics; @@ -30,7 +30,7 @@ namespace Ch.Cyberduck.Core.CredentialManager public static class WinCredentialManager { - private static readonly Logger log = Logger.getLogger(typeof(WinCredentialManager).AssemblyQualifiedName); + private static readonly Logger log = LogManager.getLogger(typeof(WinCredentialManager).AssemblyQualifiedName); /// /// Saves teh given Network Credential into Windows Credential store diff --git a/core/src/main/csharp/ch/cyberduck/core/diagnostics/TcpReachability.cs b/core/src/main/csharp/ch/cyberduck/core/diagnostics/TcpReachability.cs index 47873f940c8..e3ecf7151d7 100644 --- a/core/src/main/csharp/ch/cyberduck/core/diagnostics/TcpReachability.cs +++ b/core/src/main/csharp/ch/cyberduck/core/diagnostics/TcpReachability.cs @@ -23,13 +23,13 @@ using System.Net.Sockets; using ch.cyberduck.core; using ch.cyberduck.core.diagnostics; -using org.apache.log4j; +using org.apache.logging.log4j; namespace Ch.Cyberduck.Core.Diagnostics { public class TcpReachability : Reachability { - private static readonly Logger Log = Logger.getLogger(typeof(TcpReachability).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof(TcpReachability).FullName); static TcpReachability() { diff --git a/core/src/main/csharp/ch/cyberduck/core/editor/SystemWatchEditor.cs b/core/src/main/csharp/ch/cyberduck/core/editor/SystemWatchEditor.cs index 4684b458aa0..cd4e60eb632 100644 --- a/core/src/main/csharp/ch/cyberduck/core/editor/SystemWatchEditor.cs +++ b/core/src/main/csharp/ch/cyberduck/core/editor/SystemWatchEditor.cs @@ -22,14 +22,14 @@ using ch.cyberduck.core.editor; using ch.cyberduck.core.local; using ch.cyberduck.core.pool; -using org.apache.log4j; +using org.apache.logging.log4j; using Path = ch.cyberduck.core.Path; namespace Ch.Cyberduck.Core.Editor { public class SystemWatchEditor : AbstractEditor { - private static readonly Logger Log = Logger.getLogger(typeof(SystemWatchEditor).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof(SystemWatchEditor).FullName); private FileSystemWatcher _watcher; public SystemWatchEditor(Application application, SessionPool session, Path file, ProgressListener listener) diff --git a/core/src/main/csharp/ch/cyberduck/core/editor/SystemWatchEditorFactory.cs b/core/src/main/csharp/ch/cyberduck/core/editor/SystemWatchEditorFactory.cs index b05ad7c6ea2..963867f9408 100644 --- a/core/src/main/csharp/ch/cyberduck/core/editor/SystemWatchEditorFactory.cs +++ b/core/src/main/csharp/ch/cyberduck/core/editor/SystemWatchEditorFactory.cs @@ -25,14 +25,14 @@ using ch.cyberduck.core.pool; using java.util; using Microsoft.Win32; -using org.apache.log4j; +using org.apache.logging.log4j; using Path = ch.cyberduck.core.Path; namespace Ch.Cyberduck.Core.Editor { public class SystemWatchEditorFactory : EditorFactory { - private static readonly Logger Log = Logger.getLogger(typeof (SystemWatchEditorFactory).Name); + private static readonly Logger Log = LogManager.getLogger(typeof (SystemWatchEditorFactory).Name); private readonly IList _registeredEditors = new List(); public SystemWatchEditorFactory() @@ -189,4 +189,4 @@ private static string Identifier() } } } -} \ No newline at end of file +} diff --git a/core/src/main/csharp/ch/cyberduck/core/i18n/DictionaryLocale.cs b/core/src/main/csharp/ch/cyberduck/core/i18n/DictionaryLocale.cs index cf45834b3a7..02c7dc40476 100644 --- a/core/src/main/csharp/ch/cyberduck/core/i18n/DictionaryLocale.cs +++ b/core/src/main/csharp/ch/cyberduck/core/i18n/DictionaryLocale.cs @@ -17,7 +17,7 @@ // using ch.cyberduck.core.i18n; -using org.apache.log4j; +using org.apache.logging.log4j; using System; using System.Resources; @@ -27,7 +27,7 @@ namespace Ch.Cyberduck.Core.I18n public class DictionaryLocale : Locale { - private static readonly Logger Log = Logger.getLogger(typeof(DictionaryLocale).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof(DictionaryLocale).FullName); private readonly bool _enabled; private readonly Preferences preferences; diff --git a/core/src/main/csharp/ch/cyberduck/core/local/RegistryApplicationFinder.cs b/core/src/main/csharp/ch/cyberduck/core/local/RegistryApplicationFinder.cs index 00bdf8a5350..86666ab7655 100644 --- a/core/src/main/csharp/ch/cyberduck/core/local/RegistryApplicationFinder.cs +++ b/core/src/main/csharp/ch/cyberduck/core/local/RegistryApplicationFinder.cs @@ -28,14 +28,14 @@ using java.util; using Microsoft.Win32; using org.apache.commons.io; -using org.apache.log4j; +using org.apache.logging.log4j; namespace Ch.Cyberduck.Core.Local { public class RegistryApplicationFinder : ApplicationFinder { private static readonly Guid CLSID_QueryAssociations = new Guid("a07034fd-6caa-4954-ac3f-97a27216f98a"); - private static readonly Logger Log = Logger.getLogger(typeof(RegistryApplicationFinder).Name); + private static readonly Logger Log = LogManager.getLogger(typeof(RegistryApplicationFinder).Name); private static readonly LRUCache applicationNameCache = LRUCache.build(100); private static readonly LRUCache defaultApplicationCache = LRUCache.build(100); diff --git a/core/src/main/csharp/ch/cyberduck/core/local/SystemLocal.cs b/core/src/main/csharp/ch/cyberduck/core/local/SystemLocal.cs index dd7e7e5524b..3496c1aaa31 100644 --- a/core/src/main/csharp/ch/cyberduck/core/local/SystemLocal.cs +++ b/core/src/main/csharp/ch/cyberduck/core/local/SystemLocal.cs @@ -22,14 +22,14 @@ using ch.cyberduck.core; using org.apache.commons.io; using org.apache.commons.lang3; -using org.apache.log4j; +using org.apache.logging.log4j; using Path = System.IO.Path; namespace Ch.Cyberduck.Core.Local { public class SystemLocal : ch.cyberduck.core.Local { - private static readonly Logger Log = Logger.getLogger(typeof(SystemLocal).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof(SystemLocal).FullName); public SystemLocal(string parent, string name) : base(parent, MakeValidFilename(name)) diff --git a/core/src/main/csharp/ch/cyberduck/core/local/WindowsApplicationLauncher.cs b/core/src/main/csharp/ch/cyberduck/core/local/WindowsApplicationLauncher.cs index 89d5715142f..18822130032 100644 --- a/core/src/main/csharp/ch/cyberduck/core/local/WindowsApplicationLauncher.cs +++ b/core/src/main/csharp/ch/cyberduck/core/local/WindowsApplicationLauncher.cs @@ -18,13 +18,13 @@ using System.Diagnostics; using ch.cyberduck.core.local; -using org.apache.log4j; +using org.apache.logging.log4j; namespace Ch.Cyberduck.Core.Local { public sealed class WindowsApplicationLauncher : ApplicationLauncher { - private static readonly Logger Log = Logger.getLogger(typeof (WindowsApplicationLauncher).Name); + private static readonly Logger Log = LogManager.getLogger(typeof (WindowsApplicationLauncher).Name); public void bounce(ch.cyberduck.core.Local local) { diff --git a/core/src/main/csharp/ch/cyberduck/core/preferences/AppConfigPreferences.cs b/core/src/main/csharp/ch/cyberduck/core/preferences/AppConfigPreferences.cs index 4e86a940929..53f27828171 100644 --- a/core/src/main/csharp/ch/cyberduck/core/preferences/AppConfigPreferences.cs +++ b/core/src/main/csharp/ch/cyberduck/core/preferences/AppConfigPreferences.cs @@ -21,7 +21,7 @@ using Ch.Cyberduck.Properties; using java.util; using org.apache.commons.lang3; -using org.apache.log4j; +using org.apache.logging.log4j; using System; using System.Collections.Generic; using System.Configuration; @@ -36,7 +36,7 @@ namespace Ch.Cyberduck.Core.Preferences { public class AppConfigPreferences : DefaultPreferences { - private static readonly Logger Log = Logger.getLogger(typeof(AppConfigPreferences).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof(AppConfigPreferences).FullName); private SettingsDictionary settings; private Locales locales; diff --git a/core/src/main/csharp/ch/cyberduck/core/preferences/SettingsDictionaryPreferences.cs b/core/src/main/csharp/ch/cyberduck/core/preferences/SettingsDictionaryPreferences.cs index 1a7f040802b..1277ee63328 100644 --- a/core/src/main/csharp/ch/cyberduck/core/preferences/SettingsDictionaryPreferences.cs +++ b/core/src/main/csharp/ch/cyberduck/core/preferences/SettingsDictionaryPreferences.cs @@ -20,7 +20,7 @@ using Ch.Cyberduck.Properties; using java.security; using java.util; -using org.apache.log4j; +using org.apache.logging.log4j; using sun.security.mscapi; using System; using System.Diagnostics; @@ -38,7 +38,7 @@ namespace Ch.Cyberduck.Core.Preferences { public class SettingsDictionaryPreferences : AppConfigPreferences { - private static readonly Logger Log = Logger.getLogger(typeof(SettingsDictionaryPreferences).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof(SettingsDictionaryPreferences).FullName); public SettingsDictionaryPreferences() : base(new DefaultLocales()) { diff --git a/core/src/main/csharp/ch/cyberduck/core/sparkle/WinSparklePeriodicUpdateChecker.cs b/core/src/main/csharp/ch/cyberduck/core/sparkle/WinSparklePeriodicUpdateChecker.cs index bff16ccde24..cfc5e51db8b 100644 --- a/core/src/main/csharp/ch/cyberduck/core/sparkle/WinSparklePeriodicUpdateChecker.cs +++ b/core/src/main/csharp/ch/cyberduck/core/sparkle/WinSparklePeriodicUpdateChecker.cs @@ -23,13 +23,13 @@ using ch.cyberduck.core.preferences; using ch.cyberduck.core.updater; using java.time; -using org.apache.log4j; +using org.apache.logging.log4j; namespace Ch.Cyberduck.Core.Sparkle { public class WinSparklePeriodicUpdateChecker : AbstractPeriodicUpdateChecker, IDisposable { - private static readonly Logger Log = Logger.getLogger(typeof (WinSparklePeriodicUpdateChecker).Name); + private static readonly Logger Log = LogManager.getLogger(typeof (WinSparklePeriodicUpdateChecker).Name); private readonly ch.cyberduck.core.preferences.Preferences _preferences = PreferencesFactory.get(); [DllImport("advapi32.dll", SetLastError = true)] diff --git a/core/src/main/csharp/ch/cyberduck/core/ssl/HostnameVerifier.cs b/core/src/main/csharp/ch/cyberduck/core/ssl/HostnameVerifier.cs index 6359e70d56d..e39aa1dea47 100644 --- a/core/src/main/csharp/ch/cyberduck/core/ssl/HostnameVerifier.cs +++ b/core/src/main/csharp/ch/cyberduck/core/ssl/HostnameVerifier.cs @@ -20,7 +20,7 @@ using System.Security.Cryptography.X509Certificates; using java.lang; using java.util; -using org.apache.log4j; +using org.apache.logging.log4j; using ArrayList = System.Collections.ArrayList; using Exception = System.Exception; using String = System.String; @@ -30,7 +30,7 @@ namespace Ch.Cyberduck.Core.Ssl { public class HostnameVerifier { - private static readonly Logger Log = Logger.getLogger(typeof (HostnameVerifier).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof (HostnameVerifier).FullName); /// // RFC2818 - HTTP Over TLS, Section 3.1 @@ -195,4 +195,4 @@ public static bool Match(string hostname, string pattern) return (String.Compare(hostname, 0, start, 0, start.Length, true, CultureInfo.InvariantCulture) == 0); } } -} \ No newline at end of file +} diff --git a/core/src/main/csharp/ch/cyberduck/core/urlhandler/URLSchemeHandlerConfiguration.cs b/core/src/main/csharp/ch/cyberduck/core/urlhandler/URLSchemeHandlerConfiguration.cs index c5e4c5d9425..bd23b216c26 100755 --- a/core/src/main/csharp/ch/cyberduck/core/urlhandler/URLSchemeHandlerConfiguration.cs +++ b/core/src/main/csharp/ch/cyberduck/core/urlhandler/URLSchemeHandlerConfiguration.cs @@ -19,7 +19,7 @@ using System; using ch.cyberduck.core; using Microsoft.Win32; -using org.apache.log4j; +using org.apache.logging.log4j; using ch.cyberduck.core.urlhandler; using java.util; using Application = System.Windows.Forms.Application; @@ -28,7 +28,7 @@ namespace Ch.Cyberduck.Core.Urlhandler { public class URLSchemeHandlerConfiguration : AbstractSchemeHandler { - private static readonly Logger Logger = Logger.getLogger(typeof (URLSchemeHandlerConfiguration).FullName); + private static readonly Logger Logger = LogManager.getLogger(typeof (URLSchemeHandlerConfiguration).FullName); public URLSchemeHandlerConfiguration() { diff --git a/core/src/main/java/ch/cyberduck/core/AbstractCache.java b/core/src/main/java/ch/cyberduck/core/AbstractCache.java index 35bbb96573a..4fb55014679 100644 --- a/core/src/main/java/ch/cyberduck/core/AbstractCache.java +++ b/core/src/main/java/ch/cyberduck/core/AbstractCache.java @@ -20,12 +20,13 @@ import ch.cyberduck.core.cache.LRUCache; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Map; public abstract class AbstractCache implements Cache { - private static final Logger log = Logger.getLogger(AbstractCache.class); + private static final Logger log = LogManager.getLogger(AbstractCache.class); private final LRUCache> impl; diff --git a/core/src/main/java/ch/cyberduck/core/AbstractController.java b/core/src/main/java/ch/cyberduck/core/AbstractController.java index 85394c35989..ce516cc9b12 100644 --- a/core/src/main/java/ch/cyberduck/core/AbstractController.java +++ b/core/src/main/java/ch/cyberduck/core/AbstractController.java @@ -24,12 +24,13 @@ import ch.cyberduck.core.threading.MainAction; import org.apache.commons.lang3.concurrent.ConcurrentUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.concurrent.Future; public abstract class AbstractController implements Controller { - private static final Logger log = Logger.getLogger(AbstractController.class); + private static final Logger log = LogManager.getLogger(AbstractController.class); /** * List of pending background tasks or this browser diff --git a/core/src/main/java/ch/cyberduck/core/AbstractExceptionMappingService.java b/core/src/main/java/ch/cyberduck/core/AbstractExceptionMappingService.java index 9ae90d27c52..42951b8e9ac 100644 --- a/core/src/main/java/ch/cyberduck/core/AbstractExceptionMappingService.java +++ b/core/src/main/java/ch/cyberduck/core/AbstractExceptionMappingService.java @@ -28,7 +28,8 @@ import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.http.ConnectionClosedException; import org.apache.http.NoHttpResponseException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.EOFException; import java.io.InterruptedIOException; @@ -38,7 +39,7 @@ import java.util.concurrent.TimeoutException; public abstract class AbstractExceptionMappingService implements ExceptionMappingService { - private static final Logger log = Logger.getLogger(AbstractExceptionMappingService.class); + private static final Logger log = LogManager.getLogger(AbstractExceptionMappingService.class); public BackgroundException map(final String message, final T failure) { final BackgroundException exception = this.map(failure); diff --git a/core/src/main/java/ch/cyberduck/core/AbstractFolderHostCollection.java b/core/src/main/java/ch/cyberduck/core/AbstractFolderHostCollection.java index cc93c4cb18f..02522bfa5d2 100644 --- a/core/src/main/java/ch/cyberduck/core/AbstractFolderHostCollection.java +++ b/core/src/main/java/ch/cyberduck/core/AbstractFolderHostCollection.java @@ -29,13 +29,14 @@ import ch.cyberduck.core.serializer.Writer; import ch.cyberduck.core.text.DefaultLexicographicOrderComparator; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Comparator; import java.util.regex.Pattern; public abstract class AbstractFolderHostCollection extends AbstractHostCollection implements FileWatcherListener { - private static final Logger log = Logger.getLogger(AbstractFolderHostCollection.class); + private static final Logger log = LogManager.getLogger(AbstractFolderHostCollection.class); public static final Comparator SORT_BY_NICKNAME = new Comparator() { @Override diff --git a/core/src/main/java/ch/cyberduck/core/AbstractHostCollection.java b/core/src/main/java/ch/cyberduck/core/AbstractHostCollection.java index 4c55cefece7..ecdc89d4f26 100644 --- a/core/src/main/java/ch/cyberduck/core/AbstractHostCollection.java +++ b/core/src/main/java/ch/cyberduck/core/AbstractHostCollection.java @@ -22,7 +22,8 @@ import org.apache.commons.lang3.CharUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.Comparator; @@ -35,7 +36,7 @@ import java.util.stream.Collectors; public abstract class AbstractHostCollection extends Collection implements EditableCollection { - private static final Logger log = Logger.getLogger(AbstractHostCollection.class); + private static final Logger log = LogManager.getLogger(AbstractHostCollection.class); private static final AbstractHostCollection EMPTY = new AbstractHostCollection() { // Empty diff --git a/core/src/main/java/ch/cyberduck/core/Acl.java b/core/src/main/java/ch/cyberduck/core/Acl.java index 51145c5319b..85d6a50eb31 100644 --- a/core/src/main/java/ch/cyberduck/core/Acl.java +++ b/core/src/main/java/ch/cyberduck/core/Acl.java @@ -23,7 +23,8 @@ import ch.cyberduck.core.serializer.Serializer; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.Arrays; @@ -36,7 +37,7 @@ import java.util.Set; public final class Acl extends HashMap> implements Serializable { - private static final Logger log = Logger.getLogger(Acl.class); + private static final Logger log = LogManager.getLogger(Acl.class); public static final Acl EMPTY = new Acl(); /** diff --git a/core/src/main/java/ch/cyberduck/core/AlertCallbackFactory.java b/core/src/main/java/ch/cyberduck/core/AlertCallbackFactory.java index 71ed4eb02f0..4ca2f1ae3a6 100644 --- a/core/src/main/java/ch/cyberduck/core/AlertCallbackFactory.java +++ b/core/src/main/java/ch/cyberduck/core/AlertCallbackFactory.java @@ -19,13 +19,14 @@ import ch.cyberduck.core.threading.DisabledAlertCallback; import org.apache.commons.lang3.reflect.ConstructorUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; public class AlertCallbackFactory extends Factory { - private static final Logger log = Logger.getLogger(AlertCallbackFactory.class); + private static final Logger log = LogManager.getLogger(AlertCallbackFactory.class); private Constructor constructor; diff --git a/core/src/main/java/ch/cyberduck/core/AnonymousConnectionService.java b/core/src/main/java/ch/cyberduck/core/AnonymousConnectionService.java index 63350d7bf87..98ecf0e2899 100644 --- a/core/src/main/java/ch/cyberduck/core/AnonymousConnectionService.java +++ b/core/src/main/java/ch/cyberduck/core/AnonymousConnectionService.java @@ -19,10 +19,11 @@ import ch.cyberduck.core.proxy.ProxyFactory; import ch.cyberduck.core.threading.CancelCallback; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class AnonymousConnectionService implements ConnectionService { - private static final Logger log = Logger.getLogger(AnonymousConnectionService.class); + private static final Logger log = LogManager.getLogger(AnonymousConnectionService.class); @Override public boolean check(final Session session, final CancelCallback callback) throws BackgroundException { diff --git a/core/src/main/java/ch/cyberduck/core/Archive.java b/core/src/main/java/ch/cyberduck/core/Archive.java index 4234ab3ddd1..b2abe5b1834 100644 --- a/core/src/main/java/ch/cyberduck/core/Archive.java +++ b/core/src/main/java/ch/cyberduck/core/Archive.java @@ -22,7 +22,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.ArrayList; @@ -35,7 +36,7 @@ */ public abstract class Archive { - private static final Logger log = Logger.getLogger(Archive.class); + private static final Logger log = LogManager.getLogger(Archive.class); private final Preferences preferences = PreferencesFactory.get(); diff --git a/core/src/main/java/ch/cyberduck/core/AttributedList.java b/core/src/main/java/ch/cyberduck/core/AttributedList.java index 559a17705ff..b55ebfbc294 100644 --- a/core/src/main/java/ch/cyberduck/core/AttributedList.java +++ b/core/src/main/java/ch/cyberduck/core/AttributedList.java @@ -18,7 +18,8 @@ * dkocher@cyberduck.ch */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Comparator; import java.util.Iterator; @@ -33,7 +34,7 @@ * A sortable list with a map to lookup values by key. */ public class AttributedList implements Iterable { - private static final Logger log = Logger.getLogger(AttributedList.class); + private static final Logger log = LogManager.getLogger(AttributedList.class); public static final AttributedList EMPTY = new AttributedList() { @Override diff --git a/core/src/main/java/ch/cyberduck/core/BookmarkCollection.java b/core/src/main/java/ch/cyberduck/core/BookmarkCollection.java index 074a7f35c28..6fb22b22179 100644 --- a/core/src/main/java/ch/cyberduck/core/BookmarkCollection.java +++ b/core/src/main/java/ch/cyberduck/core/BookmarkCollection.java @@ -19,13 +19,14 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import ch.cyberduck.core.preferences.SupportDirectoryFinderFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Comparator; import java.util.stream.IntStream; public class BookmarkCollection extends MonitorFolderHostCollection { - private static final Logger log = Logger.getLogger(BookmarkCollection.class); + private static final Logger log = LogManager.getLogger(BookmarkCollection.class); private final Preferences preferences = PreferencesFactory.get(); diff --git a/core/src/main/java/ch/cyberduck/core/CachingAttributesFinderFeature.java b/core/src/main/java/ch/cyberduck/core/CachingAttributesFinderFeature.java index a523dd99f57..7677d98235c 100644 --- a/core/src/main/java/ch/cyberduck/core/CachingAttributesFinderFeature.java +++ b/core/src/main/java/ch/cyberduck/core/CachingAttributesFinderFeature.java @@ -20,12 +20,13 @@ import ch.cyberduck.core.features.AttributesFinder; import ch.cyberduck.core.shared.ListFilteringFeature; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; public class CachingAttributesFinderFeature implements AttributesFinder { - private static final Logger log = Logger.getLogger(CachingAttributesFinderFeature.class); + private static final Logger log = LogManager.getLogger(CachingAttributesFinderFeature.class); private final Cache cache; private final AttributesFinder delegate; diff --git a/core/src/main/java/ch/cyberduck/core/CachingFindFeature.java b/core/src/main/java/ch/cyberduck/core/CachingFindFeature.java index d7d258e06ad..f3e1922f022 100644 --- a/core/src/main/java/ch/cyberduck/core/CachingFindFeature.java +++ b/core/src/main/java/ch/cyberduck/core/CachingFindFeature.java @@ -19,10 +19,11 @@ import ch.cyberduck.core.features.Find; import ch.cyberduck.core.shared.ListFilteringFeature; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class CachingFindFeature implements Find { - private static final Logger log = Logger.getLogger(CachingAttributesFinderFeature.class); + private static final Logger log = LogManager.getLogger(CachingAttributesFinderFeature.class); private final Cache cache; private final Find delegate; diff --git a/core/src/main/java/ch/cyberduck/core/CertificateIdentityCallbackFactory.java b/core/src/main/java/ch/cyberduck/core/CertificateIdentityCallbackFactory.java index 9b64eecf6a5..e1e5e5fe13b 100644 --- a/core/src/main/java/ch/cyberduck/core/CertificateIdentityCallbackFactory.java +++ b/core/src/main/java/ch/cyberduck/core/CertificateIdentityCallbackFactory.java @@ -20,13 +20,14 @@ */ import org.apache.commons.lang3.reflect.ConstructorUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; public class CertificateIdentityCallbackFactory extends Factory { - private static final Logger log = Logger.getLogger(CertificateIdentityCallbackFactory.class); + private static final Logger log = LogManager.getLogger(CertificateIdentityCallbackFactory.class); private Constructor constructor; diff --git a/core/src/main/java/ch/cyberduck/core/CertificateStoreFactory.java b/core/src/main/java/ch/cyberduck/core/CertificateStoreFactory.java index fb4dace6fbd..acf6fae7668 100644 --- a/core/src/main/java/ch/cyberduck/core/CertificateStoreFactory.java +++ b/core/src/main/java/ch/cyberduck/core/CertificateStoreFactory.java @@ -17,12 +17,13 @@ * Bug fixes, suggestions and comments should be sent to feedback@cyberduck.ch */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.lang.reflect.Constructor; public class CertificateStoreFactory extends Factory { - private static final Logger log = Logger.getLogger(CertificateStoreFactory.class); + private static final Logger log = LogManager.getLogger(CertificateStoreFactory.class); private Constructor constructor; diff --git a/core/src/main/java/ch/cyberduck/core/CertificateTrustCallbackFactory.java b/core/src/main/java/ch/cyberduck/core/CertificateTrustCallbackFactory.java index 46aa110c869..5a0b35073d2 100644 --- a/core/src/main/java/ch/cyberduck/core/CertificateTrustCallbackFactory.java +++ b/core/src/main/java/ch/cyberduck/core/CertificateTrustCallbackFactory.java @@ -20,13 +20,14 @@ */ import org.apache.commons.lang3.reflect.ConstructorUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; public class CertificateTrustCallbackFactory extends Factory { - private static final Logger log = Logger.getLogger(CertificateTrustCallbackFactory.class); + private static final Logger log = LogManager.getLogger(CertificateTrustCallbackFactory.class); private Constructor constructor; diff --git a/core/src/main/java/ch/cyberduck/core/Collection.java b/core/src/main/java/ch/cyberduck/core/Collection.java index a3680db54f8..e1009d91a8d 100644 --- a/core/src/main/java/ch/cyberduck/core/Collection.java +++ b/core/src/main/java/ch/cyberduck/core/Collection.java @@ -20,7 +20,8 @@ import ch.cyberduck.core.exception.AccessDeniedException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.HashSet; @@ -33,7 +34,7 @@ import java.util.function.Predicate; public class Collection extends ArrayList implements CollectionListener { - private static final Logger log = Logger.getLogger(Collection.class); + private static final Logger log = LogManager.getLogger(Collection.class); private final ReentrantLock locked = new ReentrantLock(); private final AtomicBoolean loaded = new AtomicBoolean(); diff --git a/core/src/main/java/ch/cyberduck/core/DefaultHostPasswordStore.java b/core/src/main/java/ch/cyberduck/core/DefaultHostPasswordStore.java index 51d8bf7fe02..bcc145ec972 100644 --- a/core/src/main/java/ch/cyberduck/core/DefaultHostPasswordStore.java +++ b/core/src/main/java/ch/cyberduck/core/DefaultHostPasswordStore.java @@ -22,12 +22,13 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.net.URI; public abstract class DefaultHostPasswordStore implements HostPasswordStore { - private static final Logger log = Logger.getLogger(DefaultHostPasswordStore.class); + private static final Logger log = LogManager.getLogger(DefaultHostPasswordStore.class); private final Preferences preferences = PreferencesFactory.get(); diff --git a/core/src/main/java/ch/cyberduck/core/DisabledConnectionCallback.java b/core/src/main/java/ch/cyberduck/core/DisabledConnectionCallback.java index e351b884708..210cd5890ac 100644 --- a/core/src/main/java/ch/cyberduck/core/DisabledConnectionCallback.java +++ b/core/src/main/java/ch/cyberduck/core/DisabledConnectionCallback.java @@ -21,14 +21,15 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import ch.cyberduck.core.exception.LoginCanceledException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.concurrent.CountDownLatch; import com.google.common.util.concurrent.Uninterruptibles; public class DisabledConnectionCallback implements ConnectionCallback { - private static final Logger log = Logger.getLogger(DisabledConnectionCallback.class); + private static final Logger log = LogManager.getLogger(DisabledConnectionCallback.class); @Override public void warn(final Host bookmark, final String title, final String message, diff --git a/core/src/main/java/ch/cyberduck/core/DisabledProgressListener.java b/core/src/main/java/ch/cyberduck/core/DisabledProgressListener.java index 4673804ad8e..65602bb2539 100644 --- a/core/src/main/java/ch/cyberduck/core/DisabledProgressListener.java +++ b/core/src/main/java/ch/cyberduck/core/DisabledProgressListener.java @@ -17,10 +17,11 @@ * Bug fixes, suggestions and comments should be sent to feedback@cyberduck.ch */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class DisabledProgressListener implements ProgressListener { - private static final Logger log = Logger.getLogger(DisabledProgressListener.class); + private static final Logger log = LogManager.getLogger(DisabledProgressListener.class); @Override public void message(final String message) { diff --git a/core/src/main/java/ch/cyberduck/core/DisabledTranscriptListener.java b/core/src/main/java/ch/cyberduck/core/DisabledTranscriptListener.java index 9eb18a1cc8c..7f17b8b5667 100644 --- a/core/src/main/java/ch/cyberduck/core/DisabledTranscriptListener.java +++ b/core/src/main/java/ch/cyberduck/core/DisabledTranscriptListener.java @@ -17,10 +17,11 @@ * Bug fixes, suggestions and comments should be sent to feedback@cyberduck.ch */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class DisabledTranscriptListener implements TranscriptListener { - private static final Logger log = Logger.getLogger(DisabledTranscriptListener.class); + private static final Logger log = LogManager.getLogger(DisabledTranscriptListener.class); @Override public void log(final Type request, final String message) { diff --git a/core/src/main/java/ch/cyberduck/core/FallbackAttributesFinderFeature.java b/core/src/main/java/ch/cyberduck/core/FallbackAttributesFinderFeature.java index cf9cb1881cd..6e540f3e2b3 100644 --- a/core/src/main/java/ch/cyberduck/core/FallbackAttributesFinderFeature.java +++ b/core/src/main/java/ch/cyberduck/core/FallbackAttributesFinderFeature.java @@ -22,10 +22,11 @@ import ch.cyberduck.core.features.AttributesFinder; import ch.cyberduck.core.shared.DefaultAttributesFinderFeature; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class FallbackAttributesFinderFeature implements AttributesFinder { - private static final Logger log = Logger.getLogger(FallbackAttributesFinderFeature.class); + private static final Logger log = LogManager.getLogger(FallbackAttributesFinderFeature.class); private final AttributesFinder standard; private final AttributesFinder fallback; diff --git a/core/src/main/java/ch/cyberduck/core/Host.java b/core/src/main/java/ch/cyberduck/core/Host.java index c830c935961..43139519c7b 100644 --- a/core/src/main/java/ch/cyberduck/core/Host.java +++ b/core/src/main/java/ch/cyberduck/core/Host.java @@ -23,7 +23,8 @@ import ch.cyberduck.core.serializer.Serializer; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; import java.util.Date; @@ -33,7 +34,7 @@ import java.util.TimeZone; public class Host implements Serializable, Comparable { - private static final Logger log = Logger.getLogger(Host.class); + private static final Logger log = LogManager.getLogger(Host.class); /** * The credentials to authenticate with for the CDN diff --git a/core/src/main/java/ch/cyberduck/core/HostKeyCallbackFactory.java b/core/src/main/java/ch/cyberduck/core/HostKeyCallbackFactory.java index 25ac6639db0..53a02a34570 100644 --- a/core/src/main/java/ch/cyberduck/core/HostKeyCallbackFactory.java +++ b/core/src/main/java/ch/cyberduck/core/HostKeyCallbackFactory.java @@ -20,13 +20,14 @@ */ import org.apache.commons.lang3.reflect.ConstructorUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; public class HostKeyCallbackFactory extends Factory { - private static final Logger log = Logger.getLogger(HostKeyCallbackFactory.class); + private static final Logger log = LogManager.getLogger(HostKeyCallbackFactory.class); private Constructor constructor; diff --git a/core/src/main/java/ch/cyberduck/core/HostParser.java b/core/src/main/java/ch/cyberduck/core/HostParser.java index 27699a6f1f2..f44f70c2791 100644 --- a/core/src/main/java/ch/cyberduck/core/HostParser.java +++ b/core/src/main/java/ch/cyberduck/core/HostParser.java @@ -23,14 +23,15 @@ import org.apache.commons.lang3.StringUtils; import org.apache.http.conn.util.InetAddressUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Optional; import java.util.function.Consumer; import java.util.regex.Pattern; public final class HostParser { - private static final Logger log = Logger.getLogger(HostParser.class); + private static final Logger log = LogManager.getLogger(HostParser.class); private static final Preferences preferences = PreferencesFactory.get(); diff --git a/core/src/main/java/ch/cyberduck/core/KeychainLoginService.java b/core/src/main/java/ch/cyberduck/core/KeychainLoginService.java index f3da2a6b713..b091efe8bfd 100644 --- a/core/src/main/java/ch/cyberduck/core/KeychainLoginService.java +++ b/core/src/main/java/ch/cyberduck/core/KeychainLoginService.java @@ -25,12 +25,13 @@ import ch.cyberduck.core.threading.CancelCallback; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; public class KeychainLoginService implements LoginService { - private static final Logger log = Logger.getLogger(KeychainLoginService.class); + private static final Logger log = LogManager.getLogger(KeychainLoginService.class); private final HostPasswordStore keychain; diff --git a/core/src/main/java/ch/cyberduck/core/Local.java b/core/src/main/java/ch/cyberduck/core/Local.java index 93b08a89e4d..be6349a9f58 100644 --- a/core/src/main/java/ch/cyberduck/core/Local.java +++ b/core/src/main/java/ch/cyberduck/core/Local.java @@ -33,7 +33,8 @@ import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.CharUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; @@ -60,7 +61,7 @@ import java.util.Set; public class Local extends AbstractPath implements Referenceable, Serializable { - private static final Logger log = Logger.getLogger(Local.class); + private static final Logger log = LogManager.getLogger(Local.class); /** * Absolute path in local file system diff --git a/core/src/main/java/ch/cyberduck/core/LocalAttributes.java b/core/src/main/java/ch/cyberduck/core/LocalAttributes.java index c04efcef284..f41daf5504a 100644 --- a/core/src/main/java/ch/cyberduck/core/LocalAttributes.java +++ b/core/src/main/java/ch/cyberduck/core/LocalAttributes.java @@ -21,7 +21,8 @@ import ch.cyberduck.core.exception.LocalAccessDeniedException; import ch.cyberduck.core.io.Checksum; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.nio.file.FileSystems; @@ -35,7 +36,7 @@ import java.util.Objects; public class LocalAttributes extends Attributes { - private static final Logger log = Logger.getLogger(LocalAttributes.class); + private static final Logger log = LogManager.getLogger(LocalAttributes.class); private final String path; private Checksum checksum = Checksum.NONE; diff --git a/core/src/main/java/ch/cyberduck/core/LoggingTranscriptListener.java b/core/src/main/java/ch/cyberduck/core/LoggingTranscriptListener.java index 0cce2f71501..083c1cc7736 100644 --- a/core/src/main/java/ch/cyberduck/core/LoggingTranscriptListener.java +++ b/core/src/main/java/ch/cyberduck/core/LoggingTranscriptListener.java @@ -15,7 +15,8 @@ * GNU General Public License for more details. */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class LoggingTranscriptListener implements TranscriptListener { @@ -23,7 +24,7 @@ public class LoggingTranscriptListener implements TranscriptListener { private final Logger response; public LoggingTranscriptListener() { - this(Logger.getLogger("ch.cyberduck.transcript.request"), Logger.getLogger("ch.cyberduck.transcript.response")); + this(LogManager.getLogger("ch.cyberduck.transcript.request"), LogManager.getLogger("ch.cyberduck.transcript.response")); } public LoggingTranscriptListener(final Logger request, final Logger response) { diff --git a/core/src/main/java/ch/cyberduck/core/LoginCallbackFactory.java b/core/src/main/java/ch/cyberduck/core/LoginCallbackFactory.java index 71f9059f98a..1f7850d53fc 100644 --- a/core/src/main/java/ch/cyberduck/core/LoginCallbackFactory.java +++ b/core/src/main/java/ch/cyberduck/core/LoginCallbackFactory.java @@ -20,13 +20,14 @@ */ import org.apache.commons.lang3.reflect.ConstructorUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; public class LoginCallbackFactory extends Factory { - private static final Logger log = Logger.getLogger(LoginCallbackFactory.class); + private static final Logger log = LogManager.getLogger(LoginCallbackFactory.class); private Constructor constructor; diff --git a/core/src/main/java/ch/cyberduck/core/LoginConnectionService.java b/core/src/main/java/ch/cyberduck/core/LoginConnectionService.java index 12bdc1ff69b..a871f83544d 100644 --- a/core/src/main/java/ch/cyberduck/core/LoginConnectionService.java +++ b/core/src/main/java/ch/cyberduck/core/LoginConnectionService.java @@ -27,13 +27,14 @@ import ch.cyberduck.core.threading.CancelCallback; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.Date; public class LoginConnectionService implements ConnectionService { - private static final Logger log = Logger.getLogger(LoginConnectionService.class); + private static final Logger log = LogManager.getLogger(LoginConnectionService.class); private final Resolver resolver = new Resolver(); private final HostKeyCallback key; diff --git a/core/src/main/java/ch/cyberduck/core/MacUniqueIdService.java b/core/src/main/java/ch/cyberduck/core/MacUniqueIdService.java index 10a521442ea..73be52bf6c5 100644 --- a/core/src/main/java/ch/cyberduck/core/MacUniqueIdService.java +++ b/core/src/main/java/ch/cyberduck/core/MacUniqueIdService.java @@ -18,7 +18,8 @@ import ch.cyberduck.core.exception.LocalAccessDeniedException; import org.apache.commons.codec.binary.Hex; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.net.InetAddress; import java.net.NetworkInterface; @@ -27,7 +28,7 @@ import java.util.Enumeration; public class MacUniqueIdService implements UniqueIdService { - private static final Logger log = Logger.getLogger(MacUniqueIdService.class.getName()); + private static final Logger log = LogManager.getLogger(MacUniqueIdService.class.getName()); @Override public String getUUID() throws LocalAccessDeniedException { diff --git a/core/src/main/java/ch/cyberduck/core/MappingMimeTypeService.java b/core/src/main/java/ch/cyberduck/core/MappingMimeTypeService.java index cc6c1dc216c..f744395d800 100644 --- a/core/src/main/java/ch/cyberduck/core/MappingMimeTypeService.java +++ b/core/src/main/java/ch/cyberduck/core/MappingMimeTypeService.java @@ -18,7 +18,8 @@ */ import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.utils.Mimetypes; import java.io.IOException; @@ -26,7 +27,7 @@ import java.util.Enumeration; public class MappingMimeTypeService implements MimeTypeService { - private static final Logger log = Logger.getLogger(MappingMimeTypeService.class); + private static final Logger log = LogManager.getLogger(MappingMimeTypeService.class); private static final Mimetypes types = Mimetypes.getInstance(); diff --git a/core/src/main/java/ch/cyberduck/core/MonitorFolderHostCollection.java b/core/src/main/java/ch/cyberduck/core/MonitorFolderHostCollection.java index 1885ea7186e..cdb77a5584d 100644 --- a/core/src/main/java/ch/cyberduck/core/MonitorFolderHostCollection.java +++ b/core/src/main/java/ch/cyberduck/core/MonitorFolderHostCollection.java @@ -24,13 +24,14 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.Comparator; public class MonitorFolderHostCollection extends AbstractFolderHostCollection { - private static final Logger log = Logger.getLogger(MonitorFolderHostCollection.class); + private static final Logger log = LogManager.getLogger(MonitorFolderHostCollection.class); private final Preferences preferences = PreferencesFactory.get(); private final FileWatcher monitor = new FileWatcher(WatchServiceFactory.get()); diff --git a/core/src/main/java/ch/cyberduck/core/PasswordCallbackFactory.java b/core/src/main/java/ch/cyberduck/core/PasswordCallbackFactory.java index f455ab9d9e8..e674f341ebb 100644 --- a/core/src/main/java/ch/cyberduck/core/PasswordCallbackFactory.java +++ b/core/src/main/java/ch/cyberduck/core/PasswordCallbackFactory.java @@ -16,13 +16,14 @@ */ import org.apache.commons.lang3.reflect.ConstructorUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; public class PasswordCallbackFactory extends Factory { - private static final Logger log = Logger.getLogger(PasswordCallbackFactory.class); + private static final Logger log = LogManager.getLogger(PasswordCallbackFactory.class); private Constructor constructor; diff --git a/core/src/main/java/ch/cyberduck/core/PathAttributes.java b/core/src/main/java/ch/cyberduck/core/PathAttributes.java index 65d08be2455..cae01909bf4 100644 --- a/core/src/main/java/ch/cyberduck/core/PathAttributes.java +++ b/core/src/main/java/ch/cyberduck/core/PathAttributes.java @@ -24,7 +24,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; import java.util.HashMap; @@ -35,7 +36,7 @@ * Attributes of a remote directory or file. */ public class PathAttributes extends Attributes implements Serializable { - private static final Logger log = Logger.getLogger(PathAttributes.class); + private static final Logger log = LogManager.getLogger(PathAttributes.class); public static final PathAttributes EMPTY = new PathAttributes(); diff --git a/core/src/main/java/ch/cyberduck/core/Permission.java b/core/src/main/java/ch/cyberduck/core/Permission.java index 2ccfb4622b1..7fdd6daebd6 100644 --- a/core/src/main/java/ch/cyberduck/core/Permission.java +++ b/core/src/main/java/ch/cyberduck/core/Permission.java @@ -22,7 +22,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.math.NumberUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; /** * Encapsulating UNIX file permissions. @@ -59,7 +60,7 @@ public String getSymbol() { return LocaleFactory.localizedString("--"); } }; - private static final Logger log = Logger.getLogger(Permission.class); + private static final Logger log = LogManager.getLogger(Permission.class); private Action user; private Action group; private Action other; diff --git a/core/src/main/java/ch/cyberduck/core/Profile.java b/core/src/main/java/ch/cyberduck/core/Profile.java index daf2d3bbbf6..8a73225203c 100644 --- a/core/src/main/java/ch/cyberduck/core/Profile.java +++ b/core/src/main/java/ch/cyberduck/core/Profile.java @@ -30,7 +30,8 @@ import org.apache.commons.codec.binary.Base64; import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.OutputStream; @@ -43,7 +44,7 @@ import java.util.stream.Collectors; public class Profile implements Protocol { - private static final Logger log = Logger.getLogger(Profile.class); + private static final Logger log = LogManager.getLogger(Profile.class); private final Deserializer dict; /** diff --git a/core/src/main/java/ch/cyberduck/core/ProtocolFactory.java b/core/src/main/java/ch/cyberduck/core/ProtocolFactory.java index cc3a83d7abc..e3360701762 100644 --- a/core/src/main/java/ch/cyberduck/core/ProtocolFactory.java +++ b/core/src/main/java/ch/cyberduck/core/ProtocolFactory.java @@ -28,7 +28,8 @@ import ch.cyberduck.core.serializer.impl.dd.ProfilePlistReader; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Arrays; import java.util.Collections; @@ -42,7 +43,7 @@ import java.util.stream.Collectors; public final class ProtocolFactory { - private static final Logger log = Logger.getLogger(ProtocolFactory.class); + private static final Logger log = LogManager.getLogger(ProtocolFactory.class); private static final ProtocolFactory global = new ProtocolFactory(); diff --git a/core/src/main/java/ch/cyberduck/core/Resolver.java b/core/src/main/java/ch/cyberduck/core/Resolver.java index 1d89806e499..e5d966fb069 100644 --- a/core/src/main/java/ch/cyberduck/core/Resolver.java +++ b/core/src/main/java/ch/cyberduck/core/Resolver.java @@ -24,7 +24,8 @@ import ch.cyberduck.core.threading.CancelCallback; import ch.cyberduck.core.threading.NamedThreadFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.net.InetAddress; import java.net.UnknownHostException; @@ -37,7 +38,7 @@ import com.google.common.util.concurrent.Uninterruptibles; public final class Resolver { - private static final Logger log = Logger.getLogger(Resolver.class); + private static final Logger log = LogManager.getLogger(Resolver.class); private final ThreadFactory threadFactory = new NamedThreadFactory("resolver"); diff --git a/core/src/main/java/ch/cyberduck/core/ReverseLookupCache.java b/core/src/main/java/ch/cyberduck/core/ReverseLookupCache.java index df8e251ff0e..ae1ec66131c 100644 --- a/core/src/main/java/ch/cyberduck/core/ReverseLookupCache.java +++ b/core/src/main/java/ch/cyberduck/core/ReverseLookupCache.java @@ -17,12 +17,13 @@ import ch.cyberduck.core.cache.LRUCache; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Map; public class ReverseLookupCache implements Cache { - private static final Logger log = Logger.getLogger(ReverseLookupCache.class); + private static final Logger log = LogManager.getLogger(ReverseLookupCache.class); private final Cache proxy; private final LRUCache reverse; diff --git a/core/src/main/java/ch/cyberduck/core/Session.java b/core/src/main/java/ch/cyberduck/core/Session.java index 5b49751d216..1c2658b5610 100644 --- a/core/src/main/java/ch/cyberduck/core/Session.java +++ b/core/src/main/java/ch/cyberduck/core/Session.java @@ -47,14 +47,15 @@ import ch.cyberduck.core.threading.CancelCallback; import ch.cyberduck.core.vault.VaultRegistry; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; public abstract class Session implements TranscriptListener { - private static final Logger log = Logger.getLogger(Session.class); + private static final Logger log = LogManager.getLogger(Session.class); /** * Append HTTP transcript to logger diff --git a/core/src/main/java/ch/cyberduck/core/SessionFactory.java b/core/src/main/java/ch/cyberduck/core/SessionFactory.java index b23ea2cb227..f1846eb34ff 100644 --- a/core/src/main/java/ch/cyberduck/core/SessionFactory.java +++ b/core/src/main/java/ch/cyberduck/core/SessionFactory.java @@ -22,13 +22,14 @@ import ch.cyberduck.core.ssl.X509TrustManager; import org.apache.commons.lang3.reflect.ConstructorUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; public final class SessionFactory { - private static final Logger log = Logger.getLogger(SessionFactory.class); + private static final Logger log = LogManager.getLogger(SessionFactory.class); private SessionFactory() { // diff --git a/core/src/main/java/ch/cyberduck/core/SessionPoolFactory.java b/core/src/main/java/ch/cyberduck/core/SessionPoolFactory.java index abbc7181eec..1141d25c07c 100644 --- a/core/src/main/java/ch/cyberduck/core/SessionPoolFactory.java +++ b/core/src/main/java/ch/cyberduck/core/SessionPoolFactory.java @@ -28,12 +28,13 @@ import ch.cyberduck.core.vault.VaultRegistry; import ch.cyberduck.core.vault.VaultRegistryFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Arrays; public class SessionPoolFactory { - private static final Logger log = Logger.getLogger(SessionPoolFactory.class); + private static final Logger log = LogManager.getLogger(SessionPoolFactory.class); private SessionPoolFactory() { // diff --git a/core/src/main/java/ch/cyberduck/core/TransferCollection.java b/core/src/main/java/ch/cyberduck/core/TransferCollection.java index 369430a4dc1..1d0efcb1726 100644 --- a/core/src/main/java/ch/cyberduck/core/TransferCollection.java +++ b/core/src/main/java/ch/cyberduck/core/TransferCollection.java @@ -30,7 +30,8 @@ import ch.cyberduck.core.transfer.Transfer; import ch.cyberduck.core.transfer.TransferProgress; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.ArrayList; @@ -40,7 +41,7 @@ import java.util.stream.IntStream; public class TransferCollection extends Collection { - private static final Logger log = Logger.getLogger(TransferCollection.class); + private static final Logger log = LogManager.getLogger(TransferCollection.class); private static final TransferCollection TRANSFER_COLLECTION = new TransferCollection( LocalFactory.get(SupportDirectoryFinderFactory.get().find(), "Transfers")); diff --git a/core/src/main/java/ch/cyberduck/core/TransferErrorCallbackControllerFactory.java b/core/src/main/java/ch/cyberduck/core/TransferErrorCallbackControllerFactory.java index de94dd62193..9e32f56c075 100644 --- a/core/src/main/java/ch/cyberduck/core/TransferErrorCallbackControllerFactory.java +++ b/core/src/main/java/ch/cyberduck/core/TransferErrorCallbackControllerFactory.java @@ -25,13 +25,14 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.reflect.ConstructorUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; public class TransferErrorCallbackControllerFactory extends Factory { - private static final Logger log = Logger.getLogger(TransferErrorCallbackControllerFactory.class); + private static final Logger log = LogManager.getLogger(TransferErrorCallbackControllerFactory.class); public TransferErrorCallbackControllerFactory() { super("factory.transfererrorcallback.class"); diff --git a/core/src/main/java/ch/cyberduck/core/TransferPromptControllerFactory.java b/core/src/main/java/ch/cyberduck/core/TransferPromptControllerFactory.java index 64a8c31113f..b3d8fbc4c1d 100644 --- a/core/src/main/java/ch/cyberduck/core/TransferPromptControllerFactory.java +++ b/core/src/main/java/ch/cyberduck/core/TransferPromptControllerFactory.java @@ -24,13 +24,14 @@ import ch.cyberduck.core.transfer.TransferPrompt; import org.apache.commons.lang3.reflect.ConstructorUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; public class TransferPromptControllerFactory extends Factory { - private static final Logger log = Logger.getLogger(TransferPromptControllerFactory.class); + private static final Logger log = LogManager.getLogger(TransferPromptControllerFactory.class); public TransferPrompt create(final Controller c, final Transfer transfer, final SessionPool source, final SessionPool destination) { final String clazz = PreferencesFactory.get().getProperty( diff --git a/core/src/main/java/ch/cyberduck/core/URIEncoder.java b/core/src/main/java/ch/cyberduck/core/URIEncoder.java index a24d19ed50e..c9b77d1436e 100644 --- a/core/src/main/java/ch/cyberduck/core/URIEncoder.java +++ b/core/src/main/java/ch/cyberduck/core/URIEncoder.java @@ -19,7 +19,8 @@ */ import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; @@ -28,7 +29,7 @@ import java.util.StringTokenizer; public final class URIEncoder { - private static final Logger log = Logger.getLogger(URIEncoder.class); + private static final Logger log = LogManager.getLogger(URIEncoder.class); private URIEncoder() { // diff --git a/core/src/main/java/ch/cyberduck/core/UnsecureHostPasswordStore.java b/core/src/main/java/ch/cyberduck/core/UnsecureHostPasswordStore.java index 2cd567dcfcd..317854ca4f6 100644 --- a/core/src/main/java/ch/cyberduck/core/UnsecureHostPasswordStore.java +++ b/core/src/main/java/ch/cyberduck/core/UnsecureHostPasswordStore.java @@ -4,7 +4,8 @@ import ch.cyberduck.core.local.DefaultLocalDirectoryFeature; import ch.cyberduck.core.preferences.SupportDirectoryFinderFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; @@ -12,7 +13,7 @@ import java.util.Properties; public class UnsecureHostPasswordStore extends DefaultHostPasswordStore { - private static final Logger log = Logger.getLogger(UnsecureHostPasswordStore.class); + private static final Logger log = LogManager.getLogger(UnsecureHostPasswordStore.class); private final Local file = LocalFactory.get(SupportDirectoryFinderFactory.get().find(), "credentials"); diff --git a/core/src/main/java/ch/cyberduck/core/UserDateFormatterFactory.java b/core/src/main/java/ch/cyberduck/core/UserDateFormatterFactory.java index b571fc7f7fe..2ed6ae6cc80 100644 --- a/core/src/main/java/ch/cyberduck/core/UserDateFormatterFactory.java +++ b/core/src/main/java/ch/cyberduck/core/UserDateFormatterFactory.java @@ -20,14 +20,15 @@ import ch.cyberduck.core.date.AbstractUserDateFormatter; import org.apache.commons.lang3.reflect.ConstructorUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.TimeZone; public class UserDateFormatterFactory extends Factory { - private static final Logger log = Logger.getLogger(UserDateFormatterFactory.class); + private static final Logger log = LogManager.getLogger(UserDateFormatterFactory.class); private Constructor constructor; diff --git a/core/src/main/java/ch/cyberduck/core/aquaticprime/DictionaryLicense.java b/core/src/main/java/ch/cyberduck/core/aquaticprime/DictionaryLicense.java index 51b5f4403d9..47aac5dced6 100644 --- a/core/src/main/java/ch/cyberduck/core/aquaticprime/DictionaryLicense.java +++ b/core/src/main/java/ch/cyberduck/core/aquaticprime/DictionaryLicense.java @@ -21,7 +21,8 @@ import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.xml.sax.SAXException; import javax.crypto.BadPaddingException; @@ -51,7 +52,7 @@ import com.dd.plist.XMLPropertyListParser; public abstract class DictionaryLicense extends AbstractLicense { - private static final Logger log = Logger.getLogger(DictionaryLicense.class); + private static final Logger log = LogManager.getLogger(DictionaryLicense.class); private final Local file; private final NSDictionary dictionary; diff --git a/core/src/main/java/ch/cyberduck/core/aquaticprime/DisabledLicenseVerifierCallback.java b/core/src/main/java/ch/cyberduck/core/aquaticprime/DisabledLicenseVerifierCallback.java index bb5a34d4ba8..165f17b0d39 100644 --- a/core/src/main/java/ch/cyberduck/core/aquaticprime/DisabledLicenseVerifierCallback.java +++ b/core/src/main/java/ch/cyberduck/core/aquaticprime/DisabledLicenseVerifierCallback.java @@ -15,10 +15,11 @@ * GNU General Public License for more details. */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class DisabledLicenseVerifierCallback implements LicenseVerifierCallback { - private static final Logger log = Logger.getLogger(DisabledLicenseVerifierCallback.class); + private static final Logger log = LogManager.getLogger(DisabledLicenseVerifierCallback.class); @Override public void failure(final InvalidLicenseException failure) { diff --git a/core/src/main/java/ch/cyberduck/core/aquaticprime/DonationKey.java b/core/src/main/java/ch/cyberduck/core/aquaticprime/DonationKey.java index 4504a7b1ba2..523b49fe6c7 100644 --- a/core/src/main/java/ch/cyberduck/core/aquaticprime/DonationKey.java +++ b/core/src/main/java/ch/cyberduck/core/aquaticprime/DonationKey.java @@ -20,10 +20,11 @@ import ch.cyberduck.core.Local; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class DonationKey extends DictionaryLicense implements LicenseVerifier { - private static final Logger log = Logger.getLogger(DonationKey.class); + private static final Logger log = LogManager.getLogger(DonationKey.class); /** * @param file The license key file. diff --git a/core/src/main/java/ch/cyberduck/core/aquaticprime/DonationKeyFactory.java b/core/src/main/java/ch/cyberduck/core/aquaticprime/DonationKeyFactory.java index 603793843b0..dc017951612 100644 --- a/core/src/main/java/ch/cyberduck/core/aquaticprime/DonationKeyFactory.java +++ b/core/src/main/java/ch/cyberduck/core/aquaticprime/DonationKeyFactory.java @@ -25,14 +25,15 @@ import ch.cyberduck.core.preferences.ApplicationResourcesFinderFactory; import ch.cyberduck.core.preferences.SupportDirectoryFinderFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; import java.util.List; import java.util.regex.Pattern; public class DonationKeyFactory extends LicenseFactory { - private static final Logger log = Logger.getLogger(DonationKeyFactory.class); + private static final Logger log = LogManager.getLogger(DonationKeyFactory.class); @Override protected License create() { diff --git a/core/src/main/java/ch/cyberduck/core/aquaticprime/LicenseFactory.java b/core/src/main/java/ch/cyberduck/core/aquaticprime/LicenseFactory.java index 657890d7956..d08286be8d1 100644 --- a/core/src/main/java/ch/cyberduck/core/aquaticprime/LicenseFactory.java +++ b/core/src/main/java/ch/cyberduck/core/aquaticprime/LicenseFactory.java @@ -30,14 +30,15 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import ch.cyberduck.core.preferences.SupportDirectoryFinderFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; public abstract class LicenseFactory extends Factory { - private static final Logger log = Logger.getLogger(LicenseFactory.class); + private static final Logger log = LogManager.getLogger(LicenseFactory.class); private static final Preferences preferences = PreferencesFactory.get(); diff --git a/core/src/main/java/ch/cyberduck/core/aquaticprime/ReceiptFactory.java b/core/src/main/java/ch/cyberduck/core/aquaticprime/ReceiptFactory.java index 6e22c0c93bc..840b75b2c9a 100644 --- a/core/src/main/java/ch/cyberduck/core/aquaticprime/ReceiptFactory.java +++ b/core/src/main/java/ch/cyberduck/core/aquaticprime/ReceiptFactory.java @@ -25,13 +25,14 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import ch.cyberduck.core.preferences.SupportDirectoryFinderFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.List; import java.util.regex.Pattern; public class ReceiptFactory extends LicenseFactory { - private static final Logger log = Logger.getLogger(ReceiptFactory.class); + private static final Logger log = LogManager.getLogger(ReceiptFactory.class); /** * Application has determined that its receipt is invalid. Exit with a status of 173 diff --git a/core/src/main/java/ch/cyberduck/core/aquaticprime/ReceiptVerifier.java b/core/src/main/java/ch/cyberduck/core/aquaticprime/ReceiptVerifier.java index 776c84f48fb..0316acc0a1c 100644 --- a/core/src/main/java/ch/cyberduck/core/aquaticprime/ReceiptVerifier.java +++ b/core/src/main/java/ch/cyberduck/core/aquaticprime/ReceiptVerifier.java @@ -23,7 +23,8 @@ import org.apache.commons.codec.binary.Hex; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.bouncycastle.asn1.ASN1Encodable; import org.bouncycastle.asn1.ASN1Integer; import org.bouncycastle.asn1.ASN1Primitive; @@ -43,7 +44,6 @@ import java.io.FileInputStream; import java.io.IOException; import java.net.NetworkInterface; -import java.nio.charset.Charset; import java.nio.charset.StandardCharsets; import java.security.GeneralSecurityException; import java.security.MessageDigest; @@ -52,7 +52,7 @@ import java.util.Enumeration; public class ReceiptVerifier implements LicenseVerifier { - private static final Logger log = Logger.getLogger(ReceiptVerifier.class); + private static final Logger log = LogManager.getLogger(ReceiptVerifier.class); private final Local file; private final String application; diff --git a/core/src/main/java/ch/cyberduck/core/cache/LRUCache.java b/core/src/main/java/ch/cyberduck/core/cache/LRUCache.java index c5e5535df4f..6093df55352 100644 --- a/core/src/main/java/ch/cyberduck/core/cache/LRUCache.java +++ b/core/src/main/java/ch/cyberduck/core/cache/LRUCache.java @@ -15,7 +15,8 @@ * GNU General Public License for more details. */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; import java.util.Map; @@ -31,7 +32,7 @@ import com.google.common.util.concurrent.UncheckedExecutionException; public class LRUCache { - private static final Logger log = Logger.getLogger(LRUCache.class); + private static final Logger log = LogManager.getLogger(LRUCache.class); public static LRUCache usingLoader(final Function loader) { return usingLoader(loader, null, -1L, -1L); diff --git a/core/src/main/java/ch/cyberduck/core/date/CalendarService.java b/core/src/main/java/ch/cyberduck/core/date/CalendarService.java index a5726a30b13..d78fd6e7aaf 100644 --- a/core/src/main/java/ch/cyberduck/core/date/CalendarService.java +++ b/core/src/main/java/ch/cyberduck/core/date/CalendarService.java @@ -17,13 +17,14 @@ * Bug fixes, suggestions and comments should be sent to feedback@cyberduck.ch */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Calendar; import java.util.TimeZone; public class CalendarService implements DateDomainService { - private static final Logger log = Logger.getLogger(CalendarService.class); + private static final Logger log = LogManager.getLogger(CalendarService.class); private final TimeZone tz; diff --git a/core/src/main/java/ch/cyberduck/core/editor/AbstractEditor.java b/core/src/main/java/ch/cyberduck/core/editor/AbstractEditor.java index 1f773dcdadf..fbedd3ecbb3 100644 --- a/core/src/main/java/ch/cyberduck/core/editor/AbstractEditor.java +++ b/core/src/main/java/ch/cyberduck/core/editor/AbstractEditor.java @@ -45,14 +45,15 @@ import ch.cyberduck.core.transfer.TransferStatus; import ch.cyberduck.core.worker.Worker; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.text.MessageFormat; import java.util.Objects; public abstract class AbstractEditor implements Editor { - private static final Logger log = Logger.getLogger(AbstractEditor.class); + private static final Logger log = LogManager.getLogger(AbstractEditor.class); /** * File has changed but not uploaded yet diff --git a/core/src/main/java/ch/cyberduck/core/editor/DefaultEditorListener.java b/core/src/main/java/ch/cyberduck/core/editor/DefaultEditorListener.java index b0d3fe4cc5a..2e533ddd2a8 100644 --- a/core/src/main/java/ch/cyberduck/core/editor/DefaultEditorListener.java +++ b/core/src/main/java/ch/cyberduck/core/editor/DefaultEditorListener.java @@ -25,10 +25,11 @@ import ch.cyberduck.core.transfer.DisabledTransferErrorCallback; import ch.cyberduck.core.transfer.Transfer; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class DefaultEditorListener implements FileWatcherListener { - private static final Logger log = Logger.getLogger(DefaultEditorListener.class); + private static final Logger log = LogManager.getLogger(DefaultEditorListener.class); private final Controller controller; private final SessionPool session; diff --git a/core/src/main/java/ch/cyberduck/core/editor/DefaultWatchEditor.java b/core/src/main/java/ch/cyberduck/core/editor/DefaultWatchEditor.java index 9908c73f6ac..b114c55435e 100644 --- a/core/src/main/java/ch/cyberduck/core/editor/DefaultWatchEditor.java +++ b/core/src/main/java/ch/cyberduck/core/editor/DefaultWatchEditor.java @@ -29,14 +29,15 @@ import ch.cyberduck.core.local.FileWatcherListener; import ch.cyberduck.core.pool.SessionPool; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import com.google.common.util.concurrent.Uninterruptibles; public class DefaultWatchEditor extends AbstractEditor { - private static final Logger log = Logger.getLogger(DefaultWatchEditor.class); + private static final Logger log = LogManager.getLogger(DefaultWatchEditor.class); private final FileWatcher monitor = new FileWatcher(new NIOEventWatchService()); diff --git a/core/src/main/java/ch/cyberduck/core/editor/EditOpenWorker.java b/core/src/main/java/ch/cyberduck/core/editor/EditOpenWorker.java index a4460de781a..e360292228b 100644 --- a/core/src/main/java/ch/cyberduck/core/editor/EditOpenWorker.java +++ b/core/src/main/java/ch/cyberduck/core/editor/EditOpenWorker.java @@ -43,14 +43,15 @@ import ch.cyberduck.core.worker.SingleTransferWorker; import ch.cyberduck.core.worker.Worker; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.text.MessageFormat; import java.util.Objects; public class EditOpenWorker extends Worker { - private static final Logger log = Logger.getLogger(EditOpenWorker.class); + private static final Logger log = LogManager.getLogger(EditOpenWorker.class); private final AbstractEditor editor; private final Transfer download; diff --git a/core/src/main/java/ch/cyberduck/core/editor/EditSaveWorker.java b/core/src/main/java/ch/cyberduck/core/editor/EditSaveWorker.java index abc2b5e9190..06b8c471c0b 100644 --- a/core/src/main/java/ch/cyberduck/core/editor/EditSaveWorker.java +++ b/core/src/main/java/ch/cyberduck/core/editor/EditSaveWorker.java @@ -42,13 +42,14 @@ import ch.cyberduck.core.worker.SingleTransferWorker; import ch.cyberduck.core.worker.Worker; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.Objects; public class EditSaveWorker extends Worker { - private static final Logger log = Logger.getLogger(EditSaveWorker.class); + private static final Logger log = LogManager.getLogger(EditSaveWorker.class); private final AbstractEditor editor; private final Transfer upload; diff --git a/core/src/main/java/ch/cyberduck/core/editor/EditorFactory.java b/core/src/main/java/ch/cyberduck/core/editor/EditorFactory.java index d5cbc4d1692..26c4aabad73 100644 --- a/core/src/main/java/ch/cyberduck/core/editor/EditorFactory.java +++ b/core/src/main/java/ch/cyberduck/core/editor/EditorFactory.java @@ -29,13 +29,14 @@ import ch.cyberduck.core.preferences.Preferences; import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.List; public abstract class EditorFactory extends Factory { - private static final Logger log = Logger.getLogger(EditorFactory.class); + private static final Logger log = LogManager.getLogger(EditorFactory.class); private final Preferences preferences = PreferencesFactory.get(); @@ -161,4 +162,4 @@ public List getEditors(final String filename) { } return editors; } -} \ No newline at end of file +} diff --git a/core/src/main/java/ch/cyberduck/core/filter/DownloadDuplicateFilter.java b/core/src/main/java/ch/cyberduck/core/filter/DownloadDuplicateFilter.java index 65eaa7a54d0..18d995bc665 100644 --- a/core/src/main/java/ch/cyberduck/core/filter/DownloadDuplicateFilter.java +++ b/core/src/main/java/ch/cyberduck/core/filter/DownloadDuplicateFilter.java @@ -20,10 +20,11 @@ import ch.cyberduck.core.NullFilter; import ch.cyberduck.core.Path; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class DownloadDuplicateFilter extends NullFilter { - private static final Logger log = Logger.getLogger(DownloadDuplicateFilter.class); + private static final Logger log = LogManager.getLogger(DownloadDuplicateFilter.class); @Override public boolean accept(final Path file) { diff --git a/core/src/main/java/ch/cyberduck/core/filter/DownloadRegexFilter.java b/core/src/main/java/ch/cyberduck/core/filter/DownloadRegexFilter.java index 4c5e509cd53..dc2aa8b5f8b 100644 --- a/core/src/main/java/ch/cyberduck/core/filter/DownloadRegexFilter.java +++ b/core/src/main/java/ch/cyberduck/core/filter/DownloadRegexFilter.java @@ -21,13 +21,14 @@ import ch.cyberduck.core.Path; import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Objects; import java.util.regex.Pattern; public class DownloadRegexFilter extends DownloadDuplicateFilter { - private static final Logger log = Logger.getLogger(DownloadRegexFilter.class); + private static final Logger log = LogManager.getLogger(DownloadRegexFilter.class); private final Pattern pattern; diff --git a/core/src/main/java/ch/cyberduck/core/filter/UploadRegexFilter.java b/core/src/main/java/ch/cyberduck/core/filter/UploadRegexFilter.java index bf2922517d4..abd00f20c90 100644 --- a/core/src/main/java/ch/cyberduck/core/filter/UploadRegexFilter.java +++ b/core/src/main/java/ch/cyberduck/core/filter/UploadRegexFilter.java @@ -22,13 +22,14 @@ import ch.cyberduck.core.Local; import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Objects; import java.util.regex.Pattern; public class UploadRegexFilter implements Filter { - private static final Logger log = Logger.getLogger(UploadRegexFilter.class); + private static final Logger log = LogManager.getLogger(UploadRegexFilter.class); private final Pattern pattern; diff --git a/core/src/main/java/ch/cyberduck/core/http/AbstractHttpWriteFeature.java b/core/src/main/java/ch/cyberduck/core/http/AbstractHttpWriteFeature.java index 60e6a5e4c56..41b33d4a882 100644 --- a/core/src/main/java/ch/cyberduck/core/http/AbstractHttpWriteFeature.java +++ b/core/src/main/java/ch/cyberduck/core/http/AbstractHttpWriteFeature.java @@ -29,7 +29,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.http.message.BasicHeader; import org.apache.http.protocol.HTTP; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.OutputStream; @@ -39,7 +40,7 @@ import com.google.common.util.concurrent.Uninterruptibles; public abstract class AbstractHttpWriteFeature extends AppendWriteFeature implements HttpWriteFeature { - private static final Logger log = Logger.getLogger(AbstractHttpWriteFeature.class); + private static final Logger log = LogManager.getLogger(AbstractHttpWriteFeature.class); private abstract class FutureHttpResponse implements Runnable { Exception exception; diff --git a/core/src/main/java/ch/cyberduck/core/http/CallbackProxyAuthenticationStrategy.java b/core/src/main/java/ch/cyberduck/core/http/CallbackProxyAuthenticationStrategy.java index 804f070bfcd..df478526be4 100644 --- a/core/src/main/java/ch/cyberduck/core/http/CallbackProxyAuthenticationStrategy.java +++ b/core/src/main/java/ch/cyberduck/core/http/CallbackProxyAuthenticationStrategy.java @@ -45,7 +45,8 @@ import org.apache.http.impl.client.ProxyAuthenticationStrategy; import org.apache.http.impl.client.WinHttpClients; import org.apache.http.protocol.HttpContext; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.Arrays; @@ -58,7 +59,7 @@ import java.util.Queue; public class CallbackProxyAuthenticationStrategy extends ProxyAuthenticationStrategy { - private static final Logger log = Logger.getLogger(CallbackProxyAuthenticationStrategy.class); + private static final Logger log = LogManager.getLogger(CallbackProxyAuthenticationStrategy.class); private static final String PROXY_CREDENTIALS_INPUT_ID = "cyberduck.credentials.input"; diff --git a/core/src/main/java/ch/cyberduck/core/http/DelayedHttpEntity.java b/core/src/main/java/ch/cyberduck/core/http/DelayedHttpEntity.java index 1690217b5ba..c6a05c741be 100644 --- a/core/src/main/java/ch/cyberduck/core/http/DelayedHttpEntity.java +++ b/core/src/main/java/ch/cyberduck/core/http/DelayedHttpEntity.java @@ -21,7 +21,8 @@ import org.apache.commons.io.output.NullOutputStream; import org.apache.http.entity.AbstractHttpEntity; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; @@ -31,7 +32,7 @@ import com.google.common.util.concurrent.Uninterruptibles; public abstract class DelayedHttpEntity extends AbstractHttpEntity { - private static final Logger log = Logger.getLogger(DelayedHttpEntity.class); + private static final Logger log = LogManager.getLogger(DelayedHttpEntity.class); private final CountDownLatch entry; private final CountDownLatch exit = new CountDownLatch(1); diff --git a/core/src/main/java/ch/cyberduck/core/http/DelayedHttpMultipartEntity.java b/core/src/main/java/ch/cyberduck/core/http/DelayedHttpMultipartEntity.java index e1c1355446e..6126b567a24 100644 --- a/core/src/main/java/ch/cyberduck/core/http/DelayedHttpMultipartEntity.java +++ b/core/src/main/java/ch/cyberduck/core/http/DelayedHttpMultipartEntity.java @@ -23,7 +23,8 @@ import org.apache.http.entity.mime.MIME; import org.apache.http.protocol.HTTP; import org.apache.http.util.ByteArrayBuffer; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.OutputStream; @@ -36,7 +37,7 @@ import com.google.common.util.concurrent.Uninterruptibles; public class DelayedHttpMultipartEntity extends DelayedHttpEntity { - private static final Logger log = Logger.getLogger(DelayedHttpMultipartEntity.class); + private static final Logger log = LogManager.getLogger(DelayedHttpMultipartEntity.class); public static final String DEFAULT_BOUNDARY = "------------------------d8ad73fe428d737a"; diff --git a/core/src/main/java/ch/cyberduck/core/http/DisabledX509HostnameVerifier.java b/core/src/main/java/ch/cyberduck/core/http/DisabledX509HostnameVerifier.java index 1f177796dc3..c120e87cb39 100644 --- a/core/src/main/java/ch/cyberduck/core/http/DisabledX509HostnameVerifier.java +++ b/core/src/main/java/ch/cyberduck/core/http/DisabledX509HostnameVerifier.java @@ -1,12 +1,13 @@ package ch.cyberduck.core.http; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import javax.net.ssl.HostnameVerifier; import javax.net.ssl.SSLSession; public class DisabledX509HostnameVerifier implements HostnameVerifier { - private static final Logger log = Logger.getLogger(DisabledX509HostnameVerifier.class); + private static final Logger log = LogManager.getLogger(DisabledX509HostnameVerifier.class); @Override public boolean verify(final String host, final SSLSession sslSession) { diff --git a/core/src/main/java/ch/cyberduck/core/http/ExtendedHttpRequestRetryHandler.java b/core/src/main/java/ch/cyberduck/core/http/ExtendedHttpRequestRetryHandler.java index 928d981cb3f..60bf6b08f73 100644 --- a/core/src/main/java/ch/cyberduck/core/http/ExtendedHttpRequestRetryHandler.java +++ b/core/src/main/java/ch/cyberduck/core/http/ExtendedHttpRequestRetryHandler.java @@ -21,7 +21,8 @@ import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.http.impl.client.DefaultHttpRequestRetryHandler; import org.apache.http.protocol.HttpContext; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.io.UnrecoverableIOException; import javax.net.ssl.SSLHandshakeException; @@ -33,7 +34,7 @@ import java.util.List; public class ExtendedHttpRequestRetryHandler extends DefaultHttpRequestRetryHandler { - private static final Logger log = Logger.getLogger(ExtendedHttpRequestRetryHandler.class); + private static final Logger log = LogManager.getLogger(ExtendedHttpRequestRetryHandler.class); private static final List> exceptions = Arrays.asList( UnrecoverableIOException.class, diff --git a/core/src/main/java/ch/cyberduck/core/http/HttpConnectionPoolBuilder.java b/core/src/main/java/ch/cyberduck/core/http/HttpConnectionPoolBuilder.java index f6fdca1c6eb..39c784b3f5b 100644 --- a/core/src/main/java/ch/cyberduck/core/http/HttpConnectionPoolBuilder.java +++ b/core/src/main/java/ch/cyberduck/core/http/HttpConnectionPoolBuilder.java @@ -54,7 +54,8 @@ import org.apache.http.impl.client.WinHttpClients; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.apache.http.protocol.HttpContext; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.net.InetSocketAddress; @@ -62,7 +63,7 @@ import java.nio.charset.Charset; public class HttpConnectionPoolBuilder { - private static final Logger log = Logger.getLogger(HttpConnectionPoolBuilder.class); + private static final Logger log = LogManager.getLogger(HttpConnectionPoolBuilder.class); private final ConnectionSocketFactory socketFactory; private final ConnectionSocketFactory sslSocketFactory; diff --git a/core/src/main/java/ch/cyberduck/core/http/HttpResponseOutputStream.java b/core/src/main/java/ch/cyberduck/core/http/HttpResponseOutputStream.java index 103c5ed1bf6..3b944bc2071 100644 --- a/core/src/main/java/ch/cyberduck/core/http/HttpResponseOutputStream.java +++ b/core/src/main/java/ch/cyberduck/core/http/HttpResponseOutputStream.java @@ -22,13 +22,14 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.io.StatusOutputStream; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.OutputStream; public abstract class HttpResponseOutputStream extends StatusOutputStream { - private static final Logger log = Logger.getLogger(HttpResponseOutputStream.class); + private static final Logger log = LogManager.getLogger(HttpResponseOutputStream.class); public HttpResponseOutputStream(final OutputStream proxy) { super(proxy); diff --git a/core/src/main/java/ch/cyberduck/core/http/HttpUploadFeature.java b/core/src/main/java/ch/cyberduck/core/http/HttpUploadFeature.java index 18489375861..a1caacd9754 100644 --- a/core/src/main/java/ch/cyberduck/core/http/HttpUploadFeature.java +++ b/core/src/main/java/ch/cyberduck/core/http/HttpUploadFeature.java @@ -38,7 +38,8 @@ import org.apache.commons.codec.binary.Hex; import org.apache.commons.lang3.ObjectUtils; import org.apache.http.client.HttpResponseException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; @@ -46,7 +47,7 @@ import java.text.MessageFormat; public class HttpUploadFeature implements Upload { - private static final Logger log = Logger.getLogger(HttpUploadFeature.class); + private static final Logger log = LogManager.getLogger(HttpUploadFeature.class); private Write writer; diff --git a/core/src/main/java/ch/cyberduck/core/http/RateLimitingHttpRequestInterceptor.java b/core/src/main/java/ch/cyberduck/core/http/RateLimitingHttpRequestInterceptor.java index 4025bab8f16..3e36314cf09 100644 --- a/core/src/main/java/ch/cyberduck/core/http/RateLimitingHttpRequestInterceptor.java +++ b/core/src/main/java/ch/cyberduck/core/http/RateLimitingHttpRequestInterceptor.java @@ -17,10 +17,11 @@ import org.apache.http.HttpRequestInterceptor; import org.apache.http.protocol.HttpContext; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class RateLimitingHttpRequestInterceptor implements HttpRequestInterceptor { - private static final Logger log = Logger.getLogger(RateLimitingHttpRequestInterceptor.class); + private static final Logger log = LogManager.getLogger(RateLimitingHttpRequestInterceptor.class); private final HttpRateLimiter limiter; diff --git a/core/src/main/java/ch/cyberduck/core/i18n/RegexLocale.java b/core/src/main/java/ch/cyberduck/core/i18n/RegexLocale.java index 531c436197b..49e2e3afaff 100644 --- a/core/src/main/java/ch/cyberduck/core/i18n/RegexLocale.java +++ b/core/src/main/java/ch/cyberduck/core/i18n/RegexLocale.java @@ -22,7 +22,8 @@ import ch.cyberduck.core.cache.LRUCache; import ch.cyberduck.core.preferences.ApplicationResourcesFinderFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.File; import java.io.FileInputStream; @@ -37,7 +38,7 @@ import java.util.regex.Pattern; public class RegexLocale implements Locale { - private static final Logger log = Logger.getLogger(RegexLocale.class); + private static final Logger log = LogManager.getLogger(RegexLocale.class); /** * Loaded tables diff --git a/core/src/main/java/ch/cyberduck/core/idna/PunycodeConverter.java b/core/src/main/java/ch/cyberduck/core/idna/PunycodeConverter.java index 670ac2d8784..218e1627e5c 100644 --- a/core/src/main/java/ch/cyberduck/core/idna/PunycodeConverter.java +++ b/core/src/main/java/ch/cyberduck/core/idna/PunycodeConverter.java @@ -20,12 +20,13 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.net.IDN; public class PunycodeConverter { - private static final Logger log = Logger.getLogger(PunycodeConverter.class); + private static final Logger log = LogManager.getLogger(PunycodeConverter.class); /** * @return IDN normalized hostname diff --git a/core/src/main/java/ch/cyberduck/core/io/BandwidthThrottle.java b/core/src/main/java/ch/cyberduck/core/io/BandwidthThrottle.java index 16f7776d24c..c87522ae87a 100644 --- a/core/src/main/java/ch/cyberduck/core/io/BandwidthThrottle.java +++ b/core/src/main/java/ch/cyberduck/core/io/BandwidthThrottle.java @@ -1,6 +1,7 @@ package ch.cyberduck.core.io; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.concurrent.TimeUnit; @@ -34,7 +35,7 @@ * class from the Freenet project. It has been simplified and better documented.

*/ public final class BandwidthThrottle { - private static final Logger log = Logger.getLogger(BandwidthThrottle.class); + private static final Logger log = LogManager.getLogger(BandwidthThrottle.class); /** * The number of windows per second. diff --git a/core/src/main/java/ch/cyberduck/core/io/BufferOutputStream.java b/core/src/main/java/ch/cyberduck/core/io/BufferOutputStream.java index f097104fd7a..4872bfbb390 100644 --- a/core/src/main/java/ch/cyberduck/core/io/BufferOutputStream.java +++ b/core/src/main/java/ch/cyberduck/core/io/BufferOutputStream.java @@ -17,13 +17,14 @@ import org.apache.commons.io.output.NullOutputStream; import org.apache.commons.io.output.ProxyOutputStream; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.OutputStream; public class BufferOutputStream extends ProxyOutputStream { - private static final Logger log = Logger.getLogger(BufferOutputStream.class.getName()); + private static final Logger log = LogManager.getLogger(BufferOutputStream.class.getName()); private final Buffer buffer; diff --git a/core/src/main/java/ch/cyberduck/core/io/BufferSegmentingOutputStream.java b/core/src/main/java/ch/cyberduck/core/io/BufferSegmentingOutputStream.java index 5db6172a551..fd7d60ca3a3 100644 --- a/core/src/main/java/ch/cyberduck/core/io/BufferSegmentingOutputStream.java +++ b/core/src/main/java/ch/cyberduck/core/io/BufferSegmentingOutputStream.java @@ -17,13 +17,14 @@ import org.apache.commons.io.IOUtils; import org.apache.commons.io.output.NullOutputStream; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.OutputStream; public class BufferSegmentingOutputStream extends SegmentingOutputStream { - private static final Logger log = Logger.getLogger(BufferSegmentingOutputStream.class); + private static final Logger log = LogManager.getLogger(BufferSegmentingOutputStream.class); private final OutputStream proxy; private final Buffer buffer; diff --git a/core/src/main/java/ch/cyberduck/core/io/Checksum.java b/core/src/main/java/ch/cyberduck/core/io/Checksum.java index 6f3f7c0c380..d6c9cee9a35 100644 --- a/core/src/main/java/ch/cyberduck/core/io/Checksum.java +++ b/core/src/main/java/ch/cyberduck/core/io/Checksum.java @@ -19,10 +19,11 @@ */ import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public final class Checksum { - private static final Logger log = Logger.getLogger(Checksum.class); + private static final Logger log = LogManager.getLogger(Checksum.class); public final HashAlgorithm algorithm; public final String hash; diff --git a/core/src/main/java/ch/cyberduck/core/io/FileBuffer.java b/core/src/main/java/ch/cyberduck/core/io/FileBuffer.java index a7fbf6615ae..57030381809 100644 --- a/core/src/main/java/ch/cyberduck/core/io/FileBuffer.java +++ b/core/src/main/java/ch/cyberduck/core/io/FileBuffer.java @@ -24,14 +24,15 @@ import org.apache.commons.io.IOUtils; import org.apache.commons.io.input.NullInputStream; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.RandomAccessFile; import java.nio.file.Paths; public class FileBuffer implements Buffer { - private static final Logger log = Logger.getLogger(FileBuffer.class); + private static final Logger log = LogManager.getLogger(FileBuffer.class); private final Local temporary; diff --git a/core/src/main/java/ch/cyberduck/core/io/MemorySegementingOutputStream.java b/core/src/main/java/ch/cyberduck/core/io/MemorySegementingOutputStream.java index 1ed442a62f8..ca3bf7dd15b 100644 --- a/core/src/main/java/ch/cyberduck/core/io/MemorySegementingOutputStream.java +++ b/core/src/main/java/ch/cyberduck/core/io/MemorySegementingOutputStream.java @@ -15,7 +15,8 @@ * GNU General Public License for more details. */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -24,7 +25,7 @@ import java.util.concurrent.atomic.AtomicBoolean; public class MemorySegementingOutputStream extends SegmentingOutputStream { - private static final Logger log = Logger.getLogger(MemorySegementingOutputStream.class); + private static final Logger log = LogManager.getLogger(MemorySegementingOutputStream.class); private final OutputStream proxy; private final ByteArrayOutputStream buffer; diff --git a/core/src/main/java/ch/cyberduck/core/io/SegmentingOutputStream.java b/core/src/main/java/ch/cyberduck/core/io/SegmentingOutputStream.java index 1c5836a4041..d044e66f8d8 100644 --- a/core/src/main/java/ch/cyberduck/core/io/SegmentingOutputStream.java +++ b/core/src/main/java/ch/cyberduck/core/io/SegmentingOutputStream.java @@ -18,14 +18,15 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.io.output.ProxyOutputStream; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.OutputStream; import java.util.concurrent.atomic.AtomicBoolean; public abstract class SegmentingOutputStream extends ProxyOutputStream { - private static final Logger log = Logger.getLogger(SegmentingOutputStream.class); + private static final Logger log = LogManager.getLogger(SegmentingOutputStream.class); private final Long threshold; private Long written = 0L; diff --git a/core/src/main/java/ch/cyberduck/core/io/StreamCopier.java b/core/src/main/java/ch/cyberduck/core/io/StreamCopier.java index ba31964fe29..ff0e693266a 100644 --- a/core/src/main/java/ch/cyberduck/core/io/StreamCopier.java +++ b/core/src/main/java/ch/cyberduck/core/io/StreamCopier.java @@ -22,14 +22,15 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public final class StreamCopier { - private static final Logger log = Logger.getLogger(StreamCopier.class); + private static final Logger log = LogManager.getLogger(StreamCopier.class); private final StreamCancelation cancel; private final StreamProgress progress; diff --git a/core/src/main/java/ch/cyberduck/core/io/watchservice/NIOEventWatchService.java b/core/src/main/java/ch/cyberduck/core/io/watchservice/NIOEventWatchService.java index 55e5ef54544..ef9bc508eba 100644 --- a/core/src/main/java/ch/cyberduck/core/io/watchservice/NIOEventWatchService.java +++ b/core/src/main/java/ch/cyberduck/core/io/watchservice/NIOEventWatchService.java @@ -18,7 +18,8 @@ * feedback@cyberduck.io */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.nio.file.FileSystems; @@ -29,7 +30,7 @@ import java.util.concurrent.TimeUnit; public class NIOEventWatchService implements RegisterWatchService { - private static final Logger log = Logger.getLogger(NIOEventWatchService.class); + private static final Logger log = LogManager.getLogger(NIOEventWatchService.class); private WatchService monitor; diff --git a/core/src/main/java/ch/cyberduck/core/library/Native.java b/core/src/main/java/ch/cyberduck/core/library/Native.java index 3e5547bac70..259dfeb13a1 100644 --- a/core/src/main/java/ch/cyberduck/core/library/Native.java +++ b/core/src/main/java/ch/cyberduck/core/library/Native.java @@ -18,12 +18,13 @@ * dkocher@cyberduck.ch */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.File; public final class Native { - private static final Logger log = Logger.getLogger(Native.class); + private static final Logger log = LogManager.getLogger(Native.class); private Native() { // @@ -73,4 +74,4 @@ protected static String getPath(final String name) { protected static String getName(final String name) { return System.mapLibraryName(name); } -} \ No newline at end of file +} diff --git a/core/src/main/java/ch/cyberduck/core/local/AbstractTemporaryFileService.java b/core/src/main/java/ch/cyberduck/core/local/AbstractTemporaryFileService.java index b278c62cd8c..da03f59f494 100644 --- a/core/src/main/java/ch/cyberduck/core/local/AbstractTemporaryFileService.java +++ b/core/src/main/java/ch/cyberduck/core/local/AbstractTemporaryFileService.java @@ -20,7 +20,8 @@ import ch.cyberduck.core.exception.NotfoundException; import org.apache.commons.codec.digest.DigestUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.Collections; @@ -29,7 +30,7 @@ import java.util.concurrent.CopyOnWriteArraySet; public abstract class AbstractTemporaryFileService implements TemporaryFileService { - private static final Logger log = Logger.getLogger(AbstractTemporaryFileService.class); + private static final Logger log = LogManager.getLogger(AbstractTemporaryFileService.class); /** * Set of filenames to be deleted on VM exit through a shutdown hook. diff --git a/core/src/main/java/ch/cyberduck/core/local/DefaultLocalDirectoryFeature.java b/core/src/main/java/ch/cyberduck/core/local/DefaultLocalDirectoryFeature.java index cb70c27a2ea..dcc116d204c 100644 --- a/core/src/main/java/ch/cyberduck/core/local/DefaultLocalDirectoryFeature.java +++ b/core/src/main/java/ch/cyberduck/core/local/DefaultLocalDirectoryFeature.java @@ -21,7 +21,8 @@ import ch.cyberduck.core.exception.LocalAccessDeniedException; import ch.cyberduck.core.local.features.Directory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.nio.file.Files; @@ -29,7 +30,7 @@ import java.text.MessageFormat; public class DefaultLocalDirectoryFeature implements Directory { - private static final Logger log = Logger.getLogger(DefaultLocalDirectoryFeature.class); + private static final Logger log = LogManager.getLogger(DefaultLocalDirectoryFeature.class); @Override public void mkdir(final Local file) throws AccessDeniedException { diff --git a/core/src/main/java/ch/cyberduck/core/local/DefaultLocalTouchFeature.java b/core/src/main/java/ch/cyberduck/core/local/DefaultLocalTouchFeature.java index 8e24ce5aca6..4e26f14c8fc 100644 --- a/core/src/main/java/ch/cyberduck/core/local/DefaultLocalTouchFeature.java +++ b/core/src/main/java/ch/cyberduck/core/local/DefaultLocalTouchFeature.java @@ -23,7 +23,8 @@ import ch.cyberduck.core.exception.LocalAccessDeniedException; import ch.cyberduck.core.local.features.Touch; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.nio.file.FileAlreadyExistsException; @@ -33,7 +34,7 @@ import java.text.MessageFormat; public class DefaultLocalTouchFeature implements Touch { - private static final Logger log = Logger.getLogger(DefaultLocalTouchFeature.class); + private static final Logger log = LogManager.getLogger(DefaultLocalTouchFeature.class); @Override public void touch(final Local file) throws AccessDeniedException { diff --git a/core/src/main/java/ch/cyberduck/core/local/DefaultWorkingDirectoryFinder.java b/core/src/main/java/ch/cyberduck/core/local/DefaultWorkingDirectoryFinder.java index a34f3509861..821246fb0f8 100644 --- a/core/src/main/java/ch/cyberduck/core/local/DefaultWorkingDirectoryFinder.java +++ b/core/src/main/java/ch/cyberduck/core/local/DefaultWorkingDirectoryFinder.java @@ -21,10 +21,11 @@ import ch.cyberduck.core.Local; import ch.cyberduck.core.LocalFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class DefaultWorkingDirectoryFinder implements WorkingDirectoryFinder { - private static final Logger log = Logger.getLogger(DefaultWorkingDirectoryFinder.class); + private static final Logger log = LogManager.getLogger(DefaultWorkingDirectoryFinder.class); @Override public Local find() { diff --git a/core/src/main/java/ch/cyberduck/core/local/DesktopBrowserLauncher.java b/core/src/main/java/ch/cyberduck/core/local/DesktopBrowserLauncher.java index 87c86360472..817cd98effb 100644 --- a/core/src/main/java/ch/cyberduck/core/local/DesktopBrowserLauncher.java +++ b/core/src/main/java/ch/cyberduck/core/local/DesktopBrowserLauncher.java @@ -15,14 +15,15 @@ * GNU General Public License for more details. */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.awt.*; import java.io.IOException; import java.net.URI; public class DesktopBrowserLauncher implements BrowserLauncher { - private static final Logger log = Logger.getLogger(DesktopBrowserLauncher.class); + private static final Logger log = LogManager.getLogger(DesktopBrowserLauncher.class); @Override public boolean open(final String url) { diff --git a/core/src/main/java/ch/cyberduck/core/local/ExecApplicationLauncher.java b/core/src/main/java/ch/cyberduck/core/local/ExecApplicationLauncher.java index 9e6e5fba8b1..42aeace3d1a 100644 --- a/core/src/main/java/ch/cyberduck/core/local/ExecApplicationLauncher.java +++ b/core/src/main/java/ch/cyberduck/core/local/ExecApplicationLauncher.java @@ -22,13 +22,14 @@ import ch.cyberduck.core.threading.DefaultThreadPool; import ch.cyberduck.core.threading.ThreadPool; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.concurrent.Callable; public class ExecApplicationLauncher implements ApplicationLauncher { - private static final Logger log = Logger.getLogger(ExecApplicationLauncher.class); + private static final Logger log = LogManager.getLogger(ExecApplicationLauncher.class); private final Runtime runtime = Runtime.getRuntime(); diff --git a/core/src/main/java/ch/cyberduck/core/local/FileWatcher.java b/core/src/main/java/ch/cyberduck/core/local/FileWatcher.java index e5b3ec991be..2a378363ae0 100644 --- a/core/src/main/java/ch/cyberduck/core/local/FileWatcher.java +++ b/core/src/main/java/ch/cyberduck/core/local/FileWatcher.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.threading.ThreadPool; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.File; import java.io.IOException; @@ -42,7 +43,7 @@ import static java.nio.file.StandardWatchEventKinds.*; public final class FileWatcher { - private static final Logger log = Logger.getLogger(FileWatcher.class); + private static final Logger log = LogManager.getLogger(FileWatcher.class); private final RegisterWatchService monitor; private final ThreadPool pool; diff --git a/core/src/main/java/ch/cyberduck/core/local/LibcWorkingDirectoryFinder.java b/core/src/main/java/ch/cyberduck/core/local/LibcWorkingDirectoryFinder.java index 737bcc77115..0eb3bf5ebb9 100644 --- a/core/src/main/java/ch/cyberduck/core/local/LibcWorkingDirectoryFinder.java +++ b/core/src/main/java/ch/cyberduck/core/local/LibcWorkingDirectoryFinder.java @@ -20,14 +20,15 @@ import ch.cyberduck.core.Local; import ch.cyberduck.core.LocalFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import com.sun.jna.Library; import com.sun.jna.Native; import com.sun.jna.Pointer; public class LibcWorkingDirectoryFinder implements WorkingDirectoryFinder { - private static final Logger log = Logger.getLogger(LibcWorkingDirectoryFinder.class); + private static final Logger log = LogManager.getLogger(LibcWorkingDirectoryFinder.class); private static final CLibrary library = Native.load("c", CLibrary.class); diff --git a/core/src/main/java/ch/cyberduck/core/local/NativeLocalTrashFeature.java b/core/src/main/java/ch/cyberduck/core/local/NativeLocalTrashFeature.java index 3cb32105847..86c23800020 100644 --- a/core/src/main/java/ch/cyberduck/core/local/NativeLocalTrashFeature.java +++ b/core/src/main/java/ch/cyberduck/core/local/NativeLocalTrashFeature.java @@ -19,7 +19,8 @@ import ch.cyberduck.core.exception.LocalAccessDeniedException; import ch.cyberduck.core.local.features.Trash; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.File; import java.io.IOException; @@ -27,7 +28,7 @@ import com.sun.jna.platform.FileUtils; public class NativeLocalTrashFeature implements Trash { - private static final Logger log = Logger.getLogger(NativeLocalTrashFeature.class); + private static final Logger log = LogManager.getLogger(NativeLocalTrashFeature.class); @Override public void trash(final Local file) throws LocalAccessDeniedException { diff --git a/core/src/main/java/ch/cyberduck/core/local/TildeExpander.java b/core/src/main/java/ch/cyberduck/core/local/TildeExpander.java index 64e4ddafeb7..797465ccc12 100644 --- a/core/src/main/java/ch/cyberduck/core/local/TildeExpander.java +++ b/core/src/main/java/ch/cyberduck/core/local/TildeExpander.java @@ -23,10 +23,11 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class TildeExpander { - private static final Logger log = Logger.getLogger(TildeExpander.class); + private static final Logger log = LogManager.getLogger(TildeExpander.class); private final Preferences preferences = PreferencesFactory.get(); diff --git a/core/src/main/java/ch/cyberduck/core/logging/LoggerPrintStream.java b/core/src/main/java/ch/cyberduck/core/logging/LoggerPrintStream.java index b89a13818ec..19333ca79ea 100644 --- a/core/src/main/java/ch/cyberduck/core/logging/LoggerPrintStream.java +++ b/core/src/main/java/ch/cyberduck/core/logging/LoggerPrintStream.java @@ -16,18 +16,19 @@ */ import org.apache.commons.io.output.NullOutputStream; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.apache.log4j.helpers.LogLog; +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.status.StatusLogger; import java.io.OutputStream; import java.io.PrintStream; public class LoggerPrintStream extends PrintStream { - private static final Logger log = Logger.getLogger(LoggerPrintStream.class); + private static final Logger log = LogManager.getLogger(LoggerPrintStream.class); static { - LogLog.setQuietMode(true); + StatusLogger.getLogger().setLevel(Level.OFF); } private final Level level; diff --git a/core/src/main/java/ch/cyberduck/core/notification/DisabledNotificationService.java b/core/src/main/java/ch/cyberduck/core/notification/DisabledNotificationService.java index 3b25905b8c3..c504d820ee2 100644 --- a/core/src/main/java/ch/cyberduck/core/notification/DisabledNotificationService.java +++ b/core/src/main/java/ch/cyberduck/core/notification/DisabledNotificationService.java @@ -18,10 +18,11 @@ * feedback@cyberduck.io */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public final class DisabledNotificationService implements NotificationService { - private static final Logger log = Logger.getLogger(DisabledNotificationService.class); + private static final Logger log = LogManager.getLogger(DisabledNotificationService.class); @Override public NotificationService setup() { diff --git a/core/src/main/java/ch/cyberduck/core/pool/DefaultSessionPool.java b/core/src/main/java/ch/cyberduck/core/pool/DefaultSessionPool.java index ed9b56f85ac..fda8277a8ad 100644 --- a/core/src/main/java/ch/cyberduck/core/pool/DefaultSessionPool.java +++ b/core/src/main/java/ch/cyberduck/core/pool/DefaultSessionPool.java @@ -38,13 +38,14 @@ import org.apache.commons.pool2.impl.EvictionPolicy; import org.apache.commons.pool2.impl.GenericObjectPool; import org.apache.commons.pool2.impl.GenericObjectPoolConfig; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.time.Duration; import java.util.NoSuchElementException; public class DefaultSessionPool implements SessionPool { - private static final Logger log = Logger.getLogger(DefaultSessionPool.class); + private static final Logger log = LogManager.getLogger(DefaultSessionPool.class); private static final long BORROW_MAX_WAIT_INTERVAL = 1000L; private static final int POOL_WARNING_THRESHOLD = 5; diff --git a/core/src/main/java/ch/cyberduck/core/pool/PooledSessionFactory.java b/core/src/main/java/ch/cyberduck/core/pool/PooledSessionFactory.java index 633cd888ac7..e0504a9c6e9 100644 --- a/core/src/main/java/ch/cyberduck/core/pool/PooledSessionFactory.java +++ b/core/src/main/java/ch/cyberduck/core/pool/PooledSessionFactory.java @@ -30,10 +30,11 @@ import org.apache.commons.pool2.BasePooledObjectFactory; import org.apache.commons.pool2.PooledObject; import org.apache.commons.pool2.impl.DefaultPooledObject; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class PooledSessionFactory extends BasePooledObjectFactory { - private static final Logger log = Logger.getLogger(PooledSessionFactory.class); + private static final Logger log = LogManager.getLogger(PooledSessionFactory.class); private final ConnectionService connect; private final X509TrustManager trust; diff --git a/core/src/main/java/ch/cyberduck/core/pool/StatefulSessionPool.java b/core/src/main/java/ch/cyberduck/core/pool/StatefulSessionPool.java index c4eb842d0de..8fd9d97107c 100644 --- a/core/src/main/java/ch/cyberduck/core/pool/StatefulSessionPool.java +++ b/core/src/main/java/ch/cyberduck/core/pool/StatefulSessionPool.java @@ -23,13 +23,14 @@ import ch.cyberduck.core.threading.BackgroundActionState; import ch.cyberduck.core.vault.VaultRegistry; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; public class StatefulSessionPool extends StatelessSessionPool { - private static final Logger log = Logger.getLogger(StatefulSessionPool.class); + private static final Logger log = LogManager.getLogger(StatefulSessionPool.class); private final Lock lock = new ReentrantLock(); private final Session session; diff --git a/core/src/main/java/ch/cyberduck/core/pool/StatelessSessionPool.java b/core/src/main/java/ch/cyberduck/core/pool/StatelessSessionPool.java index 8464c3323a4..14171ce622c 100644 --- a/core/src/main/java/ch/cyberduck/core/pool/StatelessSessionPool.java +++ b/core/src/main/java/ch/cyberduck/core/pool/StatelessSessionPool.java @@ -26,13 +26,14 @@ import ch.cyberduck.core.threading.FailureDiagnostics; import ch.cyberduck.core.vault.VaultRegistry; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; public class StatelessSessionPool implements SessionPool { - private static final Logger log = Logger.getLogger(StatelessSessionPool.class); + private static final Logger log = LogManager.getLogger(StatelessSessionPool.class); private final FailureDiagnostics diagnostics = new DefaultFailureDiagnostics(); private final ConnectionService connect; diff --git a/core/src/main/java/ch/cyberduck/core/preferences/Preferences.java b/core/src/main/java/ch/cyberduck/core/preferences/Preferences.java index 9a2a39d548e..fc24feacbd5 100755 --- a/core/src/main/java/ch/cyberduck/core/preferences/Preferences.java +++ b/core/src/main/java/ch/cyberduck/core/preferences/Preferences.java @@ -67,10 +67,14 @@ import ch.cyberduck.ui.quicklook.ApplicationLauncherQuicklook; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Level; -import org.apache.log4j.LogManager; -import org.apache.log4j.Logger; -import org.apache.log4j.xml.DOMConfigurator; +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.core.LoggerContext; +import org.apache.logging.log4j.core.config.ConfigurationSource; +import org.apache.logging.log4j.core.config.Configurator; +import org.apache.logging.log4j.core.config.DefaultConfiguration; +import org.apache.logging.log4j.core.config.LoggerConfig; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.slf4j.bridge.SLF4JBridgeHandler; @@ -80,8 +84,8 @@ import java.net.URL; import java.nio.charset.StandardCharsets; import java.security.Security; +import java.util.Collection; import java.util.Date; -import java.util.Enumeration; import java.util.List; import java.util.Map; import java.util.Properties; @@ -94,7 +98,7 @@ * Singleton class. */ public abstract class Preferences implements Locales, PreferencesReader { - private static final Logger log = Logger.getLogger(Preferences.class); + private static final Logger log = LogManager.getLogger(Preferences.class); protected static final String LIST_SEPERATOR = StringUtils.SPACE; @@ -1202,13 +1206,18 @@ protected void configureLogging(final String level) { else { configuration = Preferences.class.getClassLoader().getResource(file); } - LogManager.resetConfiguration(); - final Logger root = Logger.getRootLogger(); + Configurator.initialize(new DefaultConfiguration()); + final Logger root = LogManager.getRootLogger(); if(null != configuration) { - DOMConfigurator.configure(configuration); + try { + Configurator.initialize(null, new ConfigurationSource(configuration.openStream())); + } + catch(IOException e) { + log.error(String.format("Unable to load log4j configuration from %s", configuration.toExternalForm())); + } } // Allow to override default logging level - root.setLevel(Level.toLevel(level, Level.ERROR)); + Configurator.setRootLevel(Level.toLevel(level, Level.ERROR)); // Map logging level to pass through bridge final ImmutableMap map = new ImmutableMap.Builder() .put(Level.ALL, java.util.logging.Level.ALL) @@ -1221,11 +1230,11 @@ protected void configureLogging(final String level) { .put(Level.WARN, java.util.logging.Level.WARNING) .build(); java.util.logging.Logger.getLogger("").setLevel(map.get(root.getLevel())); - final Enumeration loggers = LogManager.getCurrentLoggers(); - while(loggers.hasMoreElements()) { - final Logger logger = (Logger) loggers.nextElement(); - if(logger.getLevel() != null) { - java.util.logging.Logger.getLogger(logger.getName()).setLevel(map.get(logger.getLevel())); + final LoggerContext logContext = (LoggerContext) LogManager.getContext(false); + final Collection loggerConfigs = logContext.getConfiguration().getLoggers().values(); + for(LoggerConfig loggerConfig : loggerConfigs) { + if(loggerConfig.getLevel() != null) { + java.util.logging.Logger.getLogger(loggerConfig.getName()).setLevel(map.get(loggerConfig.getLevel())); } } } diff --git a/core/src/main/java/ch/cyberduck/core/preferences/PreferencesFactory.java b/core/src/main/java/ch/cyberduck/core/preferences/PreferencesFactory.java index 80a1eea184c..b82146042f7 100644 --- a/core/src/main/java/ch/cyberduck/core/preferences/PreferencesFactory.java +++ b/core/src/main/java/ch/cyberduck/core/preferences/PreferencesFactory.java @@ -20,7 +20,8 @@ import ch.cyberduck.core.LocalFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public final class PreferencesFactory { private PreferencesFactory() { @@ -37,7 +38,7 @@ public static synchronized void set(final Preferences p) { // Apply global configuration preferences.setDefaults(LocalFactory.get(SupportDirectoryFinderFactory.get().find(), "default.properties")); preferences.configureLogging(preferences.getProperty("logging")); - final Logger log = Logger.getLogger(PreferencesFactory.class); + final Logger log = LogManager.getLogger(PreferencesFactory.class); if(log.isInfoEnabled()) { log.info(String.format("Running version %s.%s (%s)", preferences.getProperty("application.version"), diff --git a/core/src/main/java/ch/cyberduck/core/preferences/PreferencesReader.java b/core/src/main/java/ch/cyberduck/core/preferences/PreferencesReader.java index 4a87634b97d..06e06b43fdb 100644 --- a/core/src/main/java/ch/cyberduck/core/preferences/PreferencesReader.java +++ b/core/src/main/java/ch/cyberduck/core/preferences/PreferencesReader.java @@ -16,7 +16,8 @@ */ import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Arrays; import java.util.Collections; @@ -25,7 +26,7 @@ import java.util.Map; public interface PreferencesReader { - Logger log = Logger.getLogger(PreferencesReader.class); + Logger log = LogManager.getLogger(PreferencesReader.class); /** * Give value in user settings or default value if not customized. diff --git a/core/src/main/java/ch/cyberduck/core/preferences/StaticApplicationResourcesFinder.java b/core/src/main/java/ch/cyberduck/core/preferences/StaticApplicationResourcesFinder.java index 4d970018d0e..544bb5a876f 100644 --- a/core/src/main/java/ch/cyberduck/core/preferences/StaticApplicationResourcesFinder.java +++ b/core/src/main/java/ch/cyberduck/core/preferences/StaticApplicationResourcesFinder.java @@ -21,10 +21,11 @@ import ch.cyberduck.core.Local; import ch.cyberduck.core.local.DefaultWorkingDirectoryFinder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class StaticApplicationResourcesFinder implements ApplicationResourcesFinder { - private static final Logger log = Logger.getLogger(StaticApplicationResourcesFinder.class); + private static final Logger log = LogManager.getLogger(StaticApplicationResourcesFinder.class); @Override public Local find() { diff --git a/core/src/main/java/ch/cyberduck/core/preferences/TemporaryApplicationResourcesFinder.java b/core/src/main/java/ch/cyberduck/core/preferences/TemporaryApplicationResourcesFinder.java index 505b5fa3229..0d24191beb7 100644 --- a/core/src/main/java/ch/cyberduck/core/preferences/TemporaryApplicationResourcesFinder.java +++ b/core/src/main/java/ch/cyberduck/core/preferences/TemporaryApplicationResourcesFinder.java @@ -21,10 +21,11 @@ import ch.cyberduck.core.Local; import ch.cyberduck.core.LocalFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class TemporaryApplicationResourcesFinder implements ApplicationResourcesFinder { - private static final Logger log = Logger.getLogger(TemporaryApplicationResourcesFinder.class); + private static final Logger log = LogManager.getLogger(TemporaryApplicationResourcesFinder.class); private final Preferences preferences = PreferencesFactory.get(); diff --git a/core/src/main/java/ch/cyberduck/core/preferences/TemporarySupportDirectoryFinder.java b/core/src/main/java/ch/cyberduck/core/preferences/TemporarySupportDirectoryFinder.java index a573faa8ea0..6636d74d8d0 100644 --- a/core/src/main/java/ch/cyberduck/core/preferences/TemporarySupportDirectoryFinder.java +++ b/core/src/main/java/ch/cyberduck/core/preferences/TemporarySupportDirectoryFinder.java @@ -21,10 +21,11 @@ import ch.cyberduck.core.Local; import ch.cyberduck.core.LocalFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class TemporarySupportDirectoryFinder implements SupportDirectoryFinder { - private static final Logger log = Logger.getLogger(TemporarySupportDirectoryFinder.class); + private static final Logger log = LogManager.getLogger(TemporarySupportDirectoryFinder.class); @Override public Local find() { diff --git a/core/src/main/java/ch/cyberduck/core/preferences/UserHomeSupportDirectoryFinder.java b/core/src/main/java/ch/cyberduck/core/preferences/UserHomeSupportDirectoryFinder.java index 0f41981c026..2267f19804b 100644 --- a/core/src/main/java/ch/cyberduck/core/preferences/UserHomeSupportDirectoryFinder.java +++ b/core/src/main/java/ch/cyberduck/core/preferences/UserHomeSupportDirectoryFinder.java @@ -21,10 +21,11 @@ import ch.cyberduck.core.Local; import ch.cyberduck.core.LocalFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class UserHomeSupportDirectoryFinder implements SupportDirectoryFinder { - private static final Logger log = Logger.getLogger(UserHomeSupportDirectoryFinder.class); + private static final Logger log = LogManager.getLogger(UserHomeSupportDirectoryFinder.class); private final Preferences preferences = PreferencesFactory.get(); diff --git a/core/src/main/java/ch/cyberduck/core/profiles/ChecksumProfileMatcher.java b/core/src/main/java/ch/cyberduck/core/profiles/ChecksumProfileMatcher.java index b0ec9dc1cc4..5f9b74c043c 100644 --- a/core/src/main/java/ch/cyberduck/core/profiles/ChecksumProfileMatcher.java +++ b/core/src/main/java/ch/cyberduck/core/profiles/ChecksumProfileMatcher.java @@ -15,7 +15,8 @@ * GNU General Public License for more details. */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Objects; import java.util.Optional; @@ -25,7 +26,7 @@ * Match checksum with all versions found in repository */ public class ChecksumProfileMatcher implements ProfileMatcher { - private static final Logger log = Logger.getLogger(ChecksumProfileMatcher.class.getName()); + private static final Logger log = LogManager.getLogger(ChecksumProfileMatcher.class.getName()); /** * Remote list of profiles diff --git a/core/src/main/java/ch/cyberduck/core/profiles/LocalProfilesFinder.java b/core/src/main/java/ch/cyberduck/core/profiles/LocalProfilesFinder.java index 42fff8b2ad5..e0a81098cae 100644 --- a/core/src/main/java/ch/cyberduck/core/profiles/LocalProfilesFinder.java +++ b/core/src/main/java/ch/cyberduck/core/profiles/LocalProfilesFinder.java @@ -21,7 +21,8 @@ import ch.cyberduck.core.ProtocolFactory; import ch.cyberduck.core.exception.AccessDeniedException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; import java.util.Set; @@ -29,7 +30,7 @@ import java.util.stream.Collectors; public class LocalProfilesFinder implements ProfilesFinder { - private static final Logger log = Logger.getLogger(LocalProfilesFinder.class); + private static final Logger log = LogManager.getLogger(LocalProfilesFinder.class); private final ProtocolFactory protocols; private final Local directory; diff --git a/core/src/main/java/ch/cyberduck/core/profiles/PeriodicProfilesUpdater.java b/core/src/main/java/ch/cyberduck/core/profiles/PeriodicProfilesUpdater.java index 143c7933377..25390948c52 100644 --- a/core/src/main/java/ch/cyberduck/core/profiles/PeriodicProfilesUpdater.java +++ b/core/src/main/java/ch/cyberduck/core/profiles/PeriodicProfilesUpdater.java @@ -19,7 +19,8 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.time.Duration; import java.util.Set; @@ -28,7 +29,7 @@ import java.util.concurrent.Future; public class PeriodicProfilesUpdater implements ProfilesUpdater { - private static final Logger log = Logger.getLogger(PeriodicProfilesUpdater.class.getName()); + private static final Logger log = LogManager.getLogger(PeriodicProfilesUpdater.class.getName()); private final Controller controller; private final Duration delay; diff --git a/core/src/main/java/ch/cyberduck/core/profiles/ProfileDescription.java b/core/src/main/java/ch/cyberduck/core/profiles/ProfileDescription.java index 4a9fbd079c5..2aee0d8a3bb 100644 --- a/core/src/main/java/ch/cyberduck/core/profiles/ProfileDescription.java +++ b/core/src/main/java/ch/cyberduck/core/profiles/ProfileDescription.java @@ -24,7 +24,8 @@ import org.apache.commons.lang3.concurrent.ConcurrentException; import org.apache.commons.lang3.concurrent.LazyInitializer; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Objects; import java.util.Optional; @@ -33,7 +34,7 @@ * Profile metadata */ public class ProfileDescription { - private static final Logger log = Logger.getLogger(ProfileDescription.class); + private static final Logger log = LogManager.getLogger(ProfileDescription.class); private final LazyInitializer checksum; private final LazyInitializer local; diff --git a/core/src/main/java/ch/cyberduck/core/profiles/ProfilesSynchronizeWorker.java b/core/src/main/java/ch/cyberduck/core/profiles/ProfilesSynchronizeWorker.java index 3ad57c55449..118c05b8091 100644 --- a/core/src/main/java/ch/cyberduck/core/profiles/ProfilesSynchronizeWorker.java +++ b/core/src/main/java/ch/cyberduck/core/profiles/ProfilesSynchronizeWorker.java @@ -24,7 +24,8 @@ import ch.cyberduck.core.preferences.SupportDirectoryFinderFactory; import ch.cyberduck.core.worker.Worker; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; import java.util.HashSet; @@ -35,7 +36,7 @@ * Merge local set with latest versions from server */ public class ProfilesSynchronizeWorker extends Worker> { - private static final Logger log = Logger.getLogger(ProfilesSynchronizeWorker.class.getName()); + private static final Logger log = LogManager.getLogger(ProfilesSynchronizeWorker.class.getName()); private final ProtocolFactory registry; private final Local directory; diff --git a/core/src/main/java/ch/cyberduck/core/profiles/RemoteProfilesFinder.java b/core/src/main/java/ch/cyberduck/core/profiles/RemoteProfilesFinder.java index f5e86299260..6186d071be1 100644 --- a/core/src/main/java/ch/cyberduck/core/profiles/RemoteProfilesFinder.java +++ b/core/src/main/java/ch/cyberduck/core/profiles/RemoteProfilesFinder.java @@ -36,7 +36,8 @@ import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.concurrent.ConcurrentException; import org.apache.commons.lang3.concurrent.LazyInitializer; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; @@ -46,7 +47,7 @@ import java.util.stream.Collectors; public class RemoteProfilesFinder implements ProfilesFinder { - private static final Logger log = Logger.getLogger(RemoteProfilesFinder.class); + private static final Logger log = LogManager.getLogger(RemoteProfilesFinder.class); private final ProtocolFactory protocols; private final Session session; diff --git a/core/src/main/java/ch/cyberduck/core/proxy/AbstractProxyFinder.java b/core/src/main/java/ch/cyberduck/core/proxy/AbstractProxyFinder.java index 13584746813..33bb09ca87f 100644 --- a/core/src/main/java/ch/cyberduck/core/proxy/AbstractProxyFinder.java +++ b/core/src/main/java/ch/cyberduck/core/proxy/AbstractProxyFinder.java @@ -20,12 +20,13 @@ */ import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.regex.PatternSyntaxException; public abstract class AbstractProxyFinder implements ProxyFinder { - private static final Logger log = Logger.getLogger(AbstractProxyFinder.class); + private static final Logger log = LogManager.getLogger(AbstractProxyFinder.class); /** * @param wildcard Pattern diff --git a/core/src/main/java/ch/cyberduck/core/proxy/EnvironmentVariableProxyFinder.java b/core/src/main/java/ch/cyberduck/core/proxy/EnvironmentVariableProxyFinder.java index ed1e482dd53..cfd14e8e299 100644 --- a/core/src/main/java/ch/cyberduck/core/proxy/EnvironmentVariableProxyFinder.java +++ b/core/src/main/java/ch/cyberduck/core/proxy/EnvironmentVariableProxyFinder.java @@ -5,13 +5,14 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.net.URI; import java.net.URISyntaxException; public class EnvironmentVariableProxyFinder implements ProxyFinder { - private static final Logger log = Logger.getLogger(EnvironmentVariableProxyFinder.class); + private static final Logger log = LogManager.getLogger(EnvironmentVariableProxyFinder.class); private final Preferences preferences = PreferencesFactory.get(); diff --git a/core/src/main/java/ch/cyberduck/core/proxy/ProxySocketFactory.java b/core/src/main/java/ch/cyberduck/core/proxy/ProxySocketFactory.java index 26e6c776222..ed3b18baebb 100644 --- a/core/src/main/java/ch/cyberduck/core/proxy/ProxySocketFactory.java +++ b/core/src/main/java/ch/cyberduck/core/proxy/ProxySocketFactory.java @@ -18,13 +18,13 @@ */ import ch.cyberduck.core.Host; -import ch.cyberduck.core.preferences.PreferencesFactory; import ch.cyberduck.core.socket.DefaultSocketConfigurator; import ch.cyberduck.core.socket.HttpProxySocketFactory; import ch.cyberduck.core.socket.SocketConfigurator; import org.apache.commons.net.DefaultSocketFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import javax.net.SocketFactory; import java.io.IOException; @@ -37,7 +37,7 @@ import java.util.List; public class ProxySocketFactory extends SocketFactory { - private static final Logger log = Logger.getLogger(ProxySocketFactory.class); + private static final Logger log = LogManager.getLogger(ProxySocketFactory.class); private final SocketConfigurator configurator; private final ProxyFinder proxyFinder; diff --git a/core/src/main/java/ch/cyberduck/core/random/DefaultSecureRandomProvider.java b/core/src/main/java/ch/cyberduck/core/random/DefaultSecureRandomProvider.java index f4a7902f152..ec7cc975c6c 100644 --- a/core/src/main/java/ch/cyberduck/core/random/DefaultSecureRandomProvider.java +++ b/core/src/main/java/ch/cyberduck/core/random/DefaultSecureRandomProvider.java @@ -17,14 +17,15 @@ import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.SecureRandom; public class DefaultSecureRandomProvider implements SecureRandomProvider { - private static final Logger log = Logger.getLogger(DefaultSecureRandomProvider.class); + private static final Logger log = LogManager.getLogger(DefaultSecureRandomProvider.class); private static final Object lock = new Object(); diff --git a/core/src/main/java/ch/cyberduck/core/serializer/HostDictionary.java b/core/src/main/java/ch/cyberduck/core/serializer/HostDictionary.java index 347377b69f2..a39f0c5707f 100644 --- a/core/src/main/java/ch/cyberduck/core/serializer/HostDictionary.java +++ b/core/src/main/java/ch/cyberduck/core/serializer/HostDictionary.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.ftp.FTPConnectMode; import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Date; import java.util.EnumSet; @@ -36,7 +37,7 @@ import java.util.TimeZone; public class HostDictionary { - private static final Logger log = Logger.getLogger(HostDictionary.class); + private static final Logger log = LogManager.getLogger(HostDictionary.class); private final DeserializerFactory factory; private final ProtocolFactory protocols; diff --git a/core/src/main/java/ch/cyberduck/core/serializer/PathDictionary.java b/core/src/main/java/ch/cyberduck/core/serializer/PathDictionary.java index 675aff5a710..98cfbc2988c 100644 --- a/core/src/main/java/ch/cyberduck/core/serializer/PathDictionary.java +++ b/core/src/main/java/ch/cyberduck/core/serializer/PathDictionary.java @@ -24,12 +24,13 @@ import ch.cyberduck.core.PathAttributes; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.EnumSet; public class PathDictionary { - private static final Logger log = Logger.getLogger(PathDictionary.class); + private static final Logger log = LogManager.getLogger(PathDictionary.class); private final DeserializerFactory factory; diff --git a/core/src/main/java/ch/cyberduck/core/serializer/ProfileDictionary.java b/core/src/main/java/ch/cyberduck/core/serializer/ProfileDictionary.java index 647c028f6e5..c1470839459 100644 --- a/core/src/main/java/ch/cyberduck/core/serializer/ProfileDictionary.java +++ b/core/src/main/java/ch/cyberduck/core/serializer/ProfileDictionary.java @@ -24,12 +24,13 @@ import ch.cyberduck.core.ProtocolFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.function.Predicate; public class ProfileDictionary { - private static final Logger log = Logger.getLogger(ProfileDictionary.class); + private static final Logger log = LogManager.getLogger(ProfileDictionary.class); private final DeserializerFactory deserializer; private final ProtocolFactory protocols; diff --git a/core/src/main/java/ch/cyberduck/core/serializer/TransferDictionary.java b/core/src/main/java/ch/cyberduck/core/serializer/TransferDictionary.java index a595b374579..a6d9b016666 100644 --- a/core/src/main/java/ch/cyberduck/core/serializer/TransferDictionary.java +++ b/core/src/main/java/ch/cyberduck/core/serializer/TransferDictionary.java @@ -32,7 +32,8 @@ import ch.cyberduck.core.transfer.TransferItem; import ch.cyberduck.core.transfer.UploadTransfer; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.Date; @@ -41,7 +42,7 @@ import java.util.Map; public class TransferDictionary { - private static final Logger log = Logger.getLogger(TransferDictionary.class); + private static final Logger log = LogManager.getLogger(TransferDictionary.class); private final DeserializerFactory factory; private final ProtocolFactory protocols; diff --git a/core/src/main/java/ch/cyberduck/core/serializer/impl/dd/PlistDeserializer.java b/core/src/main/java/ch/cyberduck/core/serializer/impl/dd/PlistDeserializer.java index 840a08c7b62..172c5f4b426 100644 --- a/core/src/main/java/ch/cyberduck/core/serializer/impl/dd/PlistDeserializer.java +++ b/core/src/main/java/ch/cyberduck/core/serializer/impl/dd/PlistDeserializer.java @@ -20,7 +20,8 @@ import ch.cyberduck.core.serializer.Deserializer; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.HashMap; @@ -33,7 +34,7 @@ import com.dd.plist.NSString; public class PlistDeserializer implements Deserializer { - private static final Logger log = Logger.getLogger(PlistDeserializer.class); + private static final Logger log = LogManager.getLogger(PlistDeserializer.class); final NSDictionary dict; diff --git a/core/src/main/java/ch/cyberduck/core/serializer/impl/dd/PlistReader.java b/core/src/main/java/ch/cyberduck/core/serializer/impl/dd/PlistReader.java index cbd42e68763..b64a5d41aeb 100644 --- a/core/src/main/java/ch/cyberduck/core/serializer/impl/dd/PlistReader.java +++ b/core/src/main/java/ch/cyberduck/core/serializer/impl/dd/PlistReader.java @@ -25,7 +25,8 @@ import ch.cyberduck.core.exception.LocalAccessDeniedException; import ch.cyberduck.core.serializer.Reader; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.xml.sax.SAXException; import javax.xml.parsers.ParserConfigurationException; @@ -40,7 +41,7 @@ import com.dd.plist.XMLPropertyListParser; public abstract class PlistReader implements Reader { - private static final Logger log = Logger.getLogger(PlistReader.class); + private static final Logger log = LogManager.getLogger(PlistReader.class); @Override public Collection readCollection(final Local file) throws AccessDeniedException { diff --git a/core/src/main/java/ch/cyberduck/core/shared/AbstractSchedulerFeature.java b/core/src/main/java/ch/cyberduck/core/shared/AbstractSchedulerFeature.java index 1b90c8998b4..59ed3ceb3fa 100644 --- a/core/src/main/java/ch/cyberduck/core/shared/AbstractSchedulerFeature.java +++ b/core/src/main/java/ch/cyberduck/core/shared/AbstractSchedulerFeature.java @@ -25,12 +25,13 @@ import ch.cyberduck.core.threading.BackgroundActionState; import ch.cyberduck.core.threading.ScheduledThreadPool; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.concurrent.TimeUnit; public abstract class AbstractSchedulerFeature implements Scheduler { - private static final Logger log = Logger.getLogger(AbstractSchedulerFeature.class); + private static final Logger log = LogManager.getLogger(AbstractSchedulerFeature.class); private final long period; private final ScheduledThreadPool scheduler = new ScheduledThreadPool(); diff --git a/core/src/main/java/ch/cyberduck/core/shared/BufferWriteFeature.java b/core/src/main/java/ch/cyberduck/core/shared/BufferWriteFeature.java index 04c6171be99..45f4be99103 100644 --- a/core/src/main/java/ch/cyberduck/core/shared/BufferWriteFeature.java +++ b/core/src/main/java/ch/cyberduck/core/shared/BufferWriteFeature.java @@ -37,13 +37,14 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.io.IOUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.concurrent.atomic.AtomicBoolean; public class BufferWriteFeature implements MultipartWrite { - private static final Logger log = Logger.getLogger(BufferWriteFeature.class); + private static final Logger log = LogManager.getLogger(BufferWriteFeature.class); private final Session session; diff --git a/core/src/main/java/ch/cyberduck/core/shared/DefaultAttributesFinderFeature.java b/core/src/main/java/ch/cyberduck/core/shared/DefaultAttributesFinderFeature.java index 2360829e0e9..e54b310dcad 100644 --- a/core/src/main/java/ch/cyberduck/core/shared/DefaultAttributesFinderFeature.java +++ b/core/src/main/java/ch/cyberduck/core/shared/DefaultAttributesFinderFeature.java @@ -26,10 +26,11 @@ import ch.cyberduck.core.exception.NotfoundException; import ch.cyberduck.core.features.AttributesFinder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class DefaultAttributesFinderFeature extends ListFilteringFeature implements AttributesFinder { - private static final Logger log = Logger.getLogger(DefaultAttributesFinderFeature.class); + private static final Logger log = LogManager.getLogger(DefaultAttributesFinderFeature.class); public DefaultAttributesFinderFeature(final Session session) { super(session); diff --git a/core/src/main/java/ch/cyberduck/core/shared/DefaultPathHomeFeature.java b/core/src/main/java/ch/cyberduck/core/shared/DefaultPathHomeFeature.java index 1b759c4c4a0..059c673bd4c 100644 --- a/core/src/main/java/ch/cyberduck/core/shared/DefaultPathHomeFeature.java +++ b/core/src/main/java/ch/cyberduck/core/shared/DefaultPathHomeFeature.java @@ -24,10 +24,11 @@ import ch.cyberduck.core.exception.BackgroundException; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class DefaultPathHomeFeature extends AbstractHomeFeature { - private static final Logger log = Logger.getLogger(DefaultPathHomeFeature.class); + private static final Logger log = LogManager.getLogger(DefaultPathHomeFeature.class); private final Host host; diff --git a/core/src/main/java/ch/cyberduck/core/shared/DefaultTouchFeature.java b/core/src/main/java/ch/cyberduck/core/shared/DefaultTouchFeature.java index d2eff1f1bcf..b57eae3fe2e 100644 --- a/core/src/main/java/ch/cyberduck/core/shared/DefaultTouchFeature.java +++ b/core/src/main/java/ch/cyberduck/core/shared/DefaultTouchFeature.java @@ -28,12 +28,13 @@ import ch.cyberduck.core.io.StatusOutputStream; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; public class DefaultTouchFeature implements Touch { - private static final Logger log = Logger.getLogger(DefaultTouchFeature.class); + private static final Logger log = LogManager.getLogger(DefaultTouchFeature.class); private final AttributesFinder attributes; private Write write; diff --git a/core/src/main/java/ch/cyberduck/core/shared/ListFilteringFeature.java b/core/src/main/java/ch/cyberduck/core/shared/ListFilteringFeature.java index 6f4307d81ed..ddffab7d69c 100644 --- a/core/src/main/java/ch/cyberduck/core/shared/ListFilteringFeature.java +++ b/core/src/main/java/ch/cyberduck/core/shared/ListFilteringFeature.java @@ -27,10 +27,11 @@ import ch.cyberduck.core.exception.BackgroundException; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public abstract class ListFilteringFeature { - private static final Logger log = Logger.getLogger(ListFilteringFeature.class); + private static final Logger log = LogManager.getLogger(ListFilteringFeature.class); private final Session session; diff --git a/core/src/main/java/ch/cyberduck/core/shared/PathAttributesHomeFeature.java b/core/src/main/java/ch/cyberduck/core/shared/PathAttributesHomeFeature.java index 28710e458ab..0c93a6334af 100644 --- a/core/src/main/java/ch/cyberduck/core/shared/PathAttributesHomeFeature.java +++ b/core/src/main/java/ch/cyberduck/core/shared/PathAttributesHomeFeature.java @@ -21,12 +21,13 @@ import ch.cyberduck.core.features.AttributesFinder; import ch.cyberduck.core.features.Home; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.EnumSet; public class PathAttributesHomeFeature implements Home { - private static final Logger log = Logger.getLogger(PathAttributesHomeFeature.class); + private static final Logger log = LogManager.getLogger(PathAttributesHomeFeature.class); private final Home proxy; private final AttributesFinder attributes; diff --git a/core/src/main/java/ch/cyberduck/core/shared/WorkdirHomeFeature.java b/core/src/main/java/ch/cyberduck/core/shared/WorkdirHomeFeature.java index 8146403aa19..26ab0c1deb8 100644 --- a/core/src/main/java/ch/cyberduck/core/shared/WorkdirHomeFeature.java +++ b/core/src/main/java/ch/cyberduck/core/shared/WorkdirHomeFeature.java @@ -24,10 +24,11 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.serializer.PathDictionary; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class WorkdirHomeFeature extends AbstractHomeFeature { - private static final Logger log = Logger.getLogger(WorkdirHomeFeature.class); + private static final Logger log = LogManager.getLogger(WorkdirHomeFeature.class); private final Host host; diff --git a/core/src/main/java/ch/cyberduck/core/socket/DefaultSocketConfigurator.java b/core/src/main/java/ch/cyberduck/core/socket/DefaultSocketConfigurator.java index c672cf21b93..fc86e4ab60f 100644 --- a/core/src/main/java/ch/cyberduck/core/socket/DefaultSocketConfigurator.java +++ b/core/src/main/java/ch/cyberduck/core/socket/DefaultSocketConfigurator.java @@ -20,13 +20,14 @@ import ch.cyberduck.core.preferences.Preferences; import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.net.Socket; public class DefaultSocketConfigurator implements SocketConfigurator { - private static final Logger log = Logger.getLogger(DefaultSocketConfigurator.class); + private static final Logger log = LogManager.getLogger(DefaultSocketConfigurator.class); private final Preferences preferences = PreferencesFactory.get(); diff --git a/core/src/main/java/ch/cyberduck/core/ssl/AbstractX509KeyManager.java b/core/src/main/java/ch/cyberduck/core/ssl/AbstractX509KeyManager.java index 9363cc48466..b8a1fcd050d 100644 --- a/core/src/main/java/ch/cyberduck/core/ssl/AbstractX509KeyManager.java +++ b/core/src/main/java/ch/cyberduck/core/ssl/AbstractX509KeyManager.java @@ -18,7 +18,8 @@ * feedback@cyberduck.ch */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import javax.net.ssl.X509ExtendedKeyManager; import javax.security.auth.x500.X500Principal; @@ -31,7 +32,7 @@ import java.util.List; public abstract class AbstractX509KeyManager extends X509ExtendedKeyManager implements X509KeyManager { - private static final Logger log = Logger.getLogger(AbstractX509KeyManager.class); + private static final Logger log = LogManager.getLogger(AbstractX509KeyManager.class); /** * @param issuers The list of acceptable CA issuer subject names or null if it does not matter which issuers are used diff --git a/core/src/main/java/ch/cyberduck/core/ssl/AbstractX509TrustManager.java b/core/src/main/java/ch/cyberduck/core/ssl/AbstractX509TrustManager.java index 5741fb8cd6c..61a58ced7e6 100644 --- a/core/src/main/java/ch/cyberduck/core/ssl/AbstractX509TrustManager.java +++ b/core/src/main/java/ch/cyberduck/core/ssl/AbstractX509TrustManager.java @@ -18,7 +18,8 @@ * dkocher@cyberduck.ch */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.security.cert.X509Certificate; import java.util.Collections; @@ -31,7 +32,7 @@ */ public abstract class AbstractX509TrustManager implements X509TrustManager { - private static final Logger log = Logger.getLogger(AbstractX509TrustManager.class); + private static final Logger log = LogManager.getLogger(AbstractX509TrustManager.class); /** * A set of all X509 certificates accepted by the user that contains diff --git a/core/src/main/java/ch/cyberduck/core/ssl/CertificateStoreX509KeyManager.java b/core/src/main/java/ch/cyberduck/core/ssl/CertificateStoreX509KeyManager.java index 7e8d444ff74..a18ca5a05e0 100644 --- a/core/src/main/java/ch/cyberduck/core/ssl/CertificateStoreX509KeyManager.java +++ b/core/src/main/java/ch/cyberduck/core/ssl/CertificateStoreX509KeyManager.java @@ -25,7 +25,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.net.Socket; @@ -46,7 +47,7 @@ import java.util.List; public class CertificateStoreX509KeyManager extends AbstractX509KeyManager { - private static final Logger log = Logger.getLogger(CertificateStoreX509KeyManager.class); + private static final Logger log = LogManager.getLogger(CertificateStoreX509KeyManager.class); private final CertificateIdentityCallback prompt; private final Host bookmark; diff --git a/core/src/main/java/ch/cyberduck/core/ssl/CertificateStoreX509TrustManager.java b/core/src/main/java/ch/cyberduck/core/ssl/CertificateStoreX509TrustManager.java index f8f4776ac34..7cf6004f206 100644 --- a/core/src/main/java/ch/cyberduck/core/ssl/CertificateStoreX509TrustManager.java +++ b/core/src/main/java/ch/cyberduck/core/ssl/CertificateStoreX509TrustManager.java @@ -22,14 +22,15 @@ import ch.cyberduck.core.CertificateTrustCallback; import ch.cyberduck.core.LocaleFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import java.util.Arrays; public class CertificateStoreX509TrustManager extends AbstractX509TrustManager { - private static final Logger log = Logger.getLogger(CertificateStoreX509TrustManager.class); + private static final Logger log = LogManager.getLogger(CertificateStoreX509TrustManager.class); private final CertificateTrustCallback prompt; private final TrustManagerHostnameCallback callback; diff --git a/core/src/main/java/ch/cyberduck/core/ssl/CustomTrustSSLProtocolSocketFactory.java b/core/src/main/java/ch/cyberduck/core/ssl/CustomTrustSSLProtocolSocketFactory.java index 2c54b15d11f..84ad4c5f8bd 100644 --- a/core/src/main/java/ch/cyberduck/core/ssl/CustomTrustSSLProtocolSocketFactory.java +++ b/core/src/main/java/ch/cyberduck/core/ssl/CustomTrustSSLProtocolSocketFactory.java @@ -23,7 +23,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import ch.cyberduck.core.random.SecureRandomProviderFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import javax.net.ssl.KeyManager; import javax.net.ssl.SSLContext; @@ -41,7 +42,7 @@ import java.util.concurrent.atomic.AtomicBoolean; public class CustomTrustSSLProtocolSocketFactory extends SSLSocketFactory { - private static final Logger log = Logger.getLogger(CustomTrustSSLProtocolSocketFactory.class); + private static final Logger log = LogManager.getLogger(CustomTrustSSLProtocolSocketFactory.class); private final SSLSocketFactory factory; /** diff --git a/core/src/main/java/ch/cyberduck/core/ssl/DefaultTrustManagerHostnameCallback.java b/core/src/main/java/ch/cyberduck/core/ssl/DefaultTrustManagerHostnameCallback.java index 58ba415668a..bfc863e5967 100644 --- a/core/src/main/java/ch/cyberduck/core/ssl/DefaultTrustManagerHostnameCallback.java +++ b/core/src/main/java/ch/cyberduck/core/ssl/DefaultTrustManagerHostnameCallback.java @@ -21,10 +21,11 @@ import ch.cyberduck.core.idna.PunycodeConverter; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class DefaultTrustManagerHostnameCallback implements TrustManagerHostnameCallback { - private static final Logger log = Logger.getLogger(DefaultTrustManagerHostnameCallback.class); + private static final Logger log = LogManager.getLogger(DefaultTrustManagerHostnameCallback.class); private final Host host; diff --git a/core/src/main/java/ch/cyberduck/core/ssl/DefaultX509KeyManager.java b/core/src/main/java/ch/cyberduck/core/ssl/DefaultX509KeyManager.java index 33d577a08be..b06ca0d5f45 100644 --- a/core/src/main/java/ch/cyberduck/core/ssl/DefaultX509KeyManager.java +++ b/core/src/main/java/ch/cyberduck/core/ssl/DefaultX509KeyManager.java @@ -18,7 +18,8 @@ * dkocher@cyberduck.ch */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import javax.net.ssl.KeyManager; import javax.net.ssl.KeyManagerFactory; @@ -40,7 +41,7 @@ * Default implementation to choose certificates from key store. */ public class DefaultX509KeyManager extends AbstractX509KeyManager implements X509KeyManager { - private static final Logger log = Logger.getLogger(DefaultX509KeyManager.class); + private static final Logger log = LogManager.getLogger(DefaultX509KeyManager.class); private javax.net.ssl.X509KeyManager _manager; diff --git a/core/src/main/java/ch/cyberduck/core/ssl/DefaultX509TrustManager.java b/core/src/main/java/ch/cyberduck/core/ssl/DefaultX509TrustManager.java index 161209ba874..03ee5f9b867 100644 --- a/core/src/main/java/ch/cyberduck/core/ssl/DefaultX509TrustManager.java +++ b/core/src/main/java/ch/cyberduck/core/ssl/DefaultX509TrustManager.java @@ -18,7 +18,8 @@ * dkocher@cyberduck.ch */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; @@ -31,7 +32,7 @@ import java.util.Arrays; public class DefaultX509TrustManager extends AbstractX509TrustManager { - private static final Logger log = Logger.getLogger(DefaultX509TrustManager.class); + private static final Logger log = LogManager.getLogger(DefaultX509TrustManager.class); private javax.net.ssl.X509TrustManager system; @@ -81,4 +82,4 @@ public void checkServerTrusted(final X509Certificate[] certs, final String ciphe system.checkServerTrusted(certs, cipher); } } -} \ No newline at end of file +} diff --git a/core/src/main/java/ch/cyberduck/core/ssl/SSLExceptionMappingService.java b/core/src/main/java/ch/cyberduck/core/ssl/SSLExceptionMappingService.java index 771b3e5f163..cbca0311a28 100644 --- a/core/src/main/java/ch/cyberduck/core/ssl/SSLExceptionMappingService.java +++ b/core/src/main/java/ch/cyberduck/core/ssl/SSLExceptionMappingService.java @@ -27,7 +27,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.exception.ExceptionUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import javax.net.ssl.SSLException; import javax.net.ssl.SSLHandshakeException; @@ -37,7 +38,7 @@ import java.security.cert.CertificateException; public class SSLExceptionMappingService extends AbstractExceptionMappingService { - private static final Logger log = Logger.getLogger(SSLExceptionMappingService.class); + private static final Logger log = LogManager.getLogger(SSLExceptionMappingService.class); /** * close_notify(0), diff --git a/core/src/main/java/ch/cyberduck/core/synchronization/CachingComparePathFilter.java b/core/src/main/java/ch/cyberduck/core/synchronization/CachingComparePathFilter.java index df07788ca3b..495c2d2e606 100644 --- a/core/src/main/java/ch/cyberduck/core/synchronization/CachingComparePathFilter.java +++ b/core/src/main/java/ch/cyberduck/core/synchronization/CachingComparePathFilter.java @@ -26,13 +26,14 @@ import ch.cyberduck.core.features.Find; import ch.cyberduck.core.transfer.TransferItem; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; import java.util.Map; public class CachingComparePathFilter implements ComparePathFilter { - private static final Logger log = Logger.getLogger(CachingComparePathFilter.class); + private static final Logger log = LogManager.getLogger(CachingComparePathFilter.class); private Map cache = Collections.emptyMap(); diff --git a/core/src/main/java/ch/cyberduck/core/synchronization/ChecksumComparisonService.java b/core/src/main/java/ch/cyberduck/core/synchronization/ChecksumComparisonService.java index 2a22abef99b..a748b580ec6 100644 --- a/core/src/main/java/ch/cyberduck/core/synchronization/ChecksumComparisonService.java +++ b/core/src/main/java/ch/cyberduck/core/synchronization/ChecksumComparisonService.java @@ -21,10 +21,11 @@ import ch.cyberduck.core.Attributes; import ch.cyberduck.core.io.Checksum; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class ChecksumComparisonService implements ComparisonService { - private static final Logger log = Logger.getLogger(ChecksumComparisonService.class); + private static final Logger log = LogManager.getLogger(ChecksumComparisonService.class); @Override public Comparison compare(final Attributes remote, final Attributes local) { diff --git a/core/src/main/java/ch/cyberduck/core/synchronization/SizeComparisonService.java b/core/src/main/java/ch/cyberduck/core/synchronization/SizeComparisonService.java index 67a10e65a8f..4b0346fa162 100644 --- a/core/src/main/java/ch/cyberduck/core/synchronization/SizeComparisonService.java +++ b/core/src/main/java/ch/cyberduck/core/synchronization/SizeComparisonService.java @@ -20,10 +20,11 @@ import ch.cyberduck.core.Attributes; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class SizeComparisonService implements ComparisonService { - private static final Logger log = Logger.getLogger(SizeComparisonService.class); + private static final Logger log = LogManager.getLogger(SizeComparisonService.class); @Override public Comparison compare(final Attributes remote, final Attributes local) { diff --git a/core/src/main/java/ch/cyberduck/core/synchronization/TimestampComparisonService.java b/core/src/main/java/ch/cyberduck/core/synchronization/TimestampComparisonService.java index f9452edc39d..20557113671 100644 --- a/core/src/main/java/ch/cyberduck/core/synchronization/TimestampComparisonService.java +++ b/core/src/main/java/ch/cyberduck/core/synchronization/TimestampComparisonService.java @@ -22,12 +22,13 @@ import ch.cyberduck.core.date.CalendarService; import ch.cyberduck.core.date.Instant; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.TimeZone; public class TimestampComparisonService implements ComparisonService { - private static final Logger log = Logger.getLogger(TimestampComparisonService.class); + private static final Logger log = LogManager.getLogger(TimestampComparisonService.class); private final CalendarService calendarService; diff --git a/core/src/main/java/ch/cyberduck/core/text/NaturalOrderCollator.java b/core/src/main/java/ch/cyberduck/core/text/NaturalOrderCollator.java index 57afc925b21..6565788d209 100644 --- a/core/src/main/java/ch/cyberduck/core/text/NaturalOrderCollator.java +++ b/core/src/main/java/ch/cyberduck/core/text/NaturalOrderCollator.java @@ -13,7 +13,8 @@ * Werner Randelshofer. For details see accompanying license terms. */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.CollationKey; import java.text.Collator; @@ -44,7 +45,7 @@ * @author Werner Randelshofer */ public class NaturalOrderCollator extends Collator implements java.io.Serializable { - private static final Logger log = Logger.getLogger(NaturalOrderCollator.class); + private static final Logger log = LogManager.getLogger(NaturalOrderCollator.class); private static final long serialVersionUID = -7074910013839273765L; diff --git a/core/src/main/java/ch/cyberduck/core/threading/AbstractBackgroundAction.java b/core/src/main/java/ch/cyberduck/core/threading/AbstractBackgroundAction.java index a9b6369a983..5a04e148968 100644 --- a/core/src/main/java/ch/cyberduck/core/threading/AbstractBackgroundAction.java +++ b/core/src/main/java/ch/cyberduck/core/threading/AbstractBackgroundAction.java @@ -22,7 +22,8 @@ import ch.cyberduck.core.Path; import ch.cyberduck.core.exception.BackgroundException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Iterator; import java.util.List; @@ -30,7 +31,7 @@ import java.util.concurrent.CopyOnWriteArraySet; public abstract class AbstractBackgroundAction implements BackgroundAction { - private static final Logger log = Logger.getLogger(AbstractBackgroundAction.class); + private static final Logger log = LogManager.getLogger(AbstractBackgroundAction.class); private State state; diff --git a/core/src/main/java/ch/cyberduck/core/threading/AbstractRetryCallable.java b/core/src/main/java/ch/cyberduck/core/threading/AbstractRetryCallable.java index 88bd7a2b324..c2097f59db5 100644 --- a/core/src/main/java/ch/cyberduck/core/threading/AbstractRetryCallable.java +++ b/core/src/main/java/ch/cyberduck/core/threading/AbstractRetryCallable.java @@ -26,14 +26,15 @@ import ch.cyberduck.core.preferences.Preferences; import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.time.Duration; import java.util.concurrent.Callable; public abstract class AbstractRetryCallable implements Callable { - private static final Logger log = Logger.getLogger(AbstractRetryCallable.class); + private static final Logger log = LogManager.getLogger(AbstractRetryCallable.class); private final Preferences preferences = PreferencesFactory.get(); diff --git a/core/src/main/java/ch/cyberduck/core/threading/ActionOperationBatcherFactory.java b/core/src/main/java/ch/cyberduck/core/threading/ActionOperationBatcherFactory.java index 6d22920ea1e..bf06b485ce5 100644 --- a/core/src/main/java/ch/cyberduck/core/threading/ActionOperationBatcherFactory.java +++ b/core/src/main/java/ch/cyberduck/core/threading/ActionOperationBatcherFactory.java @@ -21,13 +21,14 @@ import ch.cyberduck.core.Factory; import org.apache.commons.lang3.reflect.ConstructorUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; public class ActionOperationBatcherFactory extends Factory { - private static final Logger log = Logger.getLogger(ActionOperationBatcherFactory.class); + private static final Logger log = LogManager.getLogger(ActionOperationBatcherFactory.class); public ActionOperationBatcherFactory() { super("factory.autorelease.class"); diff --git a/core/src/main/java/ch/cyberduck/core/threading/BackgroundActionPauser.java b/core/src/main/java/ch/cyberduck/core/threading/BackgroundActionPauser.java index cba3c491418..388f70159b9 100644 --- a/core/src/main/java/ch/cyberduck/core/threading/BackgroundActionPauser.java +++ b/core/src/main/java/ch/cyberduck/core/threading/BackgroundActionPauser.java @@ -22,7 +22,8 @@ import ch.cyberduck.core.io.StreamCancelation; import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Timer; import java.util.TimerTask; @@ -30,7 +31,7 @@ import java.util.concurrent.CyclicBarrier; public class BackgroundActionPauser { - private static final Logger log = Logger.getLogger(BackgroundActionPauser.class); + private static final Logger log = LogManager.getLogger(BackgroundActionPauser.class); /** * The delay to wait before execution of the action in seconds diff --git a/core/src/main/java/ch/cyberduck/core/threading/BackgroundActionRegistry.java b/core/src/main/java/ch/cyberduck/core/threading/BackgroundActionRegistry.java index 6e6428d86dc..2f6b79bd0ea 100644 --- a/core/src/main/java/ch/cyberduck/core/threading/BackgroundActionRegistry.java +++ b/core/src/main/java/ch/cyberduck/core/threading/BackgroundActionRegistry.java @@ -20,7 +20,8 @@ import ch.cyberduck.core.Collection; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Iterator; import java.util.LinkedHashSet; @@ -28,7 +29,7 @@ import java.util.Set; public final class BackgroundActionRegistry extends Collection implements BackgroundActionListener { - private static final Logger log = Logger.getLogger(BackgroundActionRegistry.class); + private static final Logger log = LogManager.getLogger(BackgroundActionRegistry.class); private static final long serialVersionUID = 1721336643608575003L; diff --git a/core/src/main/java/ch/cyberduck/core/threading/BackgroundCallable.java b/core/src/main/java/ch/cyberduck/core/threading/BackgroundCallable.java index a02e12b2d28..4af08607383 100644 --- a/core/src/main/java/ch/cyberduck/core/threading/BackgroundCallable.java +++ b/core/src/main/java/ch/cyberduck/core/threading/BackgroundCallable.java @@ -20,12 +20,13 @@ import ch.cyberduck.core.exception.UnsupportedException; import ch.cyberduck.core.worker.DefaultExceptionMappingService; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.concurrent.Callable; public class BackgroundCallable implements Callable { - private static final Logger log = Logger.getLogger(BackgroundCallable.class); + private static final Logger log = LogManager.getLogger(BackgroundCallable.class); private final BackgroundAction action; private final Controller controller; diff --git a/core/src/main/java/ch/cyberduck/core/threading/DefaultBackgroundExecutor.java b/core/src/main/java/ch/cyberduck/core/threading/DefaultBackgroundExecutor.java index f387c874761..25c02dc7318 100644 --- a/core/src/main/java/ch/cyberduck/core/threading/DefaultBackgroundExecutor.java +++ b/core/src/main/java/ch/cyberduck/core/threading/DefaultBackgroundExecutor.java @@ -18,14 +18,15 @@ import ch.cyberduck.core.Controller; import org.apache.commons.lang3.concurrent.ConcurrentUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.concurrent.Callable; import java.util.concurrent.Future; import java.util.concurrent.RejectedExecutionException; public class DefaultBackgroundExecutor implements BackgroundExecutor { - private static final Logger log = Logger.getLogger(DefaultBackgroundExecutor.class); + private static final Logger log = LogManager.getLogger(DefaultBackgroundExecutor.class); private static final DefaultBackgroundExecutor DEFAULT = new DefaultBackgroundExecutor(); diff --git a/core/src/main/java/ch/cyberduck/core/threading/DefaultFailureDiagnostics.java b/core/src/main/java/ch/cyberduck/core/threading/DefaultFailureDiagnostics.java index 1b20dd43d97..4e7e5c5bf96 100644 --- a/core/src/main/java/ch/cyberduck/core/threading/DefaultFailureDiagnostics.java +++ b/core/src/main/java/ch/cyberduck/core/threading/DefaultFailureDiagnostics.java @@ -32,7 +32,8 @@ import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.http.NoHttpResponseException; import org.apache.http.conn.ConnectTimeoutException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import javax.net.ssl.SSLException; import javax.net.ssl.SSLHandshakeException; @@ -42,7 +43,7 @@ import java.util.concurrent.TimeoutException; public final class DefaultFailureDiagnostics implements FailureDiagnostics { - private static final Logger log = Logger.getLogger(DefaultFailureDiagnostics.class); + private static final Logger log = LogManager.getLogger(DefaultFailureDiagnostics.class); @Override public Type determine(final BackgroundException failure) { diff --git a/core/src/main/java/ch/cyberduck/core/threading/DisabledAlertCallback.java b/core/src/main/java/ch/cyberduck/core/threading/DisabledAlertCallback.java index 4dc78911a87..398a668c82b 100644 --- a/core/src/main/java/ch/cyberduck/core/threading/DisabledAlertCallback.java +++ b/core/src/main/java/ch/cyberduck/core/threading/DisabledAlertCallback.java @@ -21,15 +21,15 @@ import ch.cyberduck.core.Host; import ch.cyberduck.core.exception.BackgroundException; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class DisabledAlertCallback implements AlertCallback { - private static final Logger log = Logger.getLogger(DisabledAlertCallback.class); + private static final Logger log = LogManager.getLogger(DisabledAlertCallback.class); @Override public boolean alert(final Host host, final BackgroundException failure, final StringBuilder transcript) { - if(log.isEnabledFor(Level.WARN)) { + if(log.isWarnEnabled()) { log.warn(String.format("Ignore failure %s", failure)); } return false; diff --git a/core/src/main/java/ch/cyberduck/core/threading/ExecutorServiceThreadPool.java b/core/src/main/java/ch/cyberduck/core/threading/ExecutorServiceThreadPool.java index 911937fd9ec..f51be29153a 100644 --- a/core/src/main/java/ch/cyberduck/core/threading/ExecutorServiceThreadPool.java +++ b/core/src/main/java/ch/cyberduck/core/threading/ExecutorServiceThreadPool.java @@ -15,7 +15,8 @@ * GNU General Public License for more details. */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.concurrent.AbstractExecutorService; import java.util.concurrent.Callable; @@ -23,7 +24,7 @@ import java.util.concurrent.TimeUnit; public abstract class ExecutorServiceThreadPool implements ThreadPool { - private static final Logger log = Logger.getLogger(ExecutorServiceThreadPool.class); + private static final Logger log = LogManager.getLogger(ExecutorServiceThreadPool.class); private final AbstractExecutorService pool; diff --git a/core/src/main/java/ch/cyberduck/core/threading/LoggingUncaughtExceptionHandler.java b/core/src/main/java/ch/cyberduck/core/threading/LoggingUncaughtExceptionHandler.java index c4177516788..6d59231491a 100644 --- a/core/src/main/java/ch/cyberduck/core/threading/LoggingUncaughtExceptionHandler.java +++ b/core/src/main/java/ch/cyberduck/core/threading/LoggingUncaughtExceptionHandler.java @@ -15,10 +15,11 @@ * GNU General Public License for more details. */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class LoggingUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler { - private static final Logger log = Logger.getLogger(LoggingUncaughtExceptionHandler.class); + private static final Logger log = LogManager.getLogger(LoggingUncaughtExceptionHandler.class); @Override public void uncaughtException(final Thread t, final Throwable e) { diff --git a/core/src/main/java/ch/cyberduck/core/threading/NamedThreadFactory.java b/core/src/main/java/ch/cyberduck/core/threading/NamedThreadFactory.java index 48da4e189ca..3e48064c7f7 100644 --- a/core/src/main/java/ch/cyberduck/core/threading/NamedThreadFactory.java +++ b/core/src/main/java/ch/cyberduck/core/threading/NamedThreadFactory.java @@ -18,13 +18,14 @@ * feedback@cyberduck.ch */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.concurrent.ThreadFactory; import java.util.concurrent.atomic.AtomicInteger; public class NamedThreadFactory implements ThreadFactory { - private static final Logger log = Logger.getLogger(NamedThreadFactory.class); + private static final Logger log = LogManager.getLogger(NamedThreadFactory.class); private final AtomicInteger threadNumber = new AtomicInteger(1); diff --git a/core/src/main/java/ch/cyberduck/core/threading/ScheduledThreadPool.java b/core/src/main/java/ch/cyberduck/core/threading/ScheduledThreadPool.java index e4c4c9ca095..fbd427e3190 100644 --- a/core/src/main/java/ch/cyberduck/core/threading/ScheduledThreadPool.java +++ b/core/src/main/java/ch/cyberduck/core/threading/ScheduledThreadPool.java @@ -18,7 +18,8 @@ * feedback@cyberduck.ch */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; @@ -26,7 +27,7 @@ import java.util.concurrent.TimeUnit; public class ScheduledThreadPool { - private static final Logger log = Logger.getLogger(ScheduledThreadPool.class); + private static final Logger log = LogManager.getLogger(ScheduledThreadPool.class); private final ScheduledExecutorService pool; @@ -51,4 +52,4 @@ public void shutdown() { } pool.shutdownNow(); } -} \ No newline at end of file +} diff --git a/core/src/main/java/ch/cyberduck/core/threading/SessionBackgroundAction.java b/core/src/main/java/ch/cyberduck/core/threading/SessionBackgroundAction.java index 097f2b3945e..0cd632fd7ec 100644 --- a/core/src/main/java/ch/cyberduck/core/threading/SessionBackgroundAction.java +++ b/core/src/main/java/ch/cyberduck/core/threading/SessionBackgroundAction.java @@ -27,10 +27,11 @@ import ch.cyberduck.core.pool.SessionPool; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public abstract class SessionBackgroundAction extends AbstractBackgroundAction implements ProgressListener, TranscriptListener { - private static final Logger log = Logger.getLogger(SessionBackgroundAction.class); + private static final Logger log = LogManager.getLogger(SessionBackgroundAction.class); /** * This action encountered one or more exceptions diff --git a/core/src/main/java/ch/cyberduck/core/threading/ThreadPoolFactory.java b/core/src/main/java/ch/cyberduck/core/threading/ThreadPoolFactory.java index ed55d65edf8..7059acdc152 100644 --- a/core/src/main/java/ch/cyberduck/core/threading/ThreadPoolFactory.java +++ b/core/src/main/java/ch/cyberduck/core/threading/ThreadPoolFactory.java @@ -20,7 +20,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.reflect.ConstructorUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; @@ -30,7 +31,7 @@ import static ch.cyberduck.core.threading.ThreadPool.DEFAULT_THREAD_NAME_PREFIX; public class ThreadPoolFactory extends Factory { - private static final Logger log = Logger.getLogger(ThreadPoolFactory.class); + private static final Logger log = LogManager.getLogger(ThreadPoolFactory.class); public ThreadPoolFactory() { super("factory.threadpool.class"); diff --git a/core/src/main/java/ch/cyberduck/core/threading/TransferCollectionBackgroundAction.java b/core/src/main/java/ch/cyberduck/core/threading/TransferCollectionBackgroundAction.java index 2c9320408c7..4658e135908 100644 --- a/core/src/main/java/ch/cyberduck/core/threading/TransferCollectionBackgroundAction.java +++ b/core/src/main/java/ch/cyberduck/core/threading/TransferCollectionBackgroundAction.java @@ -28,10 +28,11 @@ import ch.cyberduck.core.transfer.TransferQueue; import ch.cyberduck.core.transfer.TransferQueueFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class TransferCollectionBackgroundAction extends TransferBackgroundAction { - private static final Logger log = Logger.getLogger(TransferCollectionBackgroundAction.class); + private static final Logger log = LogManager.getLogger(TransferCollectionBackgroundAction.class); private final TransferQueue queue = TransferQueueFactory.get(); diff --git a/core/src/main/java/ch/cyberduck/core/threading/TransferWorkerBackgroundAction.java b/core/src/main/java/ch/cyberduck/core/threading/TransferWorkerBackgroundAction.java index 11955ce6cab..bfbc8ff4b14 100644 --- a/core/src/main/java/ch/cyberduck/core/threading/TransferWorkerBackgroundAction.java +++ b/core/src/main/java/ch/cyberduck/core/threading/TransferWorkerBackgroundAction.java @@ -22,12 +22,13 @@ import ch.cyberduck.core.pool.SessionPool; import ch.cyberduck.core.worker.TransferWorker; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Objects; public class TransferWorkerBackgroundAction extends RegistryBackgroundAction { - private static final Logger log = Logger.getLogger(TransferWorkerBackgroundAction.class); + private static final Logger log = LogManager.getLogger(TransferWorkerBackgroundAction.class); private final SessionPool pool; protected final TransferWorker worker; diff --git a/core/src/main/java/ch/cyberduck/core/threading/WorkerBackgroundAction.java b/core/src/main/java/ch/cyberduck/core/threading/WorkerBackgroundAction.java index 4af05a180c8..18094819f46 100644 --- a/core/src/main/java/ch/cyberduck/core/threading/WorkerBackgroundAction.java +++ b/core/src/main/java/ch/cyberduck/core/threading/WorkerBackgroundAction.java @@ -26,12 +26,13 @@ import ch.cyberduck.core.pool.SessionPool; import ch.cyberduck.core.worker.Worker; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Objects; public class WorkerBackgroundAction extends RegistryBackgroundAction { - private static final Logger log = Logger.getLogger(WorkerBackgroundAction.class); + private static final Logger log = LogManager.getLogger(WorkerBackgroundAction.class); protected final Worker worker; diff --git a/core/src/main/java/ch/cyberduck/core/transfer/CopyTransfer.java b/core/src/main/java/ch/cyberduck/core/transfer/CopyTransfer.java index ab376d6ed03..7f42aeb93c6 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/CopyTransfer.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/CopyTransfer.java @@ -35,7 +35,8 @@ import ch.cyberduck.core.transfer.copy.ChecksumFilter; import ch.cyberduck.core.transfer.copy.OverwriteFilter; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.ArrayList; @@ -45,7 +46,7 @@ import java.util.Map; public class CopyTransfer extends Transfer { - private static final Logger log = Logger.getLogger(CopyTransfer.class); + private static final Logger log = LogManager.getLogger(CopyTransfer.class); private final Filter filter = new NullFilter<>(); private final Comparator comparator = new NullComparator<>(); diff --git a/core/src/main/java/ch/cyberduck/core/transfer/DownloadTransfer.java b/core/src/main/java/ch/cyberduck/core/transfer/DownloadTransfer.java index 4b370bada25..dded38d2be4 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/DownloadTransfer.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/DownloadTransfer.java @@ -48,7 +48,8 @@ import ch.cyberduck.core.transfer.normalizer.DownloadRootPathsNormalizer; import ch.cyberduck.core.transfer.symlink.DownloadSymlinkResolver; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.ArrayList; @@ -58,7 +59,7 @@ import java.util.Map; public class DownloadTransfer extends Transfer { - private static final Logger log = Logger.getLogger(DownloadTransfer.class); + private static final Logger log = LogManager.getLogger(DownloadTransfer.class); private final Filter filter; private final Comparator comparator; diff --git a/core/src/main/java/ch/cyberduck/core/transfer/SyncTransfer.java b/core/src/main/java/ch/cyberduck/core/transfer/SyncTransfer.java index 59f6fe6a428..44e2d373518 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/SyncTransfer.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/SyncTransfer.java @@ -45,7 +45,8 @@ import ch.cyberduck.core.transfer.synchronisation.SynchronizationPathFilter; import org.apache.commons.collections4.map.LRUMap; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.Collections; @@ -56,7 +57,7 @@ import java.util.Set; public class SyncTransfer extends Transfer { - private static final Logger log = Logger.getLogger(SyncTransfer.class); + private static final Logger log = LogManager.getLogger(SyncTransfer.class); /** * The delegate for files to upload diff --git a/core/src/main/java/ch/cyberduck/core/transfer/Transfer.java b/core/src/main/java/ch/cyberduck/core/transfer/Transfer.java index b1f90cfba94..16590eeab4e 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/Transfer.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/Transfer.java @@ -37,7 +37,8 @@ import ch.cyberduck.core.serializer.Serializer; import ch.cyberduck.core.shared.DefaultUrlProvider; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.Collections; @@ -50,7 +51,7 @@ import java.util.concurrent.atomic.AtomicLong; public abstract class Transfer implements Serializable { - private static final Logger log = Logger.getLogger(Transfer.class); + private static final Logger log = LogManager.getLogger(Transfer.class); /** * Files and folders initially selected to be part of this transfer diff --git a/core/src/main/java/ch/cyberduck/core/transfer/TransferAdapter.java b/core/src/main/java/ch/cyberduck/core/transfer/TransferAdapter.java index 367f420f856..69ef4848778 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/TransferAdapter.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/TransferAdapter.java @@ -17,10 +17,11 @@ * Bug fixes, suggestions and comments should be sent to feedback@cyberduck.ch */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class TransferAdapter implements TransferListener { - private static final Logger log = Logger.getLogger(TransferAdapter.class); + private static final Logger log = LogManager.getLogger(TransferAdapter.class); @Override public void transferDidStart(final Transfer transfer) { @@ -42,4 +43,4 @@ public void transferDidProgress(final Transfer transfer, final TransferProgress log.debug(status.toString()); } } -} \ No newline at end of file +} diff --git a/core/src/main/java/ch/cyberduck/core/transfer/TransferQueue.java b/core/src/main/java/ch/cyberduck/core/transfer/TransferQueue.java index d3dc64782a6..d17cb75ed3f 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/TransferQueue.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/TransferQueue.java @@ -27,12 +27,13 @@ import ch.cyberduck.core.notification.NotificationServiceFactory; import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.concurrent.Semaphore; public final class TransferQueue { - private static final Logger log = Logger.getLogger(TransferQueue.class); + private static final Logger log = LogManager.getLogger(TransferQueue.class); private final ApplicationBadgeLabeler label = ApplicationBadgeLabelerFactory.get(); private final NotificationService notification = NotificationServiceFactory.get(); diff --git a/core/src/main/java/ch/cyberduck/core/transfer/TransferSpeedometer.java b/core/src/main/java/ch/cyberduck/core/transfer/TransferSpeedometer.java index d0d3c030ca2..0587d08c78b 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/TransferSpeedometer.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/TransferSpeedometer.java @@ -18,10 +18,11 @@ * dkocher@cyberduck.ch */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class TransferSpeedometer extends Speedometer { - private static final Logger log = Logger.getLogger(TransferSpeedometer.class); + private static final Logger log = LogManager.getLogger(TransferSpeedometer.class); private final Transfer transfer; diff --git a/core/src/main/java/ch/cyberduck/core/transfer/TransferStatus.java b/core/src/main/java/ch/cyberduck/core/transfer/TransferStatus.java index 8770cc71f5b..edeabff3503 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/TransferStatus.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/TransferStatus.java @@ -31,7 +31,8 @@ import ch.cyberduck.core.io.StreamProgress; import ch.cyberduck.core.random.NonceGenerator; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.nio.ByteBuffer; import java.util.Collections; @@ -44,7 +45,7 @@ import com.google.common.util.concurrent.Uninterruptibles; public class TransferStatus implements StreamCancelation, StreamProgress { - private static final Logger log = Logger.getLogger(TransferStatus.class); + private static final Logger log = LogManager.getLogger(TransferStatus.class); public static final long KILO = 1024; //2^10 public static final long MEGA = 1048576; // 2^20 diff --git a/core/src/main/java/ch/cyberduck/core/transfer/UploadTransfer.java b/core/src/main/java/ch/cyberduck/core/transfer/UploadTransfer.java index 6efacffee4a..029631e8055 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/UploadTransfer.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/UploadTransfer.java @@ -45,7 +45,8 @@ import ch.cyberduck.core.transfer.upload.UploadFilterOptions; import ch.cyberduck.core.transfer.upload.UploadRegexPriorityComparator; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.ArrayList; @@ -56,7 +57,7 @@ import java.util.Map; public class UploadTransfer extends Transfer { - private static final Logger log = Logger.getLogger(UploadTransfer.class); + private static final Logger log = LogManager.getLogger(UploadTransfer.class); private final Filter filter; private final Comparator comparator; diff --git a/core/src/main/java/ch/cyberduck/core/transfer/copy/AbstractCopyFilter.java b/core/src/main/java/ch/cyberduck/core/transfer/copy/AbstractCopyFilter.java index b0413cc24ad..fed9cf9003f 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/copy/AbstractCopyFilter.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/copy/AbstractCopyFilter.java @@ -47,13 +47,14 @@ import ch.cyberduck.core.transfer.upload.UploadFilterOptions; import ch.cyberduck.ui.browser.SearchFilterFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.Map; public abstract class AbstractCopyFilter implements TransferPathFilter { - private static final Logger log = Logger.getLogger(AbstractCopyFilter.class); + private static final Logger log = LogManager.getLogger(AbstractCopyFilter.class); protected final Session sourceSession; protected final Session targetSession; diff --git a/core/src/main/java/ch/cyberduck/core/transfer/copy/ChecksumFilter.java b/core/src/main/java/ch/cyberduck/core/transfer/copy/ChecksumFilter.java index 61027accb2e..d335c02d682 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/copy/ChecksumFilter.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/copy/ChecksumFilter.java @@ -26,13 +26,14 @@ import ch.cyberduck.core.transfer.TransferStatus; import ch.cyberduck.core.transfer.upload.UploadFilterOptions; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Map; import java.util.Objects; public class ChecksumFilter extends AbstractCopyFilter { - private static final Logger log = Logger.getLogger(ChecksumFilter.class); + private static final Logger log = LogManager.getLogger(ChecksumFilter.class); public ChecksumFilter(final Session source, final Session destination, final Map files) { super(source, destination, files); diff --git a/core/src/main/java/ch/cyberduck/core/transfer/download/AbstractDownloadFilter.java b/core/src/main/java/ch/cyberduck/core/transfer/download/AbstractDownloadFilter.java index 01f169e6a6c..d462278ae4d 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/download/AbstractDownloadFilter.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/download/AbstractDownloadFilter.java @@ -55,7 +55,8 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.nio.file.Files; @@ -66,7 +67,7 @@ import java.util.List; public abstract class AbstractDownloadFilter implements TransferPathFilter { - private static final Logger log = Logger.getLogger(AbstractDownloadFilter.class); + private static final Logger log = LogManager.getLogger(AbstractDownloadFilter.class); private final Session session; private final SymlinkResolver symlinkResolver; diff --git a/core/src/main/java/ch/cyberduck/core/transfer/download/CompareFilter.java b/core/src/main/java/ch/cyberduck/core/transfer/download/CompareFilter.java index 799568ddf84..0a2e7507d96 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/download/CompareFilter.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/download/CompareFilter.java @@ -29,10 +29,11 @@ import ch.cyberduck.core.transfer.TransferStatus; import ch.cyberduck.core.transfer.symlink.SymlinkResolver; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class CompareFilter extends AbstractDownloadFilter { - private static final Logger log = Logger.getLogger(CompareFilter.class); + private static final Logger log = LogManager.getLogger(CompareFilter.class); private final ProgressListener listener; private final DefaultComparePathFilter comparisonService; diff --git a/core/src/main/java/ch/cyberduck/core/transfer/download/RenameExistingFilter.java b/core/src/main/java/ch/cyberduck/core/transfer/download/RenameExistingFilter.java index 02b36680c54..cc801c274da 100755 --- a/core/src/main/java/ch/cyberduck/core/transfer/download/RenameExistingFilter.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/download/RenameExistingFilter.java @@ -30,12 +30,13 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; public class RenameExistingFilter extends AbstractDownloadFilter { - private static final Logger log = Logger.getLogger(RenameExistingFilter.class); + private static final Logger log = LogManager.getLogger(RenameExistingFilter.class); public RenameExistingFilter(final SymlinkResolver symlinkResolver, final Session session) { super(symlinkResolver, session, new DownloadFilterOptions(session.getHost())); diff --git a/core/src/main/java/ch/cyberduck/core/transfer/download/RenameFilter.java b/core/src/main/java/ch/cyberduck/core/transfer/download/RenameFilter.java index 04ac8b2509d..48b09d233f3 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/download/RenameFilter.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/download/RenameFilter.java @@ -28,10 +28,11 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class RenameFilter extends AbstractDownloadFilter { - private static final Logger log = Logger.getLogger(RenameFilter.class); + private static final Logger log = LogManager.getLogger(RenameFilter.class); public RenameFilter(final SymlinkResolver symlinkResolver, final Session session) { super(symlinkResolver, session, new DownloadFilterOptions(session.getHost())); diff --git a/core/src/main/java/ch/cyberduck/core/transfer/download/ResumeFilter.java b/core/src/main/java/ch/cyberduck/core/transfer/download/ResumeFilter.java index 7f6563cc9f0..f276989ba4d 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/download/ResumeFilter.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/download/ResumeFilter.java @@ -30,10 +30,11 @@ import ch.cyberduck.core.transfer.TransferStatus; import ch.cyberduck.core.transfer.symlink.SymlinkResolver; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class ResumeFilter extends AbstractDownloadFilter { - private static final Logger log = Logger.getLogger(ResumeFilter.class); + private static final Logger log = LogManager.getLogger(ResumeFilter.class); private final Download download; diff --git a/core/src/main/java/ch/cyberduck/core/transfer/download/SkipFilter.java b/core/src/main/java/ch/cyberduck/core/transfer/download/SkipFilter.java index 3fe967e53e7..2994265d3e8 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/download/SkipFilter.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/download/SkipFilter.java @@ -24,10 +24,11 @@ import ch.cyberduck.core.transfer.TransferStatus; import ch.cyberduck.core.transfer.symlink.SymlinkResolver; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class SkipFilter extends AbstractDownloadFilter { - private static final Logger log = Logger.getLogger(SkipFilter.class); + private static final Logger log = LogManager.getLogger(SkipFilter.class); public SkipFilter(final SymlinkResolver symlinkResolver, final Session session) { super(symlinkResolver, session, new DownloadFilterOptions(session.getHost())); diff --git a/core/src/main/java/ch/cyberduck/core/transfer/download/TrashFilter.java b/core/src/main/java/ch/cyberduck/core/transfer/download/TrashFilter.java index 8c545502c38..0182e4eb4df 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/download/TrashFilter.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/download/TrashFilter.java @@ -28,10 +28,11 @@ import ch.cyberduck.core.transfer.TransferStatus; import ch.cyberduck.core.transfer.symlink.SymlinkResolver; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class TrashFilter extends AbstractDownloadFilter { - private static final Logger log = Logger.getLogger(SkipFilter.class); + private static final Logger log = LogManager.getLogger(SkipFilter.class); private final Trash feature = LocalTrashFactory.get(); diff --git a/core/src/main/java/ch/cyberduck/core/transfer/normalizer/CopyRootPathsNormalizer.java b/core/src/main/java/ch/cyberduck/core/transfer/normalizer/CopyRootPathsNormalizer.java index 589e1fdd8b2..db60dba865a 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/normalizer/CopyRootPathsNormalizer.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/normalizer/CopyRootPathsNormalizer.java @@ -19,14 +19,15 @@ import ch.cyberduck.core.Path; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.HashMap; import java.util.Iterator; import java.util.Map; public class CopyRootPathsNormalizer implements RootPathsNormalizer> { - private static final Logger log = Logger.getLogger(CopyRootPathsNormalizer.class); + private static final Logger log = LogManager.getLogger(CopyRootPathsNormalizer.class); /** * Prunes the map of selected files. Files which are a child of an already included directory diff --git a/core/src/main/java/ch/cyberduck/core/transfer/normalizer/DownloadRootPathsNormalizer.java b/core/src/main/java/ch/cyberduck/core/transfer/normalizer/DownloadRootPathsNormalizer.java index aa8f90c5612..bf4f763c19a 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/normalizer/DownloadRootPathsNormalizer.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/normalizer/DownloadRootPathsNormalizer.java @@ -24,14 +24,15 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class DownloadRootPathsNormalizer implements RootPathsNormalizer> { - private static final Logger log = Logger.getLogger(DownloadRootPathsNormalizer.class); + private static final Logger log = LogManager.getLogger(DownloadRootPathsNormalizer.class); @Override public List normalize(final List roots) { diff --git a/core/src/main/java/ch/cyberduck/core/transfer/normalizer/UploadRootPathsNormalizer.java b/core/src/main/java/ch/cyberduck/core/transfer/normalizer/UploadRootPathsNormalizer.java index fa20db6f181..9c87d08c8f3 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/normalizer/UploadRootPathsNormalizer.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/normalizer/UploadRootPathsNormalizer.java @@ -20,14 +20,15 @@ import ch.cyberduck.core.Path; import ch.cyberduck.core.transfer.TransferItem; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class UploadRootPathsNormalizer implements RootPathsNormalizer> { - private static final Logger log = Logger.getLogger(UploadRootPathsNormalizer.class); + private static final Logger log = LogManager.getLogger(UploadRootPathsNormalizer.class); @Override public List normalize(final List roots) { diff --git a/core/src/main/java/ch/cyberduck/core/transfer/symlink/DownloadSymlinkResolver.java b/core/src/main/java/ch/cyberduck/core/transfer/symlink/DownloadSymlinkResolver.java index a539e8bedc0..8bb527d22d8 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/symlink/DownloadSymlinkResolver.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/symlink/DownloadSymlinkResolver.java @@ -23,12 +23,13 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import ch.cyberduck.core.transfer.TransferItem; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.List; public class DownloadSymlinkResolver extends AbstractSymlinkResolver { - private static final Logger log = Logger.getLogger(DownloadSymlinkResolver.class); + private static final Logger log = LogManager.getLogger(DownloadSymlinkResolver.class); private final List files; @@ -71,4 +72,4 @@ public boolean resolve(final Path file) { private boolean findTarget(final Path target, final Path root) { return target.equals(root) || target.isChild(root); } -} \ No newline at end of file +} diff --git a/core/src/main/java/ch/cyberduck/core/transfer/symlink/UploadSymlinkResolver.java b/core/src/main/java/ch/cyberduck/core/transfer/symlink/UploadSymlinkResolver.java index 160a0254257..0cda3ddca3b 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/symlink/UploadSymlinkResolver.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/symlink/UploadSymlinkResolver.java @@ -24,12 +24,13 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import ch.cyberduck.core.transfer.TransferItem; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.List; public class UploadSymlinkResolver extends AbstractSymlinkResolver { - private static final Logger log = Logger.getLogger(UploadSymlinkResolver.class); + private static final Logger log = LogManager.getLogger(UploadSymlinkResolver.class); private final Symlink feature; @@ -65,4 +66,4 @@ public boolean resolve(final Local file) throws NotfoundException, LocalAccessDe private boolean findTarget(final Local target, final Local root) { return target.equals(root) || target.isChild(root); } -} \ No newline at end of file +} diff --git a/core/src/main/java/ch/cyberduck/core/transfer/synchronisation/SynchronizationPathFilter.java b/core/src/main/java/ch/cyberduck/core/transfer/synchronisation/SynchronizationPathFilter.java index 304860d80d8..c0275a55a9b 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/synchronisation/SynchronizationPathFilter.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/synchronisation/SynchronizationPathFilter.java @@ -32,10 +32,11 @@ import ch.cyberduck.core.transfer.TransferPathFilter; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class SynchronizationPathFilter implements TransferPathFilter { - private static final Logger log = Logger.getLogger(SynchronizationPathFilter.class); + private static final Logger log = LogManager.getLogger(SynchronizationPathFilter.class); private final ComparePathFilter comparison; diff --git a/core/src/main/java/ch/cyberduck/core/transfer/upload/AbstractUploadFilter.java b/core/src/main/java/ch/cyberduck/core/transfer/upload/AbstractUploadFilter.java index e4719b7ebad..24e1130c854 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/upload/AbstractUploadFilter.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/upload/AbstractUploadFilter.java @@ -56,13 +56,14 @@ import ch.cyberduck.core.transfer.symlink.SymlinkResolver; import ch.cyberduck.ui.browser.SearchFilterFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.EnumSet; public abstract class AbstractUploadFilter implements TransferPathFilter { - private static final Logger log = Logger.getLogger(AbstractUploadFilter.class); + private static final Logger log = LogManager.getLogger(AbstractUploadFilter.class); private final Preferences preferences = PreferencesFactory.get(); diff --git a/core/src/main/java/ch/cyberduck/core/transfer/upload/CompareFilter.java b/core/src/main/java/ch/cyberduck/core/transfer/upload/CompareFilter.java index 0ea3c6885e3..d03ae3bc989 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/upload/CompareFilter.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/upload/CompareFilter.java @@ -29,10 +29,11 @@ import ch.cyberduck.core.transfer.TransferStatus; import ch.cyberduck.core.transfer.symlink.SymlinkResolver; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class CompareFilter extends AbstractUploadFilter { - private static final Logger log = Logger.getLogger(CompareFilter.class); + private static final Logger log = LogManager.getLogger(CompareFilter.class); private final ProgressListener listener; private final DefaultComparePathFilter comparisonService; diff --git a/core/src/main/java/ch/cyberduck/core/transfer/upload/RenameExistingFilter.java b/core/src/main/java/ch/cyberduck/core/transfer/upload/RenameExistingFilter.java index bb64640e232..577982d6ebf 100755 --- a/core/src/main/java/ch/cyberduck/core/transfer/upload/RenameExistingFilter.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/upload/RenameExistingFilter.java @@ -32,12 +32,13 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; public class RenameExistingFilter extends AbstractUploadFilter { - private static final Logger log = Logger.getLogger(RenameExistingFilter.class); + private static final Logger log = LogManager.getLogger(RenameExistingFilter.class); private final Move move; diff --git a/core/src/main/java/ch/cyberduck/core/transfer/upload/RenameFilter.java b/core/src/main/java/ch/cyberduck/core/transfer/upload/RenameFilter.java index 12ac5af74bb..46d187e8597 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/upload/RenameFilter.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/upload/RenameFilter.java @@ -27,10 +27,11 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class RenameFilter extends AbstractUploadFilter { - private static final Logger log = Logger.getLogger(RenameFilter.class); + private static final Logger log = LogManager.getLogger(RenameFilter.class); public RenameFilter(final SymlinkResolver symlinkResolver, final Session session) { this(symlinkResolver, session, new UploadFilterOptions(session.getHost())); diff --git a/core/src/main/java/ch/cyberduck/core/transfer/upload/ResumeFilter.java b/core/src/main/java/ch/cyberduck/core/transfer/upload/ResumeFilter.java index 7f3e392ff5f..714d3f3bcfa 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/upload/ResumeFilter.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/upload/ResumeFilter.java @@ -31,10 +31,11 @@ import ch.cyberduck.core.transfer.TransferStatus; import ch.cyberduck.core.transfer.symlink.SymlinkResolver; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class ResumeFilter extends AbstractUploadFilter { - private static final Logger log = Logger.getLogger(ResumeFilter.class); + private static final Logger log = LogManager.getLogger(ResumeFilter.class); private final Upload upload; diff --git a/core/src/main/java/ch/cyberduck/core/transfer/upload/SkipFilter.java b/core/src/main/java/ch/cyberduck/core/transfer/upload/SkipFilter.java index 64e7121e019..a28bc38bb27 100644 --- a/core/src/main/java/ch/cyberduck/core/transfer/upload/SkipFilter.java +++ b/core/src/main/java/ch/cyberduck/core/transfer/upload/SkipFilter.java @@ -24,10 +24,11 @@ import ch.cyberduck.core.transfer.TransferStatus; import ch.cyberduck.core.transfer.symlink.SymlinkResolver; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class SkipFilter extends AbstractUploadFilter { - private static final Logger log = Logger.getLogger(SkipFilter.class); + private static final Logger log = LogManager.getLogger(SkipFilter.class); public SkipFilter(final SymlinkResolver symlinkResolver, final Session session) { this(symlinkResolver, session, new UploadFilterOptions(session.getHost())); diff --git a/core/src/main/java/ch/cyberduck/core/unicode/AbstractUnicodeNormalizer.java b/core/src/main/java/ch/cyberduck/core/unicode/AbstractUnicodeNormalizer.java index e1238d05b3e..c12c8dad95b 100644 --- a/core/src/main/java/ch/cyberduck/core/unicode/AbstractUnicodeNormalizer.java +++ b/core/src/main/java/ch/cyberduck/core/unicode/AbstractUnicodeNormalizer.java @@ -15,12 +15,13 @@ * GNU General Public License for more details. */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.Normalizer; public abstract class AbstractUnicodeNormalizer implements UnicodeNormalizer { - private static final Logger log = Logger.getLogger(AbstractUnicodeNormalizer.class); + private static final Logger log = LogManager.getLogger(AbstractUnicodeNormalizer.class); private final Normalizer.Form form; diff --git a/core/src/main/java/ch/cyberduck/core/updater/AbstractPeriodicUpdateChecker.java b/core/src/main/java/ch/cyberduck/core/updater/AbstractPeriodicUpdateChecker.java index 5a8cfb698da..d47a4c59f9e 100644 --- a/core/src/main/java/ch/cyberduck/core/updater/AbstractPeriodicUpdateChecker.java +++ b/core/src/main/java/ch/cyberduck/core/updater/AbstractPeriodicUpdateChecker.java @@ -21,7 +21,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import ch.cyberduck.core.threading.DefaultMainAction; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.time.Duration; import java.util.Map; @@ -29,7 +30,7 @@ import java.util.TimerTask; public abstract class AbstractPeriodicUpdateChecker implements PeriodicUpdateChecker { - private static final Logger log = Logger.getLogger(AbstractPeriodicUpdateChecker.class.getName()); + private static final Logger log = LogManager.getLogger(AbstractPeriodicUpdateChecker.class.getName()); private final Controller controller; private final Duration delay; diff --git a/core/src/main/java/ch/cyberduck/core/updater/PeriodicUpdateCheckerFactory.java b/core/src/main/java/ch/cyberduck/core/updater/PeriodicUpdateCheckerFactory.java index aab061c1eda..9cf46937421 100644 --- a/core/src/main/java/ch/cyberduck/core/updater/PeriodicUpdateCheckerFactory.java +++ b/core/src/main/java/ch/cyberduck/core/updater/PeriodicUpdateCheckerFactory.java @@ -20,13 +20,14 @@ import ch.cyberduck.core.SingleThreadController; import org.apache.commons.lang3.reflect.ConstructorUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; public class PeriodicUpdateCheckerFactory extends Factory { - private static final Logger log = Logger.getLogger(PeriodicUpdateCheckerFactory.class); + private static final Logger log = LogManager.getLogger(PeriodicUpdateCheckerFactory.class); public PeriodicUpdateCheckerFactory() { super("factory.updater.class"); diff --git a/core/src/main/java/ch/cyberduck/core/vault/DecryptingListProgressListener.java b/core/src/main/java/ch/cyberduck/core/vault/DecryptingListProgressListener.java index df9edaefaa7..1f993124eb0 100644 --- a/core/src/main/java/ch/cyberduck/core/vault/DecryptingListProgressListener.java +++ b/core/src/main/java/ch/cyberduck/core/vault/DecryptingListProgressListener.java @@ -25,10 +25,11 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import ch.cyberduck.core.features.Vault; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class DecryptingListProgressListener extends IndexedListProgressListener { - private static final Logger log = Logger.getLogger(DecryptingListProgressListener.class); + private static final Logger log = LogManager.getLogger(DecryptingListProgressListener.class); private final Session session; private final Vault vault; diff --git a/core/src/main/java/ch/cyberduck/core/vault/DefaultVaultRegistry.java b/core/src/main/java/ch/cyberduck/core/vault/DefaultVaultRegistry.java index a75287203b6..a49799e2eb2 100644 --- a/core/src/main/java/ch/cyberduck/core/vault/DefaultVaultRegistry.java +++ b/core/src/main/java/ch/cyberduck/core/vault/DefaultVaultRegistry.java @@ -28,14 +28,15 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import ch.cyberduck.core.vault.registry.*; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.nio.charset.StandardCharsets; import java.util.Arrays; import java.util.concurrent.CopyOnWriteArraySet; public class DefaultVaultRegistry extends CopyOnWriteArraySet implements VaultRegistry { - private static final Logger log = Logger.getLogger(DefaultVaultRegistry.class); + private static final Logger log = LogManager.getLogger(DefaultVaultRegistry.class); public static final String DEFAULT_MASTERKEY_FILE_NAME = PreferencesFactory.get().getProperty("cryptomator.vault.masterkey.filename"); diff --git a/core/src/main/java/ch/cyberduck/core/vault/DisabledVaultLookupListener.java b/core/src/main/java/ch/cyberduck/core/vault/DisabledVaultLookupListener.java index 7f197b43ea2..c75c176e0d6 100644 --- a/core/src/main/java/ch/cyberduck/core/vault/DisabledVaultLookupListener.java +++ b/core/src/main/java/ch/cyberduck/core/vault/DisabledVaultLookupListener.java @@ -19,10 +19,11 @@ import ch.cyberduck.core.Session; import ch.cyberduck.core.features.Vault; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public final class DisabledVaultLookupListener implements VaultLookupListener { - private static final Logger log = Logger.getLogger(DisabledVaultLookupListener.class); + private static final Logger log = LogManager.getLogger(DisabledVaultLookupListener.class); @Override public Vault load(final Session session, final Path directory, final String masterkey, final byte[] pepper) { diff --git a/core/src/main/java/ch/cyberduck/core/vault/LoadingVaultLookupListener.java b/core/src/main/java/ch/cyberduck/core/vault/LoadingVaultLookupListener.java index 5363578a1a3..3d07b944a71 100644 --- a/core/src/main/java/ch/cyberduck/core/vault/LoadingVaultLookupListener.java +++ b/core/src/main/java/ch/cyberduck/core/vault/LoadingVaultLookupListener.java @@ -22,10 +22,11 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.features.Vault; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class LoadingVaultLookupListener implements VaultLookupListener { - private static final Logger log = Logger.getLogger(LoadingVaultLookupListener.class); + private static final Logger log = LogManager.getLogger(LoadingVaultLookupListener.class); private final VaultRegistry registry; private final PasswordStore keychain; diff --git a/core/src/main/java/ch/cyberduck/core/vault/VaultFactory.java b/core/src/main/java/ch/cyberduck/core/vault/VaultFactory.java index 7ceb063fb15..bdc892b62c1 100644 --- a/core/src/main/java/ch/cyberduck/core/vault/VaultFactory.java +++ b/core/src/main/java/ch/cyberduck/core/vault/VaultFactory.java @@ -20,13 +20,14 @@ import ch.cyberduck.core.features.Vault; import org.apache.commons.lang3.reflect.ConstructorUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; public class VaultFactory extends Factory { - private static final Logger log = Logger.getLogger(VaultFactory.class); + private static final Logger log = LogManager.getLogger(VaultFactory.class); protected VaultFactory() { super("factory.vault.class"); diff --git a/core/src/main/java/ch/cyberduck/core/vault/VaultFinderListProgressListener.java b/core/src/main/java/ch/cyberduck/core/vault/VaultFinderListProgressListener.java index b9cba573fd5..982c26ecde2 100644 --- a/core/src/main/java/ch/cyberduck/core/vault/VaultFinderListProgressListener.java +++ b/core/src/main/java/ch/cyberduck/core/vault/VaultFinderListProgressListener.java @@ -24,12 +24,13 @@ import ch.cyberduck.core.features.Vault; import ch.cyberduck.core.preferences.HostPreferences; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.nio.charset.StandardCharsets; public class VaultFinderListProgressListener extends IndexedListProgressListener { - private static final Logger log = Logger.getLogger(VaultFinderListProgressListener.class); + private static final Logger log = LogManager.getLogger(VaultFinderListProgressListener.class); private final Session session; private final VaultLookupListener listener; diff --git a/core/src/main/java/ch/cyberduck/core/vault/VaultFinderListService.java b/core/src/main/java/ch/cyberduck/core/vault/VaultFinderListService.java index 0f9ff04dff3..4e11e086516 100644 --- a/core/src/main/java/ch/cyberduck/core/vault/VaultFinderListService.java +++ b/core/src/main/java/ch/cyberduck/core/vault/VaultFinderListService.java @@ -24,10 +24,11 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.features.Vault; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class VaultFinderListService implements ListService { - private static final Logger log = Logger.getLogger(VaultFinderListService.class); + private static final Logger log = LogManager.getLogger(VaultFinderListService.class); private final Session session; private final ListService delegate; diff --git a/core/src/main/java/ch/cyberduck/core/vault/registry/VaultRegistryFindFeature.java b/core/src/main/java/ch/cyberduck/core/vault/registry/VaultRegistryFindFeature.java index a0b1beafa0b..aede59c02d4 100644 --- a/core/src/main/java/ch/cyberduck/core/vault/registry/VaultRegistryFindFeature.java +++ b/core/src/main/java/ch/cyberduck/core/vault/registry/VaultRegistryFindFeature.java @@ -26,13 +26,14 @@ import ch.cyberduck.core.vault.VaultRegistry; import ch.cyberduck.core.vault.VaultUnlockCancelException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.nio.charset.StandardCharsets; import java.util.EnumSet; public class VaultRegistryFindFeature implements Find { - private static final Logger log = Logger.getLogger(VaultRegistryFindFeature.class); + private static final Logger log = LogManager.getLogger(VaultRegistryFindFeature.class); private final Session session; private final Find proxy; diff --git a/core/src/main/java/ch/cyberduck/core/vault/registry/VaultRegistryListService.java b/core/src/main/java/ch/cyberduck/core/vault/registry/VaultRegistryListService.java index 2f63783268d..14919a2b1bf 100644 --- a/core/src/main/java/ch/cyberduck/core/vault/registry/VaultRegistryListService.java +++ b/core/src/main/java/ch/cyberduck/core/vault/registry/VaultRegistryListService.java @@ -29,10 +29,11 @@ import ch.cyberduck.core.vault.VaultRegistry; import ch.cyberduck.core.vault.VaultUnlockCancelException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class VaultRegistryListService implements ListService { - private static final Logger log = Logger.getLogger(VaultRegistryListService.class); + private static final Logger log = LogManager.getLogger(VaultRegistryListService.class); private final VaultRegistry registry; private final VaultLookupListener lookup; diff --git a/core/src/main/java/ch/cyberduck/core/vault/registry/VaultRegistryMoveFeature.java b/core/src/main/java/ch/cyberduck/core/vault/registry/VaultRegistryMoveFeature.java index 003dcbf31d1..07b21607a23 100644 --- a/core/src/main/java/ch/cyberduck/core/vault/registry/VaultRegistryMoveFeature.java +++ b/core/src/main/java/ch/cyberduck/core/vault/registry/VaultRegistryMoveFeature.java @@ -28,12 +28,13 @@ import ch.cyberduck.core.vault.DefaultVaultRegistry; import ch.cyberduck.core.vault.VaultUnlockCancelException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; public class VaultRegistryMoveFeature implements Move { - private static final Logger log = Logger.getLogger(VaultRegistryMoveFeature.class); + private static final Logger log = LogManager.getLogger(VaultRegistryMoveFeature.class); private final Session session; private Session destination; diff --git a/core/src/main/java/ch/cyberduck/core/worker/AbstractTransferWorker.java b/core/src/main/java/ch/cyberduck/core/worker/AbstractTransferWorker.java index 1672415742d..111cd8748f1 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/AbstractTransferWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/AbstractTransferWorker.java @@ -52,7 +52,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.concurrent.ConcurrentUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.List; @@ -61,7 +62,7 @@ import java.util.concurrent.Future; public abstract class AbstractTransferWorker extends TransferWorker { - private static final Logger log = Logger.getLogger(AbstractTransferWorker.class); + private static final Logger log = LogManager.getLogger(AbstractTransferWorker.class); private final SleepPreventer sleep = SleepPreventerFactory.get(); private final NotificationService notification; diff --git a/core/src/main/java/ch/cyberduck/core/worker/AttributesWorker.java b/core/src/main/java/ch/cyberduck/core/worker/AttributesWorker.java index 868b1678305..8eaa41028d4 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/AttributesWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/AttributesWorker.java @@ -22,12 +22,13 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.features.AttributesFinder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; public class AttributesWorker extends Worker { - private static final Logger log = Logger.getLogger(AttributesWorker.class.getName()); + private static final Logger log = LogManager.getLogger(AttributesWorker.class.getName()); private final Cache cache; private final Path file; diff --git a/core/src/main/java/ch/cyberduck/core/worker/ConcurrentTransferWorker.java b/core/src/main/java/ch/cyberduck/core/worker/ConcurrentTransferWorker.java index 0190076a9d3..e38e02703a2 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/ConcurrentTransferWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/ConcurrentTransferWorker.java @@ -38,7 +38,8 @@ import ch.cyberduck.core.transfer.TransferSpeedometer; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.concurrent.CompletionService; import java.util.concurrent.ExecutionException; @@ -47,7 +48,7 @@ import java.util.concurrent.atomic.AtomicInteger; public class ConcurrentTransferWorker extends AbstractTransferWorker { - private static final Logger log = Logger.getLogger(ConcurrentTransferWorker.class); + private static final Logger log = LogManager.getLogger(ConcurrentTransferWorker.class); private final SessionPool source; private final SessionPool destination; diff --git a/core/src/main/java/ch/cyberduck/core/worker/CreateDirectoryWorker.java b/core/src/main/java/ch/cyberduck/core/worker/CreateDirectoryWorker.java index 59a8fa0eb3d..25a240e9cc6 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/CreateDirectoryWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/CreateDirectoryWorker.java @@ -28,14 +28,15 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.EnumSet; import java.util.Objects; public class CreateDirectoryWorker extends Worker { - private static final Logger log = Logger.getLogger(CreateDirectoryWorker.class); + private static final Logger log = LogManager.getLogger(CreateDirectoryWorker.class); private final Path folder; private final String region; diff --git a/core/src/main/java/ch/cyberduck/core/worker/CreateSymlinkWorker.java b/core/src/main/java/ch/cyberduck/core/worker/CreateSymlinkWorker.java index fee82816037..85461da6083 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/CreateSymlinkWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/CreateSymlinkWorker.java @@ -21,12 +21,13 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.features.Symlink; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; public class CreateSymlinkWorker extends Worker { - private static final Logger log = Logger.getLogger(CreateSymlinkWorker.class); + private static final Logger log = LogManager.getLogger(CreateSymlinkWorker.class); private final Path link; private final String target; diff --git a/core/src/main/java/ch/cyberduck/core/worker/DeleteWorker.java b/core/src/main/java/ch/cyberduck/core/worker/DeleteWorker.java index 64c061fe56e..147ddd031e9 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/DeleteWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/DeleteWorker.java @@ -35,7 +35,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import ch.cyberduck.ui.browser.PathReloadFinder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.ArrayList; @@ -47,7 +48,7 @@ public class DeleteWorker extends Worker> { - private static final Logger log = Logger.getLogger(DeleteWorker.class); + private static final Logger log = LogManager.getLogger(DeleteWorker.class); /** * Selected files. diff --git a/core/src/main/java/ch/cyberduck/core/worker/DistributionPurgeWorker.java b/core/src/main/java/ch/cyberduck/core/worker/DistributionPurgeWorker.java index 7b89841ebaf..66158601920 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/DistributionPurgeWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/DistributionPurgeWorker.java @@ -26,14 +26,15 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.exception.ConnectionCanceledException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.List; import java.util.Objects; public class DistributionPurgeWorker extends Worker { - private static final Logger log = Logger.getLogger(DistributionPurgeWorker.class); + private static final Logger log = LogManager.getLogger(DistributionPurgeWorker.class); /** * Selected files. diff --git a/core/src/main/java/ch/cyberduck/core/worker/DownloadShareWorker.java b/core/src/main/java/ch/cyberduck/core/worker/DownloadShareWorker.java index 5457e0805a1..41626f2d96b 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/DownloadShareWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/DownloadShareWorker.java @@ -23,13 +23,14 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.features.PromptUrlProvider; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.Collections; public class DownloadShareWorker extends Worker { - private static final Logger log = Logger.getLogger(DownloadShareWorker.class); + private static final Logger log = LogManager.getLogger(DownloadShareWorker.class); private final Path file; private final Options options; diff --git a/core/src/main/java/ch/cyberduck/core/worker/ListEncryptionKeysWorker.java b/core/src/main/java/ch/cyberduck/core/worker/ListEncryptionKeysWorker.java index 0776e0434d2..8c4f9fecca5 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/ListEncryptionKeysWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/ListEncryptionKeysWorker.java @@ -24,7 +24,8 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import ch.cyberduck.core.features.Encryption; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.Collections; @@ -34,7 +35,7 @@ import java.util.Set; public class ListEncryptionKeysWorker extends Worker> { - private static final Logger log = Logger.getLogger(ListEncryptionKeysWorker.class); + private static final Logger log = LogManager.getLogger(ListEncryptionKeysWorker.class); /** * Selected files. diff --git a/core/src/main/java/ch/cyberduck/core/worker/MountWorker.java b/core/src/main/java/ch/cyberduck/core/worker/MountWorker.java index cb987c94e5b..43f7e6e3167 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/MountWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/MountWorker.java @@ -32,14 +32,15 @@ import ch.cyberduck.core.features.Home; import ch.cyberduck.core.shared.DefaultHomeFinderService; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.EnumSet; import java.util.Objects; public class MountWorker extends Worker { - private static final Logger log = Logger.getLogger(MountWorker.class); + private static final Logger log = LogManager.getLogger(MountWorker.class); private final Host bookmark; private final Cache cache; diff --git a/core/src/main/java/ch/cyberduck/core/worker/MoveWorker.java b/core/src/main/java/ch/cyberduck/core/worker/MoveWorker.java index 75e1a796db0..61dcac585a1 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/MoveWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/MoveWorker.java @@ -43,7 +43,8 @@ import ch.cyberduck.ui.comparator.TimestampComparator; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.ArrayList; @@ -57,7 +58,7 @@ import java.util.stream.Collectors; public class MoveWorker extends Worker> { - private static final Logger log = Logger.getLogger(MoveWorker.class); + private static final Logger log = LogManager.getLogger(MoveWorker.class); private final Map files; private final SessionPool target; diff --git a/core/src/main/java/ch/cyberduck/core/worker/ReadAclWorker.java b/core/src/main/java/ch/cyberduck/core/worker/ReadAclWorker.java index ddf6fc2c46c..2bac4afbbc1 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/ReadAclWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/ReadAclWorker.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import ch.cyberduck.core.features.AclPermission; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.ArrayList; @@ -36,7 +37,7 @@ import java.util.Objects; public class ReadAclWorker extends Worker> { - private static final Logger log = Logger.getLogger(ReadAclWorker.class); + private static final Logger log = LogManager.getLogger(ReadAclWorker.class); private final List files; diff --git a/core/src/main/java/ch/cyberduck/core/worker/ReadMetadataWorker.java b/core/src/main/java/ch/cyberduck/core/worker/ReadMetadataWorker.java index bafaab0a58c..f70931bd230 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/ReadMetadataWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/ReadMetadataWorker.java @@ -25,7 +25,8 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.features.Metadata; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.Collections; @@ -37,7 +38,7 @@ import java.util.stream.Stream; public class ReadMetadataWorker extends Worker> { - private static final Logger log = Logger.getLogger(ReadMetadataWorker.class); + private static final Logger log = LogManager.getLogger(ReadMetadataWorker.class); /** * Selected files. diff --git a/core/src/main/java/ch/cyberduck/core/worker/ReadPermissionWorker.java b/core/src/main/java/ch/cyberduck/core/worker/ReadPermissionWorker.java index 1ea35eb65c5..c7c21c325f0 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/ReadPermissionWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/ReadPermissionWorker.java @@ -29,7 +29,8 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import ch.cyberduck.core.features.UnixPermission; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.ArrayList; @@ -40,7 +41,7 @@ import java.util.stream.Stream; public class ReadPermissionWorker extends Worker { - private static final Logger log = Logger.getLogger(ReadPermissionWorker.class); + private static final Logger log = LogManager.getLogger(ReadPermissionWorker.class); /** * Selected files. diff --git a/core/src/main/java/ch/cyberduck/core/worker/RestoreWorker.java b/core/src/main/java/ch/cyberduck/core/worker/RestoreWorker.java index db5589402fe..8647bad6bcf 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/RestoreWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/RestoreWorker.java @@ -25,7 +25,8 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import ch.cyberduck.core.features.Restore; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.Collections; @@ -33,7 +34,7 @@ import java.util.Objects; public class RestoreWorker extends Worker> { - private static final Logger log = Logger.getLogger(RestoreWorker.class); + private static final Logger log = LogManager.getLogger(RestoreWorker.class); private final List files; private final LoginCallback prompt; diff --git a/core/src/main/java/ch/cyberduck/core/worker/RevertWorker.java b/core/src/main/java/ch/cyberduck/core/worker/RevertWorker.java index 782b3baed4c..e1f54903ae1 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/RevertWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/RevertWorker.java @@ -24,7 +24,8 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import ch.cyberduck.core.features.Versioning; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.Collections; @@ -32,7 +33,7 @@ import java.util.Objects; public class RevertWorker extends Worker> { - private static final Logger log = Logger.getLogger(RevertWorker.class); + private static final Logger log = LogManager.getLogger(RevertWorker.class); private final List files; diff --git a/core/src/main/java/ch/cyberduck/core/worker/SearchWorker.java b/core/src/main/java/ch/cyberduck/core/worker/SearchWorker.java index 8c6d461f883..d30116289e0 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/SearchWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/SearchWorker.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import ch.cyberduck.core.features.Search; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.HashSet; @@ -36,7 +37,7 @@ import java.util.regex.Pattern; public class SearchWorker extends Worker> { - private static final Logger log = Logger.getLogger(SearchWorker.class); + private static final Logger log = LogManager.getLogger(SearchWorker.class); private final Path directory; private final Filter filter; diff --git a/core/src/main/java/ch/cyberduck/core/worker/SessionListWorker.java b/core/src/main/java/ch/cyberduck/core/worker/SessionListWorker.java index 18ee360e14c..01bcf1a7952 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/SessionListWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/SessionListWorker.java @@ -28,13 +28,14 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import ch.cyberduck.core.exception.ListCanceledException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.Objects; public class SessionListWorker extends Worker> { - private static final Logger log = Logger.getLogger(SessionListWorker.class); + private static final Logger log = LogManager.getLogger(SessionListWorker.class); private final Cache cache; private final Path directory; diff --git a/core/src/main/java/ch/cyberduck/core/worker/TouchWorker.java b/core/src/main/java/ch/cyberduck/core/worker/TouchWorker.java index 993dc1ed916..bb971bc9ad7 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/TouchWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/TouchWorker.java @@ -31,14 +31,15 @@ import ch.cyberduck.core.transfer.TransferStatus; import ch.cyberduck.ui.browser.SearchFilterFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.EnumSet; import java.util.Objects; public class TouchWorker extends Worker { - private static final Logger log = Logger.getLogger(TouchWorker.class); + private static final Logger log = LogManager.getLogger(TouchWorker.class); private final Path file; diff --git a/core/src/main/java/ch/cyberduck/core/worker/TransferPromptFilterWorker.java b/core/src/main/java/ch/cyberduck/core/worker/TransferPromptFilterWorker.java index aa1ac4b63ce..15770589343 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/TransferPromptFilterWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/TransferPromptFilterWorker.java @@ -32,7 +32,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.Collections; @@ -41,7 +42,7 @@ import java.util.Objects; public class TransferPromptFilterWorker extends Worker> { - private static final Logger log = Logger.getLogger(TransferPromptFilterWorker.class); + private static final Logger log = LogManager.getLogger(TransferPromptFilterWorker.class); private final Transfer transfer; private final TransferAction action; diff --git a/core/src/main/java/ch/cyberduck/core/worker/TransferPromptListWorker.java b/core/src/main/java/ch/cyberduck/core/worker/TransferPromptListWorker.java index 0aca82c2371..f32f89384be 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/TransferPromptListWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/TransferPromptListWorker.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.transfer.Transfer; import ch.cyberduck.core.transfer.TransferItem; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.Collections; @@ -35,7 +36,7 @@ import java.util.Objects; public class TransferPromptListWorker extends Worker> { - private static final Logger log = Logger.getLogger(TransferPromptListWorker.class); + private static final Logger log = LogManager.getLogger(TransferPromptListWorker.class); private final Path directory; private final Local local; diff --git a/core/src/main/java/ch/cyberduck/core/worker/UploadShareWorker.java b/core/src/main/java/ch/cyberduck/core/worker/UploadShareWorker.java index cbdc85dae33..b7f5e09c968 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/UploadShareWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/UploadShareWorker.java @@ -23,13 +23,14 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.features.PromptUrlProvider; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.Collections; public class UploadShareWorker extends Worker { - private static final Logger log = Logger.getLogger(UploadShareWorker.class); + private static final Logger log = LogManager.getLogger(UploadShareWorker.class); private final Path file; private final Options options; diff --git a/core/src/main/java/ch/cyberduck/core/worker/Worker.java b/core/src/main/java/ch/cyberduck/core/worker/Worker.java index a102e92c7f3..fffbddd4958 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/Worker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/Worker.java @@ -26,7 +26,8 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.exception.ConnectionCanceledException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.HashSet; import java.util.List; @@ -34,7 +35,7 @@ import java.util.concurrent.atomic.AtomicBoolean; public abstract class Worker { - private static final Logger log = Logger.getLogger(Worker.class); + private static final Logger log = LogManager.getLogger(Worker.class); private final AtomicBoolean canceled = new AtomicBoolean(); diff --git a/core/src/main/java/ch/cyberduck/core/worker/WriteAclWorker.java b/core/src/main/java/ch/cyberduck/core/worker/WriteAclWorker.java index 1fc07ccc5db..450444ea7c6 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/WriteAclWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/WriteAclWorker.java @@ -29,14 +29,15 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import ch.cyberduck.core.features.AclPermission; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.List; import java.util.Objects; public class WriteAclWorker extends Worker { - private static final Logger log = Logger.getLogger(WriteAclWorker.class); + private static final Logger log = LogManager.getLogger(WriteAclWorker.class); /** * Selected files. diff --git a/core/src/main/java/ch/cyberduck/core/worker/WriteDistributionWorker.java b/core/src/main/java/ch/cyberduck/core/worker/WriteDistributionWorker.java index 0847430e358..f1ec504605d 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/WriteDistributionWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/WriteDistributionWorker.java @@ -25,14 +25,15 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.exception.ConnectionCanceledException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.List; import java.util.Objects; public class WriteDistributionWorker extends Worker { - private static final Logger log = Logger.getLogger(WriteDistributionWorker.class); + private static final Logger log = LogManager.getLogger(WriteDistributionWorker.class); /** * Selected files. diff --git a/core/src/main/java/ch/cyberduck/core/worker/WriteEncryptionWorker.java b/core/src/main/java/ch/cyberduck/core/worker/WriteEncryptionWorker.java index 48b18e81d19..e65f0a018ef 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/WriteEncryptionWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/WriteEncryptionWorker.java @@ -27,14 +27,15 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import ch.cyberduck.core.features.Encryption; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.List; import java.util.Objects; public class WriteEncryptionWorker extends Worker { - private static final Logger log = Logger.getLogger(WriteEncryptionWorker.class); + private static final Logger log = LogManager.getLogger(WriteEncryptionWorker.class); /** * Selected files. diff --git a/core/src/main/java/ch/cyberduck/core/worker/WriteLifecycleWorker.java b/core/src/main/java/ch/cyberduck/core/worker/WriteLifecycleWorker.java index bedc8c194a3..f211bc043ee 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/WriteLifecycleWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/WriteLifecycleWorker.java @@ -24,14 +24,15 @@ import ch.cyberduck.core.features.Lifecycle; import ch.cyberduck.core.lifecycle.LifecycleConfiguration; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.List; import java.util.Objects; public class WriteLifecycleWorker extends Worker { - private static final Logger log = Logger.getLogger(WriteLifecycleWorker.class); + private static final Logger log = LogManager.getLogger(WriteLifecycleWorker.class); /** * Selected files. diff --git a/core/src/main/java/ch/cyberduck/core/worker/WriteLoggingWorker.java b/core/src/main/java/ch/cyberduck/core/worker/WriteLoggingWorker.java index 777e598b26f..0c13228b874 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/WriteLoggingWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/WriteLoggingWorker.java @@ -24,14 +24,15 @@ import ch.cyberduck.core.features.Logging; import ch.cyberduck.core.logging.LoggingConfiguration; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.List; import java.util.Objects; public class WriteLoggingWorker extends Worker { - private static final Logger log = Logger.getLogger(WriteLoggingWorker.class); + private static final Logger log = LogManager.getLogger(WriteLoggingWorker.class); /** * Selected files. diff --git a/core/src/main/java/ch/cyberduck/core/worker/WriteMetadataWorker.java b/core/src/main/java/ch/cyberduck/core/worker/WriteMetadataWorker.java index f3a2986f54f..91a8d2f2b97 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/WriteMetadataWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/WriteMetadataWorker.java @@ -29,7 +29,8 @@ import ch.cyberduck.core.features.Metadata; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.HashMap; @@ -38,7 +39,7 @@ import java.util.Objects; public class WriteMetadataWorker extends Worker { - private static final Logger log = Logger.getLogger(WriteMetadataWorker.class); + private static final Logger log = LogManager.getLogger(WriteMetadataWorker.class); /** * Selected files. diff --git a/core/src/main/java/ch/cyberduck/core/worker/WritePermissionWorker.java b/core/src/main/java/ch/cyberduck/core/worker/WritePermissionWorker.java index 78fd5ab4372..18c40adcce1 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/WritePermissionWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/WritePermissionWorker.java @@ -29,7 +29,8 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import ch.cyberduck.core.features.UnixPermission; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.HashMap; @@ -38,7 +39,7 @@ import java.util.Objects; public class WritePermissionWorker extends Worker { - private static final Logger log = Logger.getLogger(WritePermissionWorker.class); + private static final Logger log = LogManager.getLogger(WritePermissionWorker.class); /** * Selected files. diff --git a/core/src/main/java/ch/cyberduck/core/worker/WriteRedundancyWorker.java b/core/src/main/java/ch/cyberduck/core/worker/WriteRedundancyWorker.java index 869e93a35d8..edf563fdba7 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/WriteRedundancyWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/WriteRedundancyWorker.java @@ -27,14 +27,15 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import ch.cyberduck.core.features.Redundancy; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.List; import java.util.Objects; public class WriteRedundancyWorker extends Worker { - private static final Logger log = Logger.getLogger(WriteRedundancyWorker.class); + private static final Logger log = LogManager.getLogger(WriteRedundancyWorker.class); /** * Selected files. diff --git a/core/src/main/java/ch/cyberduck/core/worker/WriteTimestampWorker.java b/core/src/main/java/ch/cyberduck/core/worker/WriteTimestampWorker.java index ad9721b5435..de28d59f7f9 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/WriteTimestampWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/WriteTimestampWorker.java @@ -26,13 +26,14 @@ import ch.cyberduck.core.features.Timestamp; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.Objects; public class WriteTimestampWorker extends Worker { - private static final Logger log = Logger.getLogger(WriteTimestampWorker.class); + private static final Logger log = LogManager.getLogger(WriteTimestampWorker.class); private final Path file; private final Long timestamp; diff --git a/core/src/main/java/ch/cyberduck/core/worker/WriteTransferAccelerationWorker.java b/core/src/main/java/ch/cyberduck/core/worker/WriteTransferAccelerationWorker.java index 3ec1f5d1f4f..115b1253594 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/WriteTransferAccelerationWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/WriteTransferAccelerationWorker.java @@ -23,14 +23,15 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import ch.cyberduck.core.features.TransferAcceleration; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.List; import java.util.Objects; public class WriteTransferAccelerationWorker extends Worker { - private static final Logger log = Logger.getLogger(WriteTransferAccelerationWorker.class); + private static final Logger log = LogManager.getLogger(WriteTransferAccelerationWorker.class); /** * Selected files. diff --git a/core/src/main/java/ch/cyberduck/core/worker/WriteVersioningWorker.java b/core/src/main/java/ch/cyberduck/core/worker/WriteVersioningWorker.java index e95fe5fc503..4602237212d 100644 --- a/core/src/main/java/ch/cyberduck/core/worker/WriteVersioningWorker.java +++ b/core/src/main/java/ch/cyberduck/core/worker/WriteVersioningWorker.java @@ -25,14 +25,15 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import ch.cyberduck.core.features.Versioning; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.List; import java.util.Objects; public class WriteVersioningWorker extends Worker { - private static final Logger log = Logger.getLogger(WriteVersioningWorker.class); + private static final Logger log = LogManager.getLogger(WriteVersioningWorker.class); /** * Selected files. diff --git a/core/src/main/java/ch/cyberduck/ui/browser/DownloadDirectoryFinder.java b/core/src/main/java/ch/cyberduck/ui/browser/DownloadDirectoryFinder.java index 4a5fa796bd7..f93af14eea4 100644 --- a/core/src/main/java/ch/cyberduck/ui/browser/DownloadDirectoryFinder.java +++ b/core/src/main/java/ch/cyberduck/ui/browser/DownloadDirectoryFinder.java @@ -26,10 +26,11 @@ import ch.cyberduck.core.preferences.Preferences; import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class DownloadDirectoryFinder implements DirectoryFinder { - private static final Logger log = Logger.getLogger(DownloadDirectoryFinder.class); + private static final Logger log = LogManager.getLogger(DownloadDirectoryFinder.class); private final AbstractHostCollection collection = BookmarkCollection.defaultCollection(); diff --git a/core/src/main/java/ch/cyberduck/ui/browser/RecursiveSearchFilter.java b/core/src/main/java/ch/cyberduck/ui/browser/RecursiveSearchFilter.java index 9e6456d1690..c153425c84f 100644 --- a/core/src/main/java/ch/cyberduck/ui/browser/RecursiveSearchFilter.java +++ b/core/src/main/java/ch/cyberduck/ui/browser/RecursiveSearchFilter.java @@ -20,10 +20,11 @@ import ch.cyberduck.core.Path; import ch.cyberduck.core.SimplePathPredicate; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class RecursiveSearchFilter extends NullFilter { - private static final Logger log = Logger.getLogger(RecursiveSearchFilter.class); + private static final Logger log = LogManager.getLogger(RecursiveSearchFilter.class); /** * List of accepted files diff --git a/core/src/main/java/ch/cyberduck/ui/browser/UploadDirectoryFinder.java b/core/src/main/java/ch/cyberduck/ui/browser/UploadDirectoryFinder.java index 38529455f36..22c0b5ed10d 100644 --- a/core/src/main/java/ch/cyberduck/ui/browser/UploadDirectoryFinder.java +++ b/core/src/main/java/ch/cyberduck/ui/browser/UploadDirectoryFinder.java @@ -26,10 +26,11 @@ import ch.cyberduck.core.preferences.Preferences; import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class UploadDirectoryFinder implements DirectoryFinder { - private static final Logger log = Logger.getLogger(UploadDirectoryFinder.class); + private static final Logger log = LogManager.getLogger(UploadDirectoryFinder.class); private final AbstractHostCollection collection = BookmarkCollection.defaultCollection(); diff --git a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/CryptoVault.java b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/CryptoVault.java index 0ae77df7374..69488576a9d 100644 --- a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/CryptoVault.java +++ b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/CryptoVault.java @@ -48,7 +48,8 @@ import ch.cyberduck.core.vault.VaultCredentials; import ch.cyberduck.core.vault.VaultException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.cryptomator.cryptolib.api.AuthenticationFailedException; import org.cryptomator.cryptolib.api.Cryptor; import org.cryptomator.cryptolib.api.CryptorProvider; @@ -78,7 +79,7 @@ * Cryptomator vault implementation */ public class CryptoVault implements Vault { - private static final Logger log = Logger.getLogger(CryptoVault.class); + private static final Logger log = LogManager.getLogger(CryptoVault.class); public static final int VAULT_VERSION_DEPRECATED = 6; public static final int VAULT_VERSION = PreferencesFactory.get().getInteger("cryptomator.vault.version"); diff --git a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoChecksumCompute.java b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoChecksumCompute.java index 4cd9b340f26..0a907c8d6eb 100644 --- a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoChecksumCompute.java +++ b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoChecksumCompute.java @@ -34,7 +34,8 @@ import ch.cyberduck.core.worker.DefaultExceptionMappingService; import org.apache.commons.io.input.NullInputStream; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.cryptomator.cryptolib.api.FileHeader; import java.io.IOException; @@ -47,7 +48,7 @@ import java.util.concurrent.Future; public class CryptoChecksumCompute extends AbstractChecksumCompute { - private static final Logger log = Logger.getLogger(CryptoChecksumCompute.class); + private static final Logger log = LogManager.getLogger(CryptoChecksumCompute.class); private final CryptoVault cryptomator; private final ChecksumCompute delegate; diff --git a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoDeleteV6Feature.java b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoDeleteV6Feature.java index 99fdfd7b36c..35c8f6f64bf 100644 --- a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoDeleteV6Feature.java +++ b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoDeleteV6Feature.java @@ -28,7 +28,8 @@ import ch.cyberduck.core.features.Find; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.Collections; @@ -36,7 +37,7 @@ import java.util.Map; public class CryptoDeleteV6Feature implements Delete { - private static final Logger log = Logger.getLogger(CryptoDeleteV6Feature.class); + private static final Logger log = LogManager.getLogger(CryptoDeleteV6Feature.class); private final Session session; private final Delete proxy; diff --git a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoDeleteV7Feature.java b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoDeleteV7Feature.java index 4901f6ce0b9..26aec541714 100644 --- a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoDeleteV7Feature.java +++ b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoDeleteV7Feature.java @@ -29,7 +29,8 @@ import ch.cyberduck.core.features.Find; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.Collections; @@ -38,7 +39,7 @@ import java.util.Map; public class CryptoDeleteV7Feature implements Delete { - private static final Logger log = Logger.getLogger(CryptoDeleteV7Feature.class); + private static final Logger log = LogManager.getLogger(CryptoDeleteV7Feature.class); private final Session session; private final Delete proxy; diff --git a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoDirectoryV6Feature.java b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoDirectoryV6Feature.java index 518ceb42e6c..df014f93196 100644 --- a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoDirectoryV6Feature.java +++ b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoDirectoryV6Feature.java @@ -28,13 +28,14 @@ import ch.cyberduck.core.features.Write; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.cryptomator.cryptolib.api.FileHeader; import java.nio.charset.StandardCharsets; public class CryptoDirectoryV6Feature implements Directory { - private static final Logger log = Logger.getLogger(CryptoDirectoryV6Feature.class); + private static final Logger log = LogManager.getLogger(CryptoDirectoryV6Feature.class); private final Session session; private final Write writer; diff --git a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoDirectoryV7Feature.java b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoDirectoryV7Feature.java index 6f46195ad26..2018ffa9fe0 100644 --- a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoDirectoryV7Feature.java +++ b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoDirectoryV7Feature.java @@ -29,14 +29,15 @@ import ch.cyberduck.core.features.Write; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.cryptomator.cryptolib.api.FileHeader; import java.nio.charset.StandardCharsets; import java.util.EnumSet; public class CryptoDirectoryV7Feature implements Directory { - private static final Logger log = Logger.getLogger(CryptoDirectoryV7Feature.class); + private static final Logger log = LogManager.getLogger(CryptoDirectoryV7Feature.class); private final Session session; private final Write writer; diff --git a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoListService.java b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoListService.java index 80ff17eec48..c58aa8bac59 100644 --- a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoListService.java +++ b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoListService.java @@ -25,10 +25,11 @@ import ch.cyberduck.core.features.Vault; import ch.cyberduck.core.vault.DecryptingListProgressListener; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class CryptoListService implements ListService { - private static final Logger log = Logger.getLogger(CryptoListService.class); + private static final Logger log = LogManager.getLogger(CryptoListService.class); private final Session session; private final ListService delegate; diff --git a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoUrlProvider.java b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoUrlProvider.java index fdd23a8003f..68b99a84861 100644 --- a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoUrlProvider.java +++ b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/features/CryptoUrlProvider.java @@ -27,13 +27,14 @@ import ch.cyberduck.core.features.Vault; import ch.cyberduck.core.vault.DecryptingListProgressListener; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.net.URI; import java.text.MessageFormat; public class CryptoUrlProvider implements UrlProvider { - private static final Logger log = Logger.getLogger(DecryptingListProgressListener.class); + private static final Logger log = LogManager.getLogger(DecryptingListProgressListener.class); private final Session session; private final UrlProvider delegate; diff --git a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/impl/CryptoDirectoryV6Provider.java b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/impl/CryptoDirectoryV6Provider.java index 721d50a6770..97c384fc099 100644 --- a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/impl/CryptoDirectoryV6Provider.java +++ b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/impl/CryptoDirectoryV6Provider.java @@ -32,7 +32,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.nio.charset.StandardCharsets; import java.util.EnumSet; @@ -40,7 +41,7 @@ import java.util.concurrent.locks.ReentrantLock; public class CryptoDirectoryV6Provider implements CryptoDirectory { - private static final Logger log = Logger.getLogger(CryptoDirectoryV6Provider.class); + private static final Logger log = LogManager.getLogger(CryptoDirectoryV6Provider.class); private static final String DATA_DIR_NAME = "d"; private static final String ROOT_DIR_ID = StringUtils.EMPTY; diff --git a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/impl/CryptoDirectoryV7Provider.java b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/impl/CryptoDirectoryV7Provider.java index a167c4d0f5d..b334421df6b 100644 --- a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/impl/CryptoDirectoryV7Provider.java +++ b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/impl/CryptoDirectoryV7Provider.java @@ -24,7 +24,8 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.exception.NotfoundException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.nio.charset.StandardCharsets; import java.util.EnumSet; @@ -32,7 +33,7 @@ import com.google.common.io.BaseEncoding; public class CryptoDirectoryV7Provider extends CryptoDirectoryV6Provider { - private static final Logger log = Logger.getLogger(CryptoDirectoryV7Provider.class); + private static final Logger log = LogManager.getLogger(CryptoDirectoryV7Provider.class); public static final String EXTENSION_REGULAR = ".c9r"; public static final String FILENAME_DIRECTORYID = "dir"; diff --git a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/impl/CryptoFilenameV6Provider.java b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/impl/CryptoFilenameV6Provider.java index a90adefd86e..90a4376f0c3 100644 --- a/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/impl/CryptoFilenameV6Provider.java +++ b/cryptomator/src/main/java/ch/cyberduck/core/cryptomator/impl/CryptoFilenameV6Provider.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.cryptomator.cryptolib.common.MessageDigestSupplier; import java.util.EnumSet; @@ -37,7 +38,7 @@ import static java.nio.charset.StandardCharsets.UTF_8; public class CryptoFilenameV6Provider implements CryptoFilename { - private static final Logger log = Logger.getLogger(CryptoFilenameV6Provider.class); + private static final Logger log = LogManager.getLogger(CryptoFilenameV6Provider.class); private static final BaseEncoding BASE32 = BaseEncoding.base32(); private static final String LONG_NAME_FILE_EXT = ".lng"; diff --git a/ctera/src/main/java/ch/cyberduck/core/ctera/CteraAuthenticationHandler.java b/ctera/src/main/java/ch/cyberduck/core/ctera/CteraAuthenticationHandler.java index d9fa1d7deda..7b26be15bdc 100644 --- a/ctera/src/main/java/ch/cyberduck/core/ctera/CteraAuthenticationHandler.java +++ b/ctera/src/main/java/ch/cyberduck/core/ctera/CteraAuthenticationHandler.java @@ -27,12 +27,13 @@ import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.AbstractResponseHandler; import org.apache.http.protocol.HttpContext; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; public class CteraAuthenticationHandler implements ServiceUnavailableRetryStrategy { - private static final Logger log = Logger.getLogger(CteraAuthenticationHandler.class); + private static final Logger log = LogManager.getLogger(CteraAuthenticationHandler.class); private static final String SAML_LOCATION = "https://myapps.microsoft.com/signin/CTERA/e8e5145e-4fac-412e-b87b-fbfc26123827"; private static final int MAX_RETRIES = 1; diff --git a/ctera/src/main/java/ch/cyberduck/core/ctera/CteraSession.java b/ctera/src/main/java/ch/cyberduck/core/ctera/CteraSession.java index 47117da4337..6afee75c7ed 100644 --- a/ctera/src/main/java/ch/cyberduck/core/ctera/CteraSession.java +++ b/ctera/src/main/java/ch/cyberduck/core/ctera/CteraSession.java @@ -58,7 +58,8 @@ import org.apache.http.impl.client.AbstractResponseHandler; import org.apache.http.impl.client.BasicResponseHandler; import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.net.InetAddress; @@ -75,7 +76,7 @@ import com.google.common.util.concurrent.Uninterruptibles; public class CteraSession extends DAVSession { - private static final Logger log = Logger.getLogger(CteraSession.class); + private static final Logger log = LogManager.getLogger(CteraSession.class); private final CteraAuthenticationHandler authentication = new CteraAuthenticationHandler(this); diff --git a/ctera/src/main/java/ch/cyberduck/core/ctera/auth/CteraTokens.java b/ctera/src/main/java/ch/cyberduck/core/ctera/auth/CteraTokens.java index a2b8fd58c7a..07ff55fa8c1 100644 --- a/ctera/src/main/java/ch/cyberduck/core/ctera/auth/CteraTokens.java +++ b/ctera/src/main/java/ch/cyberduck/core/ctera/auth/CteraTokens.java @@ -18,10 +18,11 @@ import ch.cyberduck.core.exception.BackgroundException; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class CteraTokens { - private static final Logger log = Logger.getLogger(CteraTokens.class); + private static final Logger log = LogManager.getLogger(CteraTokens.class); public static CteraTokens EMPTY = new CteraTokens(StringUtils.EMPTY, StringUtils.EMPTY); diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/MultipartUploadTokenOutputStream.java b/dracoon/src/main/java/ch/cyberduck/core/sds/MultipartUploadTokenOutputStream.java index 8319cec8205..cf1e5612d5c 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/MultipartUploadTokenOutputStream.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/MultipartUploadTokenOutputStream.java @@ -36,7 +36,8 @@ import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.BufferedHttpEntity; import org.apache.http.util.EntityUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.OutputStream; @@ -45,7 +46,7 @@ import java.util.concurrent.atomic.AtomicReference; public class MultipartUploadTokenOutputStream extends OutputStream { - private static final Logger log = Logger.getLogger(MultipartUploadTokenOutputStream.class); + private static final Logger log = LogManager.getLogger(MultipartUploadTokenOutputStream.class); private final SDSSession session; private final SDSNodeIdProvider nodeid; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/PresignedMultipartOutputStream.java b/dracoon/src/main/java/ch/cyberduck/core/sds/PresignedMultipartOutputStream.java index 4a011bce338..a49186ce112 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/PresignedMultipartOutputStream.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/PresignedMultipartOutputStream.java @@ -48,7 +48,8 @@ import org.apache.http.client.methods.HttpPut; import org.apache.http.entity.BufferedHttpEntity; import org.apache.http.util.EntityUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.OutputStream; @@ -73,7 +74,7 @@ import com.google.common.util.concurrent.Uninterruptibles; public class PresignedMultipartOutputStream extends OutputStream { - private static final Logger log = Logger.getLogger(PresignedMultipartOutputStream.class); + private static final Logger log = LogManager.getLogger(PresignedMultipartOutputStream.class); private final SDSSession session; private final SDSNodeIdProvider nodeid; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSAttributesFinderFeature.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSAttributesFinderFeature.java index 9a8ac2558d0..a0d5a588e66 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSAttributesFinderFeature.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSAttributesFinderFeature.java @@ -36,14 +36,15 @@ import ch.cyberduck.core.sds.io.swagger.client.model.Node; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.EnumSet; import java.util.HashMap; import java.util.Map; public class SDSAttributesFinderFeature implements AttributesFinder { - private static final Logger log = Logger.getLogger(SDSAttributesFinderFeature.class); + private static final Logger log = LogManager.getLogger(SDSAttributesFinderFeature.class); public static final String KEY_CNT_DOWNLOADSHARES = "count_downloadshares"; public static final String KEY_CNT_UPLOADSHARES = "count_uploadshares"; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSCopyFeature.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSCopyFeature.java index 43f8f992c40..82c476b7d45 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSCopyFeature.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSCopyFeature.java @@ -31,12 +31,13 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Objects; public class SDSCopyFeature implements Copy { - private static final Logger log = Logger.getLogger(SDSCopyFeature.class); + private static final Logger log = LogManager.getLogger(SDSCopyFeature.class); private final SDSSession session; private final SDSNodeIdProvider nodeid; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDelegatingMoveFeature.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDelegatingMoveFeature.java index 0d186178287..498b2939eca 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDelegatingMoveFeature.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDelegatingMoveFeature.java @@ -26,12 +26,13 @@ import ch.cyberduck.core.io.DisabledStreamListener; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; public class SDSDelegatingMoveFeature implements Move { - private static final Logger log = Logger.getLogger(SDSDelegatingMoveFeature.class); + private static final Logger log = LogManager.getLogger(SDSDelegatingMoveFeature.class); private final SDSSession session; private final SDSNodeIdProvider nodeid; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDelegatingWriteFeature.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDelegatingWriteFeature.java index 17ca0e3e6e4..c4a90e050ff 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDelegatingWriteFeature.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDelegatingWriteFeature.java @@ -26,10 +26,11 @@ import ch.cyberduck.core.sds.triplecrypt.TripleCryptWriteFeature; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class SDSDelegatingWriteFeature implements MultipartWrite { - private static final Logger log = Logger.getLogger(SDSDelegatingWriteFeature.class); + private static final Logger log = LogManager.getLogger(SDSDelegatingWriteFeature.class); private final SDSSession session; private final SDSNodeIdProvider nodeid; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDeleteFeature.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDeleteFeature.java index dbe15fee4f7..fbe938496f7 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDeleteFeature.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDeleteFeature.java @@ -27,12 +27,13 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Map; public class SDSDeleteFeature implements Delete { - private static final Logger log = Logger.getLogger(SDSDeleteFeature.class); + private static final Logger log = LogManager.getLogger(SDSDeleteFeature.class); private final SDSSession session; private final SDSNodeIdProvider nodeid; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDirectS3UploadFeature.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDirectS3UploadFeature.java index 919a25fb62f..76126f3427e 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDirectS3UploadFeature.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDirectS3UploadFeature.java @@ -56,7 +56,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.joda.time.DateTime; import java.io.IOException; @@ -84,7 +85,7 @@ import com.google.common.util.concurrent.Uninterruptibles; public class SDSDirectS3UploadFeature extends HttpUploadFeature { - private static final Logger log = Logger.getLogger(SDSDirectS3UploadFeature.class); + private static final Logger log = LogManager.getLogger(SDSDirectS3UploadFeature.class); /** * The maximum allowed parts in a multipart upload. diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDirectS3WriteFeature.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDirectS3WriteFeature.java index 6a7bb5fb5fa..b7811e2afe8 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDirectS3WriteFeature.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDirectS3WriteFeature.java @@ -37,12 +37,13 @@ import org.apache.http.entity.AbstractHttpEntity; import org.apache.http.entity.BufferedHttpEntity; import org.apache.http.util.EntityUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; public class SDSDirectS3WriteFeature extends AbstractHttpWriteFeature { - private static final Logger log = Logger.getLogger(SDSDirectS3WriteFeature.class); + private static final Logger log = LogManager.getLogger(SDSDirectS3WriteFeature.class); private final SDSSession session; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDirectoryFeature.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDirectoryFeature.java index b299df4bacc..69ae3d03523 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDirectoryFeature.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSDirectoryFeature.java @@ -30,12 +30,13 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.EnumSet; public class SDSDirectoryFeature implements Directory { - private static final Logger log = Logger.getLogger(SDSDirectoryFeature.class); + private static final Logger log = LogManager.getLogger(SDSDirectoryFeature.class); private final SDSSession session; private final SDSNodeIdProvider nodeid; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSEncryptionBulkFeature.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSEncryptionBulkFeature.java index 184f294ac73..a74d294ed3e 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSEncryptionBulkFeature.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSEncryptionBulkFeature.java @@ -26,13 +26,14 @@ import ch.cyberduck.core.transfer.TransferItem; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.HashMap; import java.util.Map; public class SDSEncryptionBulkFeature implements Bulk { - private static final Logger log = Logger.getLogger(SDSEncryptionBulkFeature.class); + private static final Logger log = LogManager.getLogger(SDSEncryptionBulkFeature.class); private final SDSSession session; private final SDSNodeIdProvider nodeid; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSErrorResponseInterceptor.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSErrorResponseInterceptor.java index 460b30f64d2..175ad957eb1 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSErrorResponseInterceptor.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSErrorResponseInterceptor.java @@ -30,13 +30,14 @@ import org.apache.http.entity.BufferedHttpEntity; import org.apache.http.protocol.HttpContext; import org.apache.http.util.EntityUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.Collections; public class SDSErrorResponseInterceptor extends DisabledServiceUnavailableRetryStrategy implements HttpRequestInterceptor { - private static final Logger log = Logger.getLogger(SDSErrorResponseInterceptor.class); + private static final Logger log = LogManager.getLogger(SDSErrorResponseInterceptor.class); private static final int MAX_RETRIES = 1; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSExceptionMappingService.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSExceptionMappingService.java index 93cd51865f9..d724d400854 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSExceptionMappingService.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSExceptionMappingService.java @@ -33,7 +33,8 @@ import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.http.HttpStatus; import org.apache.http.client.HttpResponseException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.StringReader; @@ -45,7 +46,7 @@ import com.google.gson.JsonPrimitive; public class SDSExceptionMappingService extends AbstractExceptionMappingService { - private static final Logger log = Logger.getLogger(SDSExceptionMappingService.class); + private static final Logger log = LogManager.getLogger(SDSExceptionMappingService.class); private final SDSNodeIdProvider fileid; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSListService.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSListService.java index 37949e60183..007ea1ac4bd 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSListService.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSListService.java @@ -31,12 +31,13 @@ import ch.cyberduck.core.sds.io.swagger.client.model.NodeList; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.EnumSet; public class SDSListService implements ListService { - private static final Logger log = Logger.getLogger(SDSListService.class); + private static final Logger log = LogManager.getLogger(SDSListService.class); private final SDSSession session; private final SDSNodeIdProvider nodeid; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSMissingFileKeysSchedulerFeature.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSMissingFileKeysSchedulerFeature.java index 4c5653bb596..6afefeb320e 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSMissingFileKeysSchedulerFeature.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSMissingFileKeysSchedulerFeature.java @@ -40,7 +40,8 @@ import ch.cyberduck.core.shared.AbstractSchedulerFeature; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.Collections; @@ -62,7 +63,7 @@ import static java.util.stream.Collectors.groupingBy; public class SDSMissingFileKeysSchedulerFeature extends AbstractSchedulerFeature, SDSApiClient> { - private static final Logger log = Logger.getLogger(SDSMissingFileKeysSchedulerFeature.class); + private static final Logger log = LogManager.getLogger(SDSMissingFileKeysSchedulerFeature.class); public SDSMissingFileKeysSchedulerFeature() { this(PreferencesFactory.get().getLong("sds.encryption.missingkeys.scheduler.period")); diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSMoveFeature.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSMoveFeature.java index 45d6ef3f687..b9e25af39f3 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSMoveFeature.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSMoveFeature.java @@ -37,14 +37,15 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; import java.util.regex.Matcher; import java.util.regex.Pattern; public class SDSMoveFeature implements Move { - private static final Logger log = Logger.getLogger(SDSMoveFeature.class); + private static final Logger log = LogManager.getLogger(SDSMoveFeature.class); private final SDSSession session; private final SDSNodeIdProvider nodeid; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSMultipartWriteFeature.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSMultipartWriteFeature.java index 922318d6a1f..116a6710b01 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSMultipartWriteFeature.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSMultipartWriteFeature.java @@ -29,14 +29,15 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; public class SDSMultipartWriteFeature implements MultipartWrite { - private static final Logger log = Logger.getLogger(SDSMultipartWriteFeature.class); + private static final Logger log = LogManager.getLogger(SDSMultipartWriteFeature.class); private final SDSSession session; private final SDSNodeIdProvider nodeid; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSNodeIdProvider.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSNodeIdProvider.java index 93f91e16442..17b307d10a6 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSNodeIdProvider.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSNodeIdProvider.java @@ -37,7 +37,8 @@ import ch.cyberduck.core.unicode.UnicodeNormalizer; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -48,7 +49,7 @@ import com.fasterxml.jackson.databind.ObjectWriter; public class SDSNodeIdProvider implements VersionIdProvider { - private static final Logger log = Logger.getLogger(SDSNodeIdProvider.class); + private static final Logger log = LogManager.getLogger(SDSNodeIdProvider.class); private static final UnicodeNormalizer normalizer = new NFCNormalizer(); private static final String ROOT_NODE_ID = "0"; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSPermissionsFeature.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSPermissionsFeature.java index 0b6c67bad9a..c42c724240a 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSPermissionsFeature.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSPermissionsFeature.java @@ -21,7 +21,8 @@ import ch.cyberduck.core.exception.UnsupportedException; import ch.cyberduck.core.shared.DefaultAclFeature; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Arrays; import java.util.Collections; @@ -30,7 +31,7 @@ public class SDSPermissionsFeature extends DefaultAclFeature { - private static final Logger log = Logger.getLogger(SDSPermissionsFeature.class); + private static final Logger log = LogManager.getLogger(SDSPermissionsFeature.class); // Node roles public static final Acl.Role MANAGE_ROLE = new Acl.Role("MANAGE_ROLE"); diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSQuotaFeature.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSQuotaFeature.java index b8a81fb9f6d..180f809c6e6 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSQuotaFeature.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSQuotaFeature.java @@ -25,12 +25,13 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.EnumSet; public class SDSQuotaFeature implements Quota { - private static final Logger log = Logger.getLogger(SDSQuotaFeature.class); + private static final Logger log = LogManager.getLogger(SDSQuotaFeature.class); private final SDSSession session; private final SDSNodeIdProvider nodeid; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSReadFeature.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSReadFeature.java index 91f486e2b60..d1dacbca134 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSReadFeature.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSReadFeature.java @@ -37,13 +37,14 @@ import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.message.BasicHeader; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; public class SDSReadFeature implements Read { - private static final Logger log = Logger.getLogger(SDSReadFeature.class); + private static final Logger log = LogManager.getLogger(SDSReadFeature.class); private final SDSSession session; private final SDSNodeIdProvider nodeid; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSSession.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSSession.java index 4d2103c5920..a4d695ef938 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSSession.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSSession.java @@ -64,7 +64,8 @@ import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.protocol.HttpContext; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.jackson.JacksonFeature; import org.glassfish.jersey.media.multipart.MultiPartFeature; @@ -96,7 +97,7 @@ import static ch.cyberduck.core.oauth.OAuth2AuthorizationService.CYBERDUCK_REDIRECT_URI; public class SDSSession extends HttpSession { - private static final Logger log = Logger.getLogger(SDSSession.class); + private static final Logger log = LogManager.getLogger(SDSSession.class); public static final String SDS_AUTH_TOKEN_HEADER = "X-Sds-Auth-Token"; public static final int DEFAULT_CHUNKSIZE = 16; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSSharesUrlProvider.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSSharesUrlProvider.java index fef6560d64f..91937ec440e 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSSharesUrlProvider.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSSharesUrlProvider.java @@ -42,7 +42,8 @@ import ch.cyberduck.core.sds.triplecrypt.TripleCryptKeyPair; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.net.URI; import java.text.MessageFormat; @@ -54,7 +55,7 @@ import com.dracoon.sdk.crypto.model.UserKeyPair; public class SDSSharesUrlProvider implements PromptUrlProvider { - private static final Logger log = Logger.getLogger(SDSSharesUrlProvider.class); + private static final Logger log = LogManager.getLogger(SDSSharesUrlProvider.class); private final PathContainerService containerService = new SDSPathContainerService(); diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSTouchFeature.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSTouchFeature.java index 5a2c41f15d4..113c158d282 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSTouchFeature.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSTouchFeature.java @@ -27,12 +27,13 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; public class SDSTouchFeature implements Touch { - private static final Logger log = Logger.getLogger(SDSTouchFeature.class); + private static final Logger log = LogManager.getLogger(SDSTouchFeature.class); private final SDSSession session; private final SDSNodeIdProvider nodeid; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSUploadService.java b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSUploadService.java index 544e43166c8..994a7a5c8ea 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/SDSUploadService.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/SDSUploadService.java @@ -38,7 +38,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.joda.time.DateTime; import java.io.IOException; @@ -55,7 +56,7 @@ import com.fasterxml.jackson.databind.ObjectReader; public class SDSUploadService { - private static final Logger log = Logger.getLogger(SDSUploadService.class); + private static final Logger log = LogManager.getLogger(SDSUploadService.class); private final SDSSession session; private final SDSNodeIdProvider nodeid; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/triplecrypt/TripleCryptKeyPair.java b/dracoon/src/main/java/ch/cyberduck/core/sds/triplecrypt/TripleCryptKeyPair.java index f5f9b2d06ce..4cc160b9cf3 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/triplecrypt/TripleCryptKeyPair.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/triplecrypt/TripleCryptKeyPair.java @@ -30,7 +30,8 @@ import ch.cyberduck.core.shared.DefaultUrlProvider; import ch.cyberduck.core.vault.VaultCredentials; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.EnumSet; @@ -39,7 +40,7 @@ import com.dracoon.sdk.crypto.model.UserKeyPair; public class TripleCryptKeyPair { - private static final Logger log = Logger.getLogger(TripleCryptKeyPair.class); + private static final Logger log = LogManager.getLogger(TripleCryptKeyPair.class); private final HostPasswordStore keychain = PasswordStoreFactory.get(); diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/triplecrypt/TripleCryptOutputStream.java b/dracoon/src/main/java/ch/cyberduck/core/sds/triplecrypt/TripleCryptOutputStream.java index 559cb1e9cb2..c863d34359c 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/triplecrypt/TripleCryptOutputStream.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/triplecrypt/TripleCryptOutputStream.java @@ -24,7 +24,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.io.output.ProxyOutputStream; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -42,7 +43,7 @@ import com.fasterxml.jackson.databind.ObjectWriter; public class TripleCryptOutputStream extends HttpResponseOutputStream { - private static final Logger log = Logger.getLogger(TripleCryptOutputStream.class); + private static final Logger log = LogManager.getLogger(TripleCryptOutputStream.class); private final StatusOutputStream proxy; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/triplecrypt/TripleCryptReadFeature.java b/dracoon/src/main/java/ch/cyberduck/core/sds/triplecrypt/TripleCryptReadFeature.java index b478ed803b8..edd800ffa0d 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/triplecrypt/TripleCryptReadFeature.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/triplecrypt/TripleCryptReadFeature.java @@ -34,7 +34,8 @@ import ch.cyberduck.core.sds.io.swagger.client.model.UserKeyPairContainer; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.InputStream; @@ -48,7 +49,7 @@ import com.dracoon.sdk.crypto.model.UserKeyPair; public class TripleCryptReadFeature implements Read { - private static final Logger log = Logger.getLogger(TripleCryptReadFeature.class); + private static final Logger log = LogManager.getLogger(TripleCryptReadFeature.class); private final SDSSession session; private final SDSNodeIdProvider nodeid; diff --git a/dracoon/src/main/java/ch/cyberduck/core/sds/triplecrypt/TripleCryptWriteFeature.java b/dracoon/src/main/java/ch/cyberduck/core/sds/triplecrypt/TripleCryptWriteFeature.java index f3ff24609ab..a7faab172f5 100644 --- a/dracoon/src/main/java/ch/cyberduck/core/sds/triplecrypt/TripleCryptWriteFeature.java +++ b/dracoon/src/main/java/ch/cyberduck/core/sds/triplecrypt/TripleCryptWriteFeature.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.sds.io.swagger.client.model.Node; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; @@ -37,7 +38,7 @@ import com.fasterxml.jackson.databind.ObjectReader; public class TripleCryptWriteFeature implements Write { - private static final Logger log = Logger.getLogger(TripleCryptWriteFeature.class); + private static final Logger log = LogManager.getLogger(TripleCryptWriteFeature.class); private final SDSSession session; private final SDSNodeIdProvider nodeid; diff --git a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxAttributesFinderFeature.java b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxAttributesFinderFeature.java index 03013fa3977..3fbd0d00ebb 100644 --- a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxAttributesFinderFeature.java +++ b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxAttributesFinderFeature.java @@ -23,7 +23,8 @@ import ch.cyberduck.core.features.AttributesFinder; import ch.cyberduck.core.io.Checksum; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import com.dropbox.core.DbxException; import com.dropbox.core.v2.files.DbxUserFilesRequests; @@ -34,7 +35,7 @@ import com.dropbox.core.v2.users.FullAccount; public class DropboxAttributesFinderFeature implements AttributesFinder { - private static final Logger log = Logger.getLogger(DropboxAttributesFinderFeature.class); + private static final Logger log = LogManager.getLogger(DropboxAttributesFinderFeature.class); private final DropboxSession session; private final PathContainerService containerService; diff --git a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxCommonsHttpRequestExecutor.java b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxCommonsHttpRequestExecutor.java index 9183dd331f1..90071771b34 100644 --- a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxCommonsHttpRequestExecutor.java +++ b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxCommonsHttpRequestExecutor.java @@ -28,7 +28,8 @@ import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.message.BasicHeader; import org.apache.http.protocol.HTTP; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.Closeable; import java.io.IOException; @@ -46,7 +47,7 @@ import com.google.common.util.concurrent.Uninterruptibles; public class DropboxCommonsHttpRequestExecutor extends HttpRequestor implements Closeable { - private static final Logger log = Logger.getLogger(DropboxCommonsHttpRequestExecutor.class); + private static final Logger log = LogManager.getLogger(DropboxCommonsHttpRequestExecutor.class); private final CloseableHttpClient client; diff --git a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxListService.java b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxListService.java index 0e983900b87..783e8a0aca8 100644 --- a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxListService.java +++ b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxListService.java @@ -25,7 +25,8 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.EnumSet; @@ -38,7 +39,7 @@ import com.dropbox.core.v2.files.Metadata; public class DropboxListService implements ListService { - private static final Logger log = Logger.getLogger(DropboxListService.class); + private static final Logger log = LogManager.getLogger(DropboxListService.class); private final DropboxSession session; private final DropboxAttributesFinderFeature attributes; diff --git a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxLockFeature.java b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxLockFeature.java index bc1c71742ca..d77b221fc25 100644 --- a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxLockFeature.java +++ b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxLockFeature.java @@ -25,7 +25,8 @@ import ch.cyberduck.core.exception.UnsupportedException; import ch.cyberduck.core.features.Lock; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; @@ -36,7 +37,7 @@ import com.dropbox.core.v2.files.UnlockFileArg; public class DropboxLockFeature implements Lock { - private static final Logger log = Logger.getLogger(DropboxSession.class); + private static final Logger log = LogManager.getLogger(DropboxSession.class); private final DropboxSession session; private final PathContainerService containerService; diff --git a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxPasswordShareUrlProvider.java b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxPasswordShareUrlProvider.java index 15418e29851..709c5f94690 100644 --- a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxPasswordShareUrlProvider.java +++ b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxPasswordShareUrlProvider.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.exception.LoginCanceledException; import ch.cyberduck.core.features.PromptUrlProvider; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.net.URI; import java.text.MessageFormat; @@ -40,7 +41,7 @@ import com.dropbox.core.v2.sharing.SharedLinkSettings; public class DropboxPasswordShareUrlProvider implements PromptUrlProvider { - private static final Logger log = Logger.getLogger(DropboxPasswordShareUrlProvider.class); + private static final Logger log = LogManager.getLogger(DropboxPasswordShareUrlProvider.class); private final DropboxSession session; private final PathContainerService containerService; diff --git a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxRootListService.java b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxRootListService.java index 6ae5a46d042..631997aba29 100644 --- a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxRootListService.java +++ b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxRootListService.java @@ -25,14 +25,15 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import com.dropbox.core.DbxException; import com.dropbox.core.v2.users.DbxUserUsersRequests; import com.dropbox.core.v2.users.FullAccount; public class DropboxRootListService implements ListService { - private static final Logger log = Logger.getLogger(DropboxRootListService.class); + private static final Logger log = LogManager.getLogger(DropboxRootListService.class); private final DropboxSession session; diff --git a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxSearchFeature.java b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxSearchFeature.java index 3d150b58794..88e7136027c 100644 --- a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxSearchFeature.java +++ b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxSearchFeature.java @@ -24,7 +24,8 @@ import ch.cyberduck.core.exception.ConnectionCanceledException; import ch.cyberduck.core.features.Search; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.EnumSet; import java.util.List; @@ -39,7 +40,7 @@ import com.dropbox.core.v2.files.SearchV2Result; public class DropboxSearchFeature implements Search { - private static final Logger log = Logger.getLogger(DropboxSearchFeature.class); + private static final Logger log = LogManager.getLogger(DropboxSearchFeature.class); private final DropboxSession session; private final DropboxAttributesFinderFeature attributes; diff --git a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxSession.java b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxSession.java index 0b4584c9360..bb9a08a4b3e 100644 --- a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxSession.java +++ b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxSession.java @@ -50,10 +50,10 @@ import ch.cyberduck.core.ssl.X509TrustManager; import ch.cyberduck.core.threading.CancelCallback; -import org.apache.commons.lang3.StringUtils; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; @@ -66,7 +66,7 @@ import com.dropbox.core.v2.users.FullAccount; public class DropboxSession extends HttpSession { - private static final Logger log = Logger.getLogger(DropboxSession.class); + private static final Logger log = LogManager.getLogger(DropboxSession.class); private final UseragentProvider useragent = new PreferencesUseragentProvider(); diff --git a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxSharedFoldersListService.java b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxSharedFoldersListService.java index f09b2dfe839..4076ffc600c 100644 --- a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxSharedFoldersListService.java +++ b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxSharedFoldersListService.java @@ -24,7 +24,8 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.exception.ConnectionCanceledException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.EnumSet; @@ -34,7 +35,7 @@ import com.dropbox.core.v2.sharing.SharedFolderMetadata; public class DropboxSharedFoldersListService implements ListService { - private static final Logger log = Logger.getLogger(DropboxSharedFoldersListService.class); + private static final Logger log = LogManager.getLogger(DropboxSharedFoldersListService.class); private final DropboxSession session; diff --git a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxTemporaryUrlProvider.java b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxTemporaryUrlProvider.java index 871c3832e37..579739a159b 100644 --- a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxTemporaryUrlProvider.java +++ b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxTemporaryUrlProvider.java @@ -24,7 +24,8 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.features.PromptUrlProvider; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.net.URI; import java.text.MessageFormat; @@ -36,7 +37,7 @@ import com.dropbox.core.v2.files.DbxUserFilesRequests; public class DropboxTemporaryUrlProvider implements PromptUrlProvider { - private static final Logger log = Logger.getLogger(DropboxTemporaryUrlProvider.class); + private static final Logger log = LogManager.getLogger(DropboxTemporaryUrlProvider.class); private final DropboxSession session; private final PathContainerService containerService; diff --git a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxUploadFeature.java b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxUploadFeature.java index 51b4cb55ede..6e11eb40798 100644 --- a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxUploadFeature.java +++ b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxUploadFeature.java @@ -22,7 +22,8 @@ import ch.cyberduck.core.io.Checksum; import ch.cyberduck.core.preferences.HostPreferences; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; @@ -33,7 +34,7 @@ import com.dropbox.core.v2.files.FileMetadata; public class DropboxUploadFeature extends HttpUploadFeature { - private static final Logger log = Logger.getLogger(DropboxUploadFeature.class); + private static final Logger log = LogManager.getLogger(DropboxUploadFeature.class); final DropboxSession session; diff --git a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxWriteFeature.java b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxWriteFeature.java index 3fdc52a65a5..50c1763a456 100644 --- a/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxWriteFeature.java +++ b/dropbox/src/main/java/ch/cyberduck/core/dropbox/DropboxWriteFeature.java @@ -26,7 +26,8 @@ import ch.cyberduck.core.preferences.HostPreferences; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.Date; @@ -42,7 +43,7 @@ import com.dropbox.core.v2.files.WriteMode; public class DropboxWriteFeature extends AbstractHttpWriteFeature { - private static final Logger log = Logger.getLogger(DropboxWriteFeature.class); + private static final Logger log = LogManager.getLogger(DropboxWriteFeature.class); private final DropboxSession session; private final Long chunksize; diff --git a/eue/src/main/java/ch/cyberduck/core/eue/EueAttributesFinderFeature.java b/eue/src/main/java/ch/cyberduck/core/eue/EueAttributesFinderFeature.java index 4e4ce9f8afe..a1855374764 100644 --- a/eue/src/main/java/ch/cyberduck/core/eue/EueAttributesFinderFeature.java +++ b/eue/src/main/java/ch/cyberduck/core/eue/EueAttributesFinderFeature.java @@ -32,12 +32,13 @@ import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpHeaders; import org.apache.http.HttpStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; public class EueAttributesFinderFeature implements AttributesFinder { - private static final Logger log = Logger.getLogger(EueAttributesFinderFeature.class); + private static final Logger log = LogManager.getLogger(EueAttributesFinderFeature.class); protected static final String OPTION_WIN_32_PROPS = "win32props"; protected static final String OPTION_SHARES = "shares"; diff --git a/eue/src/main/java/ch/cyberduck/core/eue/EueCopyFeature.java b/eue/src/main/java/ch/cyberduck/core/eue/EueCopyFeature.java index f42edc935c1..f7c9007dc95 100644 --- a/eue/src/main/java/ch/cyberduck/core/eue/EueCopyFeature.java +++ b/eue/src/main/java/ch/cyberduck/core/eue/EueCopyFeature.java @@ -34,12 +34,13 @@ import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; public class EueCopyFeature implements Copy { - private static final Logger log = Logger.getLogger(EueCopyFeature.class); + private static final Logger log = LogManager.getLogger(EueCopyFeature.class); private final EueSession session; private final EueResourceIdProvider fileid; diff --git a/eue/src/main/java/ch/cyberduck/core/eue/EueDeleteFeature.java b/eue/src/main/java/ch/cyberduck/core/eue/EueDeleteFeature.java index ec7fdff3667..288e55be46c 100644 --- a/eue/src/main/java/ch/cyberduck/core/eue/EueDeleteFeature.java +++ b/eue/src/main/java/ch/cyberduck/core/eue/EueDeleteFeature.java @@ -31,14 +31,15 @@ import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.List; import java.util.Map; public class EueDeleteFeature implements Delete { - private static final Logger log = Logger.getLogger(EueDeleteFeature.class); + private static final Logger log = LogManager.getLogger(EueDeleteFeature.class); private final EueSession session; private final EueResourceIdProvider fileid; diff --git a/eue/src/main/java/ch/cyberduck/core/eue/EueDirectoryFeature.java b/eue/src/main/java/ch/cyberduck/core/eue/EueDirectoryFeature.java index 8af99b61e77..aec051bc6ab 100644 --- a/eue/src/main/java/ch/cyberduck/core/eue/EueDirectoryFeature.java +++ b/eue/src/main/java/ch/cyberduck/core/eue/EueDirectoryFeature.java @@ -17,27 +17,28 @@ import ch.cyberduck.core.DisabledListProgressListener; import ch.cyberduck.core.Path; -import ch.cyberduck.core.exception.BackgroundException; -import ch.cyberduck.core.exception.NotfoundException; -import ch.cyberduck.core.features.Directory; -import ch.cyberduck.core.features.Write; import ch.cyberduck.core.eue.io.swagger.client.ApiException; import ch.cyberduck.core.eue.io.swagger.client.api.PostChildrenForAliasApi; import ch.cyberduck.core.eue.io.swagger.client.model.ResourceCreationRepresentationArrayInner; import ch.cyberduck.core.eue.io.swagger.client.model.ResourceCreationResponseEntries; import ch.cyberduck.core.eue.io.swagger.client.model.ResourceCreationResponseEntry; import ch.cyberduck.core.eue.io.swagger.client.model.ResourceCreationResponseEntryEntity; +import ch.cyberduck.core.exception.BackgroundException; +import ch.cyberduck.core.exception.NotfoundException; +import ch.cyberduck.core.features.Directory; +import ch.cyberduck.core.features.Write; import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; import java.util.EnumSet; public class EueDirectoryFeature implements Directory { - private static final Logger log = Logger.getLogger(EueDirectoryFeature.class); + private static final Logger log = LogManager.getLogger(EueDirectoryFeature.class); private final EueSession session; private final EueResourceIdProvider fileid; diff --git a/eue/src/main/java/ch/cyberduck/core/eue/EueExceptionMappingService.java b/eue/src/main/java/ch/cyberduck/core/eue/EueExceptionMappingService.java index b89ff3cde3c..4c083391d42 100644 --- a/eue/src/main/java/ch/cyberduck/core/eue/EueExceptionMappingService.java +++ b/eue/src/main/java/ch/cyberduck/core/eue/EueExceptionMappingService.java @@ -34,7 +34,8 @@ import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.apache.http.client.HttpResponseException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import javax.ws.rs.ProcessingException; import java.io.IOException; @@ -48,7 +49,7 @@ import java.util.stream.Collectors; public class EueExceptionMappingService extends AbstractExceptionMappingService { - private static final Logger log = Logger.getLogger(EueExceptionMappingService.class); + private static final Logger log = LogManager.getLogger(EueExceptionMappingService.class); @Override public BackgroundException map(final ApiException failure) { diff --git a/eue/src/main/java/ch/cyberduck/core/eue/EueLargeUploadService.java b/eue/src/main/java/ch/cyberduck/core/eue/EueLargeUploadService.java index f953dc4e140..423f7d74732 100644 --- a/eue/src/main/java/ch/cyberduck/core/eue/EueLargeUploadService.java +++ b/eue/src/main/java/ch/cyberduck/core/eue/EueLargeUploadService.java @@ -41,7 +41,8 @@ import org.apache.commons.codec.DecoderException; import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Hex; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; @@ -55,7 +56,7 @@ import java.util.concurrent.atomic.AtomicLong; public class EueLargeUploadService extends HttpUploadFeature { - private static final Logger log = Logger.getLogger(EueLargeUploadService.class); + private static final Logger log = LogManager.getLogger(EueLargeUploadService.class); public static final String RESOURCE_ID = "resourceId"; diff --git a/eue/src/main/java/ch/cyberduck/core/eue/EueMoveFeature.java b/eue/src/main/java/ch/cyberduck/core/eue/EueMoveFeature.java index fb380a05059..5355f10021a 100644 --- a/eue/src/main/java/ch/cyberduck/core/eue/EueMoveFeature.java +++ b/eue/src/main/java/ch/cyberduck/core/eue/EueMoveFeature.java @@ -35,12 +35,13 @@ import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; public class EueMoveFeature implements Move { - private static final Logger log = Logger.getLogger(EueMoveFeature.class); + private static final Logger log = LogManager.getLogger(EueMoveFeature.class); private final EueSession session; private final EueResourceIdProvider fileid; diff --git a/eue/src/main/java/ch/cyberduck/core/eue/EueMultipartWriteFeature.java b/eue/src/main/java/ch/cyberduck/core/eue/EueMultipartWriteFeature.java index c9925849ba3..449532bf17f 100644 --- a/eue/src/main/java/ch/cyberduck/core/eue/EueMultipartWriteFeature.java +++ b/eue/src/main/java/ch/cyberduck/core/eue/EueMultipartWriteFeature.java @@ -43,7 +43,8 @@ import org.apache.http.client.methods.HttpPut; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.util.EntityUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -56,7 +57,7 @@ import java.util.concurrent.atomic.AtomicReference; public class EueMultipartWriteFeature implements MultipartWrite { - private static final Logger log = Logger.getLogger(EueMultipartWriteFeature.class); + private static final Logger log = LogManager.getLogger(EueMultipartWriteFeature.class); private final EueSession session; private final EueResourceIdProvider fileid; diff --git a/eue/src/main/java/ch/cyberduck/core/eue/EueQuotaFeature.java b/eue/src/main/java/ch/cyberduck/core/eue/EueQuotaFeature.java index ba12f6236b0..8d04cc1d170 100644 --- a/eue/src/main/java/ch/cyberduck/core/eue/EueQuotaFeature.java +++ b/eue/src/main/java/ch/cyberduck/core/eue/EueQuotaFeature.java @@ -15,17 +15,18 @@ * GNU General Public License for more details. */ -import ch.cyberduck.core.exception.BackgroundException; -import ch.cyberduck.core.features.Quota; import ch.cyberduck.core.eue.io.swagger.client.ApiException; import ch.cyberduck.core.eue.io.swagger.client.api.UserInfoApi; import ch.cyberduck.core.eue.io.swagger.client.model.UserInfoResponseModel; +import ch.cyberduck.core.exception.BackgroundException; +import ch.cyberduck.core.features.Quota; import ch.cyberduck.core.shared.DefaultHomeFinderService; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class EueQuotaFeature implements Quota { - private static final Logger log = Logger.getLogger(EueQuotaFeature.class); + private static final Logger log = LogManager.getLogger(EueQuotaFeature.class); private final EueSession session; diff --git a/eue/src/main/java/ch/cyberduck/core/eue/EueReadFeature.java b/eue/src/main/java/ch/cyberduck/core/eue/EueReadFeature.java index 4f566706253..395608a9f33 100644 --- a/eue/src/main/java/ch/cyberduck/core/eue/EueReadFeature.java +++ b/eue/src/main/java/ch/cyberduck/core/eue/EueReadFeature.java @@ -36,14 +36,15 @@ import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.message.BasicHeader; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; import java.util.Collections; public class EueReadFeature implements Read { - private static final Logger log = Logger.getLogger(EueReadFeature.class); + private static final Logger log = LogManager.getLogger(EueReadFeature.class); private final EueSession session; private final EueResourceIdProvider fileid; diff --git a/eue/src/main/java/ch/cyberduck/core/eue/EueResourceIdProvider.java b/eue/src/main/java/ch/cyberduck/core/eue/EueResourceIdProvider.java index 68b1b42f695..1408a344141 100644 --- a/eue/src/main/java/ch/cyberduck/core/eue/EueResourceIdProvider.java +++ b/eue/src/main/java/ch/cyberduck/core/eue/EueResourceIdProvider.java @@ -31,14 +31,15 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class EueResourceIdProvider implements FileIdProvider { public static final String ROOT = "ROOT"; public static final String TRASH = "TRASH"; - private static final Logger log = Logger.getLogger(EueResourceIdProvider.class); + private static final Logger log = LogManager.getLogger(EueResourceIdProvider.class); private final EueSession session; private final LRUCache cache = LRUCache.build(PreferencesFactory.get().getLong("fileid.cache.size")); diff --git a/eue/src/main/java/ch/cyberduck/core/eue/EueSession.java b/eue/src/main/java/ch/cyberduck/core/eue/EueSession.java index 07215bcdc4c..61fcadebeea 100644 --- a/eue/src/main/java/ch/cyberduck/core/eue/EueSession.java +++ b/eue/src/main/java/ch/cyberduck/core/eue/EueSession.java @@ -76,7 +76,8 @@ import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.message.BasicHeader; import org.apache.http.protocol.HttpContext; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStreamReader; @@ -93,7 +94,7 @@ import com.migcomponents.migbase64.Base64; public class EueSession extends HttpSession { - private static final Logger log = Logger.getLogger(EueSession.class); + private static final Logger log = LogManager.getLogger(EueSession.class); private OAuth2RequestInterceptor authorizationService; diff --git a/eue/src/main/java/ch/cyberduck/core/eue/EueShareFeature.java b/eue/src/main/java/ch/cyberduck/core/eue/EueShareFeature.java index 188583c9187..8b6afa49a91 100644 --- a/eue/src/main/java/ch/cyberduck/core/eue/EueShareFeature.java +++ b/eue/src/main/java/ch/cyberduck/core/eue/EueShareFeature.java @@ -43,12 +43,13 @@ import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; public class EueShareFeature implements PromptUrlProvider { - private static final Logger log = Logger.getLogger(EueShareFeature.class); + private static final Logger log = LogManager.getLogger(EueShareFeature.class); private static final String GUEST_E_MAIL = "!ano"; diff --git a/eue/src/main/java/ch/cyberduck/core/eue/EueShareUrlProvider.java b/eue/src/main/java/ch/cyberduck/core/eue/EueShareUrlProvider.java index 2fe060ebdbc..61034f0030c 100644 --- a/eue/src/main/java/ch/cyberduck/core/eue/EueShareUrlProvider.java +++ b/eue/src/main/java/ch/cyberduck/core/eue/EueShareUrlProvider.java @@ -21,13 +21,14 @@ import ch.cyberduck.core.eue.io.swagger.client.model.ShareCreationResponseEntity; import ch.cyberduck.core.eue.io.swagger.client.model.UserSharesModel; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.net.URI; import java.util.Collections; public class EueShareUrlProvider implements UrlProvider { - private static final Logger log = Logger.getLogger(EueShareUrlProvider.class); + private static final Logger log = LogManager.getLogger(EueShareUrlProvider.class); private final Host host; private final UserSharesModel shares; diff --git a/eue/src/main/java/ch/cyberduck/core/eue/EueUploadHelper.java b/eue/src/main/java/ch/cyberduck/core/eue/EueUploadHelper.java index 51fb745b895..d8e868c8e15 100644 --- a/eue/src/main/java/ch/cyberduck/core/eue/EueUploadHelper.java +++ b/eue/src/main/java/ch/cyberduck/core/eue/EueUploadHelper.java @@ -15,8 +15,6 @@ * GNU General Public License for more details. */ -import ch.cyberduck.core.exception.BackgroundException; -import ch.cyberduck.core.exception.NotfoundException; import ch.cyberduck.core.eue.io.swagger.client.ApiException; import ch.cyberduck.core.eue.io.swagger.client.JSON; import ch.cyberduck.core.eue.io.swagger.client.api.PostChildrenApi; @@ -30,11 +28,14 @@ import ch.cyberduck.core.eue.io.swagger.client.model.UiFsModel; import ch.cyberduck.core.eue.io.swagger.client.model.Uifs; import ch.cyberduck.core.eue.io.swagger.client.model.UploadType; +import ch.cyberduck.core.exception.BackgroundException; +import ch.cyberduck.core.exception.NotfoundException; import ch.cyberduck.core.transfer.TransferStatus; import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStreamReader; @@ -44,7 +45,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; public final class EueUploadHelper { - private static final Logger log = Logger.getLogger(EueUploadHelper.class); + private static final Logger log = LogManager.getLogger(EueUploadHelper.class); private static final String refId = "X-UI-CDOS-RefId"; private static final String storeId = "X-UI-CDOS-StoreId"; diff --git a/eue/src/main/java/ch/cyberduck/core/eue/EueWriteFeature.java b/eue/src/main/java/ch/cyberduck/core/eue/EueWriteFeature.java index f747056eba3..653a281e4cc 100644 --- a/eue/src/main/java/ch/cyberduck/core/eue/EueWriteFeature.java +++ b/eue/src/main/java/ch/cyberduck/core/eue/EueWriteFeature.java @@ -48,12 +48,13 @@ import org.apache.http.entity.AbstractHttpEntity; import org.apache.http.entity.BufferedHttpEntity; import org.apache.http.util.EntityUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; public class EueWriteFeature extends AbstractHttpWriteFeature { - private static final Logger log = Logger.getLogger(EueWriteFeature.class); + private static final Logger log = LogManager.getLogger(EueWriteFeature.class); private final EueSession session; private final EueResourceIdProvider fileid; diff --git a/freenet/src/main/java/ch/cyberduck/core/freenet/FreenetAuthenticatedUrlProvider.java b/freenet/src/main/java/ch/cyberduck/core/freenet/FreenetAuthenticatedUrlProvider.java index 334b136b1f5..53e664b93f7 100644 --- a/freenet/src/main/java/ch/cyberduck/core/freenet/FreenetAuthenticatedUrlProvider.java +++ b/freenet/src/main/java/ch/cyberduck/core/freenet/FreenetAuthenticatedUrlProvider.java @@ -43,7 +43,8 @@ import org.apache.http.client.methods.HttpGet; import org.apache.http.impl.client.AbstractResponseHandler; import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.net.URI; @@ -57,7 +58,7 @@ import com.google.api.client.json.gson.GsonFactory; public class FreenetAuthenticatedUrlProvider implements WebUrlProvider { - private static final Logger log = Logger.getLogger(FreenetAuthenticatedUrlProvider.class); + private static final Logger log = LogManager.getLogger(FreenetAuthenticatedUrlProvider.class); @Override public DescriptiveUrl toUrl(final Host bookmark) { diff --git a/freenet/src/main/java/ch/cyberduck/core/freenet/FreenetSession.java b/freenet/src/main/java/ch/cyberduck/core/freenet/FreenetSession.java index 3e14a0dccf7..ff6c40d6826 100644 --- a/freenet/src/main/java/ch/cyberduck/core/freenet/FreenetSession.java +++ b/freenet/src/main/java/ch/cyberduck/core/freenet/FreenetSession.java @@ -31,10 +31,11 @@ import ch.cyberduck.core.threading.CancelCallback; import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class FreenetSession extends DAVSession { - private static final Logger log = Logger.getLogger(FreenetSession.class); + private static final Logger log = LogManager.getLogger(FreenetSession.class); public FreenetSession(final Host host, final X509TrustManager trust, final X509KeyManager key) { super(host, trust, key); diff --git a/ftp/src/main/java/ch/cyberduck/core/ftp/DataConnectionActionExecutor.java b/ftp/src/main/java/ch/cyberduck/core/ftp/DataConnectionActionExecutor.java index cc3e6e434a7..a7f385a978c 100644 --- a/ftp/src/main/java/ch/cyberduck/core/ftp/DataConnectionActionExecutor.java +++ b/ftp/src/main/java/ch/cyberduck/core/ftp/DataConnectionActionExecutor.java @@ -25,12 +25,13 @@ import ch.cyberduck.core.exception.NotfoundException; import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; public class DataConnectionActionExecutor { - private static final Logger log = Logger.getLogger(DataConnectionActionExecutor.class); + private static final Logger log = LogManager.getLogger(DataConnectionActionExecutor.class); private final FTPSession session; private final boolean enabled; diff --git a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPAttributesFinderFeature.java b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPAttributesFinderFeature.java index 78b3814d687..1a27337981f 100644 --- a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPAttributesFinderFeature.java +++ b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPAttributesFinderFeature.java @@ -33,13 +33,14 @@ import org.apache.commons.net.ftp.FTPCmd; import org.apache.commons.net.ftp.FTPReply; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.Arrays; public class FTPAttributesFinderFeature implements AttributesFinder { - private static final Logger log = Logger.getLogger(FTPAttributesFinderFeature.class); + private static final Logger log = LogManager.getLogger(FTPAttributesFinderFeature.class); private final FTPSession session; diff --git a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPClient.java b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPClient.java index fb23d275b0e..2bad32b699a 100644 --- a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPClient.java +++ b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPClient.java @@ -27,7 +27,8 @@ import org.apache.commons.net.ftp.FTPCmd; import org.apache.commons.net.ftp.FTPReply; import org.apache.commons.net.ftp.FTPSClient; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSession; @@ -53,7 +54,7 @@ import java.util.Set; public class FTPClient extends FTPSClient { - private static final Logger log = Logger.getLogger(FTPClient.class); + private static final Logger log = LogManager.getLogger(FTPClient.class); private final SSLSocketFactory sslSocketFactory; diff --git a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPCommandFeature.java b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPCommandFeature.java index 66f14fedb6a..2d0966050fd 100644 --- a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPCommandFeature.java +++ b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPCommandFeature.java @@ -23,12 +23,13 @@ import ch.cyberduck.core.features.Command; import org.apache.commons.net.ProtocolCommandListener; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; public class FTPCommandFeature implements Command { - private static final Logger log = Logger.getLogger(FTPCommandFeature.class); + private static final Logger log = LogManager.getLogger(FTPCommandFeature.class); private final FTPSession session; diff --git a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPMFMTTimestampFeature.java b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPMFMTTimestampFeature.java index 5bb45479854..c7eef4f8cbd 100644 --- a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPMFMTTimestampFeature.java +++ b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPMFMTTimestampFeature.java @@ -22,13 +22,14 @@ import ch.cyberduck.core.shared.DefaultTimestampFeature; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.TimeZone; public class FTPMFMTTimestampFeature extends DefaultTimestampFeature implements Timestamp { - private static final Logger log = Logger.getLogger(FTPMFMTTimestampFeature.class); + private static final Logger log = LogManager.getLogger(FTPMFMTTimestampFeature.class); private final FTPSession session; diff --git a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPParserSelector.java b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPParserSelector.java index 36c4f5f45bf..a915c478a05 100644 --- a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPParserSelector.java +++ b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPParserSelector.java @@ -20,12 +20,13 @@ import ch.cyberduck.core.ftp.parser.CompositeFileEntryParser; import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.TimeZone; public class FTPParserSelector { - private static final Logger log = Logger.getLogger(FTPParserSelector.class); + private static final Logger log = LogManager.getLogger(FTPParserSelector.class); public CompositeFileEntryParser getParser(final String system) { return this.getParser(system, null); @@ -47,4 +48,4 @@ public CompositeFileEntryParser getParser(final String system, final TimeZone zo parser.configure(null); return parser; } -} \ No newline at end of file +} diff --git a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPReadFeature.java b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPReadFeature.java index 2d5c07e8ee3..bbf71e6f155 100644 --- a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPReadFeature.java +++ b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPReadFeature.java @@ -27,14 +27,15 @@ import org.apache.commons.io.input.ProxyInputStream; import org.apache.commons.net.ftp.FTP; import org.apache.commons.net.ftp.FTPReply; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; import java.util.concurrent.atomic.AtomicBoolean; public class FTPReadFeature implements Read { - private static final Logger log = Logger.getLogger(FTPReadFeature.class); + private static final Logger log = LogManager.getLogger(FTPReadFeature.class); private final FTPSession session; diff --git a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPSession.java b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPSession.java index 0b9ba85f57a..d8353eb557e 100644 --- a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPSession.java +++ b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPSession.java @@ -64,7 +64,8 @@ import org.apache.commons.net.ftp.FTPClientConfig; import org.apache.commons.net.ftp.FTPCmd; import org.apache.commons.net.ftp.FTPReply; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.nio.charset.StandardCharsets; @@ -73,7 +74,7 @@ import java.util.TimeZone; public class FTPSession extends SSLSession { - private static final Logger log = Logger.getLogger(FTPSession.class); + private static final Logger log = LogManager.getLogger(FTPSession.class); private final PreferencesReader preferences = new HostPreferences(host, PreferencesFactory.get()); diff --git a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPUTIMETimestampFeature.java b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPUTIMETimestampFeature.java index e489631e16b..c7f54fcebf2 100644 --- a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPUTIMETimestampFeature.java +++ b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPUTIMETimestampFeature.java @@ -24,14 +24,15 @@ import ch.cyberduck.core.shared.DefaultTimestampFeature; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.Date; import java.util.TimeZone; public class FTPUTIMETimestampFeature extends DefaultTimestampFeature implements Timestamp { - private static final Logger log = Logger.getLogger(FTPUTIMETimestampFeature.class); + private static final Logger log = LogManager.getLogger(FTPUTIMETimestampFeature.class); private final FTPSession session; diff --git a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPUnixPermissionFeature.java b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPUnixPermissionFeature.java index 4d75c5c132a..60543ccf87c 100644 --- a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPUnixPermissionFeature.java +++ b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPUnixPermissionFeature.java @@ -23,12 +23,13 @@ import ch.cyberduck.core.features.UnixPermission; import ch.cyberduck.core.shared.DefaultUnixPermissionFeature; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; public class FTPUnixPermissionFeature extends DefaultUnixPermissionFeature implements UnixPermission { - private static final Logger log = Logger.getLogger(FTPUnixPermissionFeature.class); + private static final Logger log = LogManager.getLogger(FTPUnixPermissionFeature.class); private final FTPSession session; diff --git a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPWriteFeature.java b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPWriteFeature.java index f571bcbe905..3dd39ab52e8 100644 --- a/ftp/src/main/java/ch/cyberduck/core/ftp/FTPWriteFeature.java +++ b/ftp/src/main/java/ch/cyberduck/core/ftp/FTPWriteFeature.java @@ -26,14 +26,15 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.net.ftp.FTPReply; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.OutputStream; import java.util.concurrent.atomic.AtomicBoolean; public class FTPWriteFeature extends AppendWriteFeature { - private static final Logger log = Logger.getLogger(FTPWriteFeature.class); + private static final Logger log = LogManager.getLogger(FTPWriteFeature.class); private final FTPSession session; diff --git a/ftp/src/main/java/ch/cyberduck/core/ftp/list/FTPListResponseReader.java b/ftp/src/main/java/ch/cyberduck/core/ftp/list/FTPListResponseReader.java index ecda68e2da6..892ae7c2576 100644 --- a/ftp/src/main/java/ch/cyberduck/core/ftp/list/FTPListResponseReader.java +++ b/ftp/src/main/java/ch/cyberduck/core/ftp/list/FTPListResponseReader.java @@ -26,14 +26,15 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.net.ftp.FTPFile; import org.apache.commons.net.ftp.FTPFileEntryParser; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Calendar; import java.util.EnumSet; import java.util.List; public class FTPListResponseReader implements FTPDataResponseReader { - private static final Logger log = Logger.getLogger(FTPListResponseReader.class); + private static final Logger log = LogManager.getLogger(FTPListResponseReader.class); private final FTPFileEntryParser parser; private final boolean lenient; diff --git a/ftp/src/main/java/ch/cyberduck/core/ftp/list/FTPListService.java b/ftp/src/main/java/ch/cyberduck/core/ftp/list/FTPListService.java index 5d0d96c0b0d..3ea5a7ee582 100644 --- a/ftp/src/main/java/ch/cyberduck/core/ftp/list/FTPListService.java +++ b/ftp/src/main/java/ch/cyberduck/core/ftp/list/FTPListService.java @@ -33,7 +33,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.net.ftp.FTPClientConfig; import org.apache.commons.net.ftp.FTPCmd; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.ArrayList; @@ -47,7 +48,7 @@ import java.util.TimeZone; public class FTPListService implements ListService { - private static final Logger log = Logger.getLogger(FTPListService.class); + private static final Logger log = LogManager.getLogger(FTPListService.class); private final FTPSession session; diff --git a/ftp/src/main/java/ch/cyberduck/core/ftp/list/FTPMlsdListResponseReader.java b/ftp/src/main/java/ch/cyberduck/core/ftp/list/FTPMlsdListResponseReader.java index de15efc51da..c092b7ad4a2 100644 --- a/ftp/src/main/java/ch/cyberduck/core/ftp/list/FTPMlsdListResponseReader.java +++ b/ftp/src/main/java/ch/cyberduck/core/ftp/list/FTPMlsdListResponseReader.java @@ -26,7 +26,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Date; import java.util.EnumSet; @@ -38,7 +39,7 @@ import java.util.regex.Pattern; public class FTPMlsdListResponseReader implements FTPDataResponseReader { - private static final Logger log = Logger.getLogger(FTPMlsdListResponseReader.class); + private static final Logger log = LogManager.getLogger(FTPMlsdListResponseReader.class); public FTPMlsdListResponseReader() { // diff --git a/ftp/src/main/java/ch/cyberduck/core/ftp/list/FTPStatListService.java b/ftp/src/main/java/ch/cyberduck/core/ftp/list/FTPStatListService.java index 25972f028c1..241e653535e 100644 --- a/ftp/src/main/java/ch/cyberduck/core/ftp/list/FTPStatListService.java +++ b/ftp/src/main/java/ch/cyberduck/core/ftp/list/FTPStatListService.java @@ -16,7 +16,6 @@ */ import ch.cyberduck.core.AttributedList; -import ch.cyberduck.core.Cache; import ch.cyberduck.core.ListProgressListener; import ch.cyberduck.core.ListService; import ch.cyberduck.core.Path; @@ -28,14 +27,15 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.net.ftp.FTPFileEntryParser; import org.apache.commons.net.ftp.FTPReply; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.ArrayList; import java.util.List; public class FTPStatListService implements ListService { - private static final Logger log = Logger.getLogger(FTPListService.class); + private static final Logger log = LogManager.getLogger(FTPListService.class); private final FTPSession session; private final FTPDataResponseReader reader; diff --git a/ftp/src/main/java/ch/cyberduck/core/ftp/parser/CommonUnixFTPEntryParser.java b/ftp/src/main/java/ch/cyberduck/core/ftp/parser/CommonUnixFTPEntryParser.java index e9a1dc7f57b..f98a2085367 100644 --- a/ftp/src/main/java/ch/cyberduck/core/ftp/parser/CommonUnixFTPEntryParser.java +++ b/ftp/src/main/java/ch/cyberduck/core/ftp/parser/CommonUnixFTPEntryParser.java @@ -22,12 +22,13 @@ import org.apache.commons.net.ftp.FTPFile; import org.apache.commons.net.ftp.parser.ConfigurableFTPFileEntryParserImpl; import org.apache.commons.net.ftp.parser.FTPTimestampParser; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.ParseException; public abstract class CommonUnixFTPEntryParser extends ConfigurableFTPFileEntryParserImpl { - private static final Logger log = Logger.getLogger(CommonUnixFTPEntryParser.class); + private static final Logger log = LogManager.getLogger(CommonUnixFTPEntryParser.class); /** * @param regex Line regular expression diff --git a/ftp/src/main/java/ch/cyberduck/core/ftp/parser/CompositeFileEntryParser.java b/ftp/src/main/java/ch/cyberduck/core/ftp/parser/CompositeFileEntryParser.java index ab149e00c5e..1e7c248c485 100644 --- a/ftp/src/main/java/ch/cyberduck/core/ftp/parser/CompositeFileEntryParser.java +++ b/ftp/src/main/java/ch/cyberduck/core/ftp/parser/CompositeFileEntryParser.java @@ -5,7 +5,8 @@ import org.apache.commons.net.ftp.FTPFile; import org.apache.commons.net.ftp.FTPFileEntryParser; import org.apache.commons.net.ftp.FTPFileEntryParserImpl; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.List; @@ -19,7 +20,7 @@ * @author Mario Ivankovits */ public class CompositeFileEntryParser extends FTPFileEntryParserImpl implements Configurable { - private static final Logger log = Logger.getLogger(CompositeFileEntryParser.class); + private static final Logger log = LogManager.getLogger(CompositeFileEntryParser.class); private final List parsers; private FTPFileEntryParser current; @@ -77,4 +78,4 @@ public void configure(final FTPClientConfig config) { } } } -} \ No newline at end of file +} diff --git a/googledrive/src/main/java/ch/cyberduck/core/googledrive/AbstractDriveListService.java b/googledrive/src/main/java/ch/cyberduck/core/googledrive/AbstractDriveListService.java index c1a65872c8d..3e5a42a115e 100644 --- a/googledrive/src/main/java/ch/cyberduck/core/googledrive/AbstractDriveListService.java +++ b/googledrive/src/main/java/ch/cyberduck/core/googledrive/AbstractDriveListService.java @@ -26,7 +26,8 @@ import ch.cyberduck.core.webloc.UrlFileWriterFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.Collections; @@ -37,7 +38,7 @@ import com.google.api.services.drive.model.FileList; public abstract class AbstractDriveListService implements ListService { - private static final Logger log = Logger.getLogger(AbstractDriveListService.class); + private static final Logger log = LogManager.getLogger(AbstractDriveListService.class); protected static final String GOOGLE_APPS_PREFIX = "application/vnd.google-apps"; protected static final String DRIVE_FOLDER = String.format("%s.folder", GOOGLE_APPS_PREFIX); diff --git a/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveAttributesFinderFeature.java b/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveAttributesFinderFeature.java index ab6d340b965..7f05091df06 100644 --- a/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveAttributesFinderFeature.java +++ b/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveAttributesFinderFeature.java @@ -31,7 +31,8 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.net.URI; @@ -43,7 +44,7 @@ import static ch.cyberduck.core.googledrive.AbstractDriveListService.*; public class DriveAttributesFinderFeature implements AttributesFinder { - private static final Logger log = Logger.getLogger(DriveAttributesFinderFeature.class); + private static final Logger log = LogManager.getLogger(DriveAttributesFinderFeature.class); protected static final String DEFAULT_FIELDS = "createdTime,explicitlyTrashed,id,md5Checksum,mimeType,modifiedTime,name,size,webViewLink,shortcutDetails,version"; diff --git a/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveBatchDeleteFeature.java b/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveBatchDeleteFeature.java index 23d3618464d..79e19d0cdaf 100644 --- a/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveBatchDeleteFeature.java +++ b/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveBatchDeleteFeature.java @@ -25,7 +25,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.http.client.HttpResponseException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.ArrayList; @@ -39,7 +40,7 @@ import com.google.api.services.drive.model.File; public class DriveBatchDeleteFeature implements Delete { - private static final Logger log = Logger.getLogger(DriveBatchDeleteFeature.class); + private static final Logger log = LogManager.getLogger(DriveBatchDeleteFeature.class); private final DriveSession session; private final DriveFileIdProvider fileid; diff --git a/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveFileIdProvider.java b/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveFileIdProvider.java index e766856e43a..febc0d38001 100644 --- a/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveFileIdProvider.java +++ b/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveFileIdProvider.java @@ -28,12 +28,13 @@ import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Comparator; public class DriveFileIdProvider implements FileIdProvider { - private static final Logger log = Logger.getLogger(DriveFileIdProvider.class); + private static final Logger log = LogManager.getLogger(DriveFileIdProvider.class); private final DriveSession session; private final LRUCache cache = LRUCache.build(PreferencesFactory.get().getLong("fileid.cache.size")); diff --git a/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveReadFeature.java b/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveReadFeature.java index 633f9e7b95f..74a5c3cdb17 100644 --- a/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveReadFeature.java +++ b/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveReadFeature.java @@ -43,7 +43,8 @@ import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.message.BasicHeader; import org.apache.http.protocol.HTTP; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; @@ -53,7 +54,7 @@ import static com.google.api.client.json.Json.MEDIA_TYPE; public class DriveReadFeature implements Read { - private static final Logger log = Logger.getLogger(DriveReadFeature.class); + private static final Logger log = LogManager.getLogger(DriveReadFeature.class); private final DriveSession session; private final DriveFileIdProvider fileid; diff --git a/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveSession.java b/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveSession.java index fae90306f96..7b113914bfb 100644 --- a/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveSession.java +++ b/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveSession.java @@ -41,10 +41,10 @@ import ch.cyberduck.core.ssl.X509TrustManager; import ch.cyberduck.core.threading.CancelCallback; -import org.apache.commons.lang3.StringUtils; import org.apache.http.client.HttpClient; import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; @@ -57,7 +57,7 @@ import com.google.api.services.drive.model.About; public class DriveSession extends HttpSession { - private static final Logger log = Logger.getLogger(DriveSession.class); + private static final Logger log = LogManager.getLogger(DriveSession.class); private ApacheHttpTransport transport; private OAuth2RequestInterceptor authorizationService; diff --git a/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveTeamDrivesListService.java b/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveTeamDrivesListService.java index c2e60fe2b98..9a2ee025a2b 100644 --- a/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveTeamDrivesListService.java +++ b/googledrive/src/main/java/ch/cyberduck/core/googledrive/DriveTeamDrivesListService.java @@ -22,7 +22,8 @@ import ch.cyberduck.core.PathAttributes; import ch.cyberduck.core.exception.BackgroundException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.EnumSet; @@ -31,7 +32,7 @@ import com.google.api.services.drive.model.TeamDriveList; public class DriveTeamDrivesListService implements ListService { - private static final Logger log = Logger.getLogger(DriveTeamDrivesListService.class); + private static final Logger log = LogManager.getLogger(DriveTeamDrivesListService.class); private final DriveSession session; private final DriveFileIdProvider fileid; diff --git a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageAccessControlListFeature.java b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageAccessControlListFeature.java index 91c8defa67e..2e0043ff3a8 100644 --- a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageAccessControlListFeature.java +++ b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageAccessControlListFeature.java @@ -28,7 +28,8 @@ import ch.cyberduck.core.shared.DefaultAclFeature; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.ArrayList; @@ -46,7 +47,7 @@ import com.google.api.services.storage.model.StorageObject; public class GoogleStorageAccessControlListFeature extends DefaultAclFeature implements AclPermission { - private static final Logger log = Logger.getLogger(GoogleStorageAccessControlListFeature.class); + private static final Logger log = LogManager.getLogger(GoogleStorageAccessControlListFeature.class); public static final Set CANNED_LIST = new LinkedHashSet<>(Arrays.asList( Acl.CANNED_PRIVATE, diff --git a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageAttributesFinderFeature.java b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageAttributesFinderFeature.java index bf6ae6f69a5..10709ae7a94 100644 --- a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageAttributesFinderFeature.java +++ b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageAttributesFinderFeature.java @@ -32,7 +32,8 @@ import ch.cyberduck.core.preferences.HostPreferences; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; @@ -41,7 +42,7 @@ import com.google.api.services.storage.model.StorageObject; public class GoogleStorageAttributesFinderFeature implements AttributesFinder { - private static final Logger log = Logger.getLogger(GoogleStorageAttributesFinderFeature.class); + private static final Logger log = LogManager.getLogger(GoogleStorageAttributesFinderFeature.class); private final PathContainerService containerService; private final GoogleStorageSession session; diff --git a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageCopyFeature.java b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageCopyFeature.java index 43022717610..1a3f485103f 100644 --- a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageCopyFeature.java +++ b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageCopyFeature.java @@ -26,7 +26,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; @@ -35,7 +36,7 @@ import com.google.api.services.storage.model.StorageObject; public class GoogleStorageCopyFeature implements Copy { - private static final Logger log = Logger.getLogger(GoogleStorageMoveFeature.class); + private static final Logger log = LogManager.getLogger(GoogleStorageMoveFeature.class); private final PathContainerService containerService; private final GoogleStorageSession session; diff --git a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageDeleteFeature.java b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageDeleteFeature.java index dcc9d5d2ec4..64f61472048 100644 --- a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageDeleteFeature.java +++ b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageDeleteFeature.java @@ -26,7 +26,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.Map; @@ -34,7 +35,7 @@ import com.google.api.services.storage.Storage; public class GoogleStorageDeleteFeature implements Delete { - private static final Logger log = Logger.getLogger(GoogleStorageDeleteFeature.class); + private static final Logger log = LogManager.getLogger(GoogleStorageDeleteFeature.class); private final PathContainerService containerService; private final GoogleStorageSession session; diff --git a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageExceptionMappingService.java b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageExceptionMappingService.java index 25f719f52c9..c29151cd27f 100644 --- a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageExceptionMappingService.java +++ b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageExceptionMappingService.java @@ -23,7 +23,8 @@ import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.time.Duration; @@ -37,7 +38,7 @@ import com.google.api.client.json.gson.GsonFactory; public class GoogleStorageExceptionMappingService extends DefaultIOExceptionMappingService { - private static final Logger log = Logger.getLogger(GoogleStorageExceptionMappingService.class); + private static final Logger log = LogManager.getLogger(GoogleStorageExceptionMappingService.class); @Override public BackgroundException map(final IOException failure) { diff --git a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageLifecycleFeature.java b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageLifecycleFeature.java index e6692f36e46..4df8fca1bef 100644 --- a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageLifecycleFeature.java +++ b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageLifecycleFeature.java @@ -24,7 +24,8 @@ import ch.cyberduck.core.lifecycle.LifecycleConfiguration; import ch.cyberduck.core.preferences.HostPreferences; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.ArrayList; @@ -34,7 +35,7 @@ import com.google.api.services.storage.model.Bucket; public class GoogleStorageLifecycleFeature implements Lifecycle { - private static final Logger log = Logger.getLogger(GoogleStorageLifecycleFeature.class); + private static final Logger log = LogManager.getLogger(GoogleStorageLifecycleFeature.class); private final GoogleStorageSession session; private final PathContainerService containerService; diff --git a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageLoggingFeature.java b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageLoggingFeature.java index 5a04dacd683..98ed0088dfe 100644 --- a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageLoggingFeature.java +++ b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageLoggingFeature.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.preferences.HostPreferences; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.EnumSet; @@ -35,7 +36,7 @@ import com.google.api.services.storage.model.Bucket; public class GoogleStorageLoggingFeature implements Logging, DistributionLogging { - private static final Logger log = Logger.getLogger(GoogleStorageLoggingFeature.class); + private static final Logger log = LogManager.getLogger(GoogleStorageLoggingFeature.class); private final PathContainerService containerService; private final GoogleStorageSession session; diff --git a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageMetadataFeature.java b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageMetadataFeature.java index c62425d17e1..a94168e22c7 100644 --- a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageMetadataFeature.java +++ b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageMetadataFeature.java @@ -24,7 +24,8 @@ import ch.cyberduck.core.preferences.HostPreferences; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.Collections; @@ -33,7 +34,7 @@ import com.google.api.services.storage.model.StorageObject; public class GoogleStorageMetadataFeature implements Headers { - private static final Logger log = Logger.getLogger(GoogleStorageMetadataFeature.class); + private static final Logger log = LogManager.getLogger(GoogleStorageMetadataFeature.class); private final GoogleStorageSession session; private final PathContainerService containerService; diff --git a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageObjectListService.java b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageObjectListService.java index 8f25fc19ad0..ef6b84beb72 100644 --- a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageObjectListService.java +++ b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageObjectListService.java @@ -36,7 +36,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.concurrent.ConcurrentUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.ArrayList; @@ -47,10 +48,9 @@ import com.google.api.services.storage.model.Objects; import com.google.api.services.storage.model.StorageObject; -import com.google.common.collect.ImmutableMap; public class GoogleStorageObjectListService implements ListService { - private static final Logger log = Logger.getLogger(GoogleStorageObjectListService.class); + private static final Logger log = LogManager.getLogger(GoogleStorageObjectListService.class); private final GoogleStorageSession session; private final GoogleStorageAttributesFinderFeature attributes; diff --git a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageReadFeature.java b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageReadFeature.java index 9c007f5a4f4..dc1d5ae992e 100644 --- a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageReadFeature.java +++ b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageReadFeature.java @@ -27,7 +27,8 @@ import org.apache.commons.io.input.NullInputStream; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; @@ -36,7 +37,7 @@ import com.google.api.services.storage.Storage; public class GoogleStorageReadFeature implements Read { - private static final Logger log = Logger.getLogger(GoogleStorageReadFeature.class); + private static final Logger log = LogManager.getLogger(GoogleStorageReadFeature.class); private final PathContainerService containerService; private final GoogleStorageSession session; diff --git a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageTimestampFeature.java b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageTimestampFeature.java index b913ec04c37..af8079955c9 100644 --- a/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageTimestampFeature.java +++ b/googlestorage/src/main/java/ch/cyberduck/core/googlestorage/GoogleStorageTimestampFeature.java @@ -22,7 +22,8 @@ import ch.cyberduck.core.shared.DefaultTimestampFeature; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; @@ -30,7 +31,7 @@ import com.google.api.services.storage.model.StorageObject; public class GoogleStorageTimestampFeature extends DefaultTimestampFeature { - private static final Logger log = Logger.getLogger(GoogleStorageTimestampFeature.class); + private static final Logger log = LogManager.getLogger(GoogleStorageTimestampFeature.class); private final GoogleStorageSession session; private final PathContainerService containerService; diff --git a/hubic/src/main/java/ch/cyberduck/core/hubic/HubicSession.java b/hubic/src/main/java/ch/cyberduck/core/hubic/HubicSession.java index 04257b910cb..4365d31d182 100644 --- a/hubic/src/main/java/ch/cyberduck/core/hubic/HubicSession.java +++ b/hubic/src/main/java/ch/cyberduck/core/hubic/HubicSession.java @@ -33,7 +33,8 @@ import ch.cyberduck.core.threading.CancelCallback; import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; @@ -41,7 +42,7 @@ import ch.iterate.openstack.swift.exception.GenericException; public class HubicSession extends SwiftSession { - private static final Logger log = Logger.getLogger(HubicSession.class); + private static final Logger log = LogManager.getLogger(HubicSession.class); private OAuth2RequestInterceptor authorizationService; diff --git a/importer/src/main/java/ch/cyberduck/core/importer/CloudberryBookmarkCollection.java b/importer/src/main/java/ch/cyberduck/core/importer/CloudberryBookmarkCollection.java index b83e57977f1..57f75dff98b 100644 --- a/importer/src/main/java/ch/cyberduck/core/importer/CloudberryBookmarkCollection.java +++ b/importer/src/main/java/ch/cyberduck/core/importer/CloudberryBookmarkCollection.java @@ -22,11 +22,12 @@ import ch.cyberduck.core.Protocol; import ch.cyberduck.core.ProtocolFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.xml.sax.Attributes; public abstract class CloudberryBookmarkCollection extends XmlBookmarkCollection { - private static final Logger log = Logger.getLogger(CloudberryBookmarkCollection.class); + private static final Logger log = LogManager.getLogger(CloudberryBookmarkCollection.class); private static final long serialVersionUID = 2245328157886337606L; diff --git a/importer/src/main/java/ch/cyberduck/core/importer/CrossFtpBookmarkCollection.java b/importer/src/main/java/ch/cyberduck/core/importer/CrossFtpBookmarkCollection.java index 36f57be4ade..228dde1dfcd 100644 --- a/importer/src/main/java/ch/cyberduck/core/importer/CrossFtpBookmarkCollection.java +++ b/importer/src/main/java/ch/cyberduck/core/importer/CrossFtpBookmarkCollection.java @@ -26,11 +26,12 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.xml.sax.Attributes; public class CrossFtpBookmarkCollection extends XmlBookmarkCollection { - private static final Logger log = Logger.getLogger(CrossFtpBookmarkCollection.class); + private static final Logger log = LogManager.getLogger(CrossFtpBookmarkCollection.class); private static final long serialVersionUID = 7442378118872253601L; diff --git a/importer/src/main/java/ch/cyberduck/core/importer/ExpandriveBookmarkCollection.java b/importer/src/main/java/ch/cyberduck/core/importer/ExpandriveBookmarkCollection.java index 069d422bbde..59039d8b836 100644 --- a/importer/src/main/java/ch/cyberduck/core/importer/ExpandriveBookmarkCollection.java +++ b/importer/src/main/java/ch/cyberduck/core/importer/ExpandriveBookmarkCollection.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.exception.LocalAccessDeniedException; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStreamReader; @@ -36,7 +37,7 @@ import com.google.gson.stream.JsonReader; public abstract class ExpandriveBookmarkCollection extends JsonBookmarkCollection { - private static final Logger log = Logger.getLogger(ExpandriveBookmarkCollection.class); + private static final Logger log = LogManager.getLogger(ExpandriveBookmarkCollection.class); @Override protected void parse(final ProtocolFactory protocols, final Local file) throws AccessDeniedException { diff --git a/importer/src/main/java/ch/cyberduck/core/importer/FilezillaBookmarkCollection.java b/importer/src/main/java/ch/cyberduck/core/importer/FilezillaBookmarkCollection.java index 668593cd657..fee598130b1 100644 --- a/importer/src/main/java/ch/cyberduck/core/importer/FilezillaBookmarkCollection.java +++ b/importer/src/main/java/ch/cyberduck/core/importer/FilezillaBookmarkCollection.java @@ -30,11 +30,12 @@ import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.xml.sax.Attributes; public class FilezillaBookmarkCollection extends XmlBookmarkCollection { - private static final Logger log = Logger.getLogger(FilezillaBookmarkCollection.class); + private static final Logger log = LogManager.getLogger(FilezillaBookmarkCollection.class); private static final long serialVersionUID = -4612895793983093594L; @@ -199,4 +200,4 @@ else if("MODE_ACTIVE".equals(elementText)) { } } } -} \ No newline at end of file +} diff --git a/importer/src/main/java/ch/cyberduck/core/importer/FireFtpBookmarkCollection.java b/importer/src/main/java/ch/cyberduck/core/importer/FireFtpBookmarkCollection.java index 0d812d5db93..3f8f26e5251 100644 --- a/importer/src/main/java/ch/cyberduck/core/importer/FireFtpBookmarkCollection.java +++ b/importer/src/main/java/ch/cyberduck/core/importer/FireFtpBookmarkCollection.java @@ -29,7 +29,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.BufferedReader; import java.io.IOException; @@ -41,7 +42,7 @@ import java.util.regex.Pattern; public class FireFtpBookmarkCollection extends ThirdpartyBookmarkCollection { - private static final Logger log = Logger.getLogger(FireFtpBookmarkCollection.class); + private static final Logger log = LogManager.getLogger(FireFtpBookmarkCollection.class); private static final long serialVersionUID = -1802799231453221690L; diff --git a/importer/src/main/java/ch/cyberduck/core/importer/FlashFxpBookmarkCollection.java b/importer/src/main/java/ch/cyberduck/core/importer/FlashFxpBookmarkCollection.java index 4aea8df0e91..c6ef7a8af2b 100644 --- a/importer/src/main/java/ch/cyberduck/core/importer/FlashFxpBookmarkCollection.java +++ b/importer/src/main/java/ch/cyberduck/core/importer/FlashFxpBookmarkCollection.java @@ -26,7 +26,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.BufferedReader; import java.io.IOException; @@ -38,7 +39,7 @@ import java.util.regex.Pattern; public abstract class FlashFxpBookmarkCollection extends ThirdpartyBookmarkCollection { - private static final Logger log = Logger.getLogger(FlashFxpBookmarkCollection.class); + private static final Logger log = LogManager.getLogger(FlashFxpBookmarkCollection.class); private static final long serialVersionUID = 5122804563710604658L; diff --git a/importer/src/main/java/ch/cyberduck/core/importer/JsonBookmarkCollection.java b/importer/src/main/java/ch/cyberduck/core/importer/JsonBookmarkCollection.java index 40065108c06..e3390897413 100644 --- a/importer/src/main/java/ch/cyberduck/core/importer/JsonBookmarkCollection.java +++ b/importer/src/main/java/ch/cyberduck/core/importer/JsonBookmarkCollection.java @@ -15,7 +15,8 @@ * GNU General Public License for more details. */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; @@ -23,7 +24,7 @@ import com.google.gson.stream.JsonToken; public abstract class JsonBookmarkCollection extends ThirdpartyBookmarkCollection { - private static final Logger log = Logger.getLogger(JsonBookmarkCollection.class); + private static final Logger log = LogManager.getLogger(JsonBookmarkCollection.class); protected String readNext(final String name, final JsonReader reader) throws IOException { if(reader.peek() != JsonToken.NULL) { diff --git a/importer/src/main/java/ch/cyberduck/core/importer/NetDrive2BookmarkCollection.java b/importer/src/main/java/ch/cyberduck/core/importer/NetDrive2BookmarkCollection.java index 3396b2f3097..bef538a628f 100644 --- a/importer/src/main/java/ch/cyberduck/core/importer/NetDrive2BookmarkCollection.java +++ b/importer/src/main/java/ch/cyberduck/core/importer/NetDrive2BookmarkCollection.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStreamReader; @@ -36,7 +37,7 @@ import com.google.gson.stream.JsonReader; public class NetDrive2BookmarkCollection extends JsonBookmarkCollection { - private static final Logger log = Logger.getLogger(NetDrive2BookmarkCollection.class); + private static final Logger log = LogManager.getLogger(NetDrive2BookmarkCollection.class); @Override public String getName() { diff --git a/importer/src/main/java/ch/cyberduck/core/importer/S3BrowserBookmarkCollection.java b/importer/src/main/java/ch/cyberduck/core/importer/S3BrowserBookmarkCollection.java index 596a4947296..1948c0cf4b0 100644 --- a/importer/src/main/java/ch/cyberduck/core/importer/S3BrowserBookmarkCollection.java +++ b/importer/src/main/java/ch/cyberduck/core/importer/S3BrowserBookmarkCollection.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.BufferedReader; import java.io.IOException; @@ -37,7 +38,7 @@ import java.util.Scanner; public class S3BrowserBookmarkCollection extends ThirdpartyBookmarkCollection { - private static final Logger log = Logger.getLogger(S3BrowserBookmarkCollection.class); + private static final Logger log = LogManager.getLogger(S3BrowserBookmarkCollection.class); private static final long serialVersionUID = 2559948549693535359L; diff --git a/importer/src/main/java/ch/cyberduck/core/importer/SmartFtpBookmarkCollection.java b/importer/src/main/java/ch/cyberduck/core/importer/SmartFtpBookmarkCollection.java index 4cc4a92845b..0176a4df82a 100644 --- a/importer/src/main/java/ch/cyberduck/core/importer/SmartFtpBookmarkCollection.java +++ b/importer/src/main/java/ch/cyberduck/core/importer/SmartFtpBookmarkCollection.java @@ -30,13 +30,14 @@ import ch.cyberduck.core.ftp.FTPConnectMode; import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.xml.sax.Attributes; import java.util.regex.Pattern; public class SmartFtpBookmarkCollection extends XmlBookmarkCollection { - private static final Logger log = Logger.getLogger(SmartFtpBookmarkCollection.class); + private static final Logger log = LogManager.getLogger(SmartFtpBookmarkCollection.class); private static final long serialVersionUID = 6455585501577444740L; @@ -193,4 +194,4 @@ public void endElement(String name, String elementText) { } } } -} \ No newline at end of file +} diff --git a/importer/src/main/java/ch/cyberduck/core/importer/ThirdpartyBookmarkCollection.java b/importer/src/main/java/ch/cyberduck/core/importer/ThirdpartyBookmarkCollection.java index 21641307531..09d2070e084 100644 --- a/importer/src/main/java/ch/cyberduck/core/importer/ThirdpartyBookmarkCollection.java +++ b/importer/src/main/java/ch/cyberduck/core/importer/ThirdpartyBookmarkCollection.java @@ -38,13 +38,14 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.text.MessageFormat; import java.util.Iterator; public abstract class ThirdpartyBookmarkCollection extends Collection { - private static final Logger log = Logger.getLogger(ThirdpartyBookmarkCollection.class); + private static final Logger log = LogManager.getLogger(ThirdpartyBookmarkCollection.class); private final Preferences preferences = PreferencesFactory.get(); private final PasswordStore keychain; diff --git a/importer/src/main/java/ch/cyberduck/core/importer/TotalCommanderBookmarkCollection.java b/importer/src/main/java/ch/cyberduck/core/importer/TotalCommanderBookmarkCollection.java index c4186c874ea..d2176f039fd 100644 --- a/importer/src/main/java/ch/cyberduck/core/importer/TotalCommanderBookmarkCollection.java +++ b/importer/src/main/java/ch/cyberduck/core/importer/TotalCommanderBookmarkCollection.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.BufferedReader; import java.io.IOException; @@ -39,7 +40,7 @@ import java.util.regex.Pattern; public class TotalCommanderBookmarkCollection extends ThirdpartyBookmarkCollection { - private static final Logger log = Logger.getLogger(TotalCommanderBookmarkCollection.class); + private static final Logger log = LogManager.getLogger(TotalCommanderBookmarkCollection.class); private static final long serialVersionUID = -1125641222323961118L; diff --git a/importer/src/main/java/ch/cyberduck/core/importer/Transmit3BookmarkCollection.java b/importer/src/main/java/ch/cyberduck/core/importer/Transmit3BookmarkCollection.java index 5598468eaac..aedf988c278 100644 --- a/importer/src/main/java/ch/cyberduck/core/importer/Transmit3BookmarkCollection.java +++ b/importer/src/main/java/ch/cyberduck/core/importer/Transmit3BookmarkCollection.java @@ -36,12 +36,13 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.ObjCClass; import org.rococoa.Rococoa; public class Transmit3BookmarkCollection extends ThirdpartyBookmarkCollection { - private static final Logger log = Logger.getLogger(Transmit3BookmarkCollection.class); + private static final Logger log = LogManager.getLogger(Transmit3BookmarkCollection.class); private static final long serialVersionUID = 6406786269501430927L; diff --git a/importer/src/main/java/ch/cyberduck/core/importer/Transmit4BookmarkCollection.java b/importer/src/main/java/ch/cyberduck/core/importer/Transmit4BookmarkCollection.java index b555cb1cd32..c729445ebfa 100644 --- a/importer/src/main/java/ch/cyberduck/core/importer/Transmit4BookmarkCollection.java +++ b/importer/src/main/java/ch/cyberduck/core/importer/Transmit4BookmarkCollection.java @@ -23,11 +23,12 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.xml.sax.Attributes; public class Transmit4BookmarkCollection extends XmlBookmarkCollection { - private static final Logger log = Logger.getLogger(Transmit4BookmarkCollection.class); + private static final Logger log = LogManager.getLogger(Transmit4BookmarkCollection.class); @Override protected AbstractHandler getHandler(final ProtocolFactory protocols) { diff --git a/importer/src/main/java/ch/cyberduck/core/importer/WinScpBookmarkCollection.java b/importer/src/main/java/ch/cyberduck/core/importer/WinScpBookmarkCollection.java index 297f7b0d03d..d07a9c2310b 100644 --- a/importer/src/main/java/ch/cyberduck/core/importer/WinScpBookmarkCollection.java +++ b/importer/src/main/java/ch/cyberduck/core/importer/WinScpBookmarkCollection.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.BufferedReader; import java.io.IOException; @@ -39,7 +40,7 @@ import java.util.regex.Pattern; public class WinScpBookmarkCollection extends ThirdpartyBookmarkCollection { - private static final Logger log = Logger.getLogger(WinScpBookmarkCollection.class); + private static final Logger log = LogManager.getLogger(WinScpBookmarkCollection.class); private static final long serialVersionUID = 4886529703737860985L; diff --git a/importer/src/main/java/ch/cyberduck/core/importer/WsFtpBookmarkCollection.java b/importer/src/main/java/ch/cyberduck/core/importer/WsFtpBookmarkCollection.java index d8f1b5d7060..eff92c720e8 100644 --- a/importer/src/main/java/ch/cyberduck/core/importer/WsFtpBookmarkCollection.java +++ b/importer/src/main/java/ch/cyberduck/core/importer/WsFtpBookmarkCollection.java @@ -28,7 +28,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.BufferedReader; import java.io.IOException; @@ -40,7 +41,7 @@ import java.util.regex.Pattern; public class WsFtpBookmarkCollection extends ThirdpartyBookmarkCollection { - private static final Logger log = Logger.getLogger(WsFtpBookmarkCollection.class); + private static final Logger log = LogManager.getLogger(WsFtpBookmarkCollection.class); private static final long serialVersionUID = -254244450037887034L; diff --git a/importer/src/main/java/ch/cyberduck/core/importer/XmlBookmarkCollection.java b/importer/src/main/java/ch/cyberduck/core/importer/XmlBookmarkCollection.java index 1e4c50082d9..4800c0041b6 100644 --- a/importer/src/main/java/ch/cyberduck/core/importer/XmlBookmarkCollection.java +++ b/importer/src/main/java/ch/cyberduck/core/importer/XmlBookmarkCollection.java @@ -23,7 +23,8 @@ import ch.cyberduck.core.ProtocolFactory; import ch.cyberduck.core.exception.AccessDeniedException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.xml.sax.Attributes; import org.xml.sax.InputSource; import org.xml.sax.SAXException; @@ -37,7 +38,7 @@ import java.nio.charset.StandardCharsets; public abstract class XmlBookmarkCollection extends ThirdpartyBookmarkCollection { - private static final Logger log = Logger.getLogger(XmlBookmarkCollection.class); + private static final Logger log = LogManager.getLogger(XmlBookmarkCollection.class); private static final long serialVersionUID = -3145592458663362423L; diff --git a/irods/src/main/java/ch/cyberduck/core/irods/DefaultTransferStatusCallbackListener.java b/irods/src/main/java/ch/cyberduck/core/irods/DefaultTransferStatusCallbackListener.java index 66cf0e41046..fe3907fb8c5 100644 --- a/irods/src/main/java/ch/cyberduck/core/irods/DefaultTransferStatusCallbackListener.java +++ b/irods/src/main/java/ch/cyberduck/core/irods/DefaultTransferStatusCallbackListener.java @@ -22,12 +22,13 @@ import ch.cyberduck.core.io.StreamListener; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.irods.jargon.core.transfer.TransferControlBlock; import org.irods.jargon.core.transfer.TransferStatusCallbackListener; public class DefaultTransferStatusCallbackListener implements TransferStatusCallbackListener { - private static final Logger log = Logger.getLogger(DefaultTransferStatusCallbackListener.class); + private static final Logger log = LogManager.getLogger(DefaultTransferStatusCallbackListener.class); private final TransferStatus status; private final BytecountStreamListener listener; diff --git a/irods/src/main/java/ch/cyberduck/core/irods/IRODSSession.java b/irods/src/main/java/ch/cyberduck/core/irods/IRODSSession.java index e27cdd7d63b..1df0a9c1113 100644 --- a/irods/src/main/java/ch/cyberduck/core/irods/IRODSSession.java +++ b/irods/src/main/java/ch/cyberduck/core/irods/IRODSSession.java @@ -48,7 +48,8 @@ import ch.cyberduck.core.threading.CancelCallback; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.irods.jargon.core.connection.AuthScheme; import org.irods.jargon.core.connection.IRODSAccount; import org.irods.jargon.core.connection.SettableJargonProperties; @@ -63,7 +64,7 @@ import java.text.MessageFormat; public class IRODSSession extends SSLSession { - private static final Logger log = Logger.getLogger(IRODSSession.class); + private static final Logger log = LogManager.getLogger(IRODSSession.class); public IRODSSession(final Host h) { super(h, new DisabledX509TrustManager(), new DefaultX509KeyManager()); diff --git a/irods/src/main/java/ch/cyberduck/core/irods/IRODSUploadFeature.java b/irods/src/main/java/ch/cyberduck/core/irods/IRODSUploadFeature.java index dc4ff400375..c1b2e835bbe 100644 --- a/irods/src/main/java/ch/cyberduck/core/irods/IRODSUploadFeature.java +++ b/irods/src/main/java/ch/cyberduck/core/irods/IRODSUploadFeature.java @@ -35,7 +35,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.irods.jargon.core.checksum.ChecksumValue; import org.irods.jargon.core.exception.JargonException; import org.irods.jargon.core.packinstr.TransferOptions; @@ -50,7 +51,7 @@ import java.text.MessageFormat; public class IRODSUploadFeature implements Upload { - private static final Logger log = Logger.getLogger(IRODSUploadFeature.class); + private static final Logger log = LogManager.getLogger(IRODSUploadFeature.class); private final IRODSSession session; diff --git a/jersey/src/main/java/ch/cyberduck/core/jersey/HttpComponentsConnector.java b/jersey/src/main/java/ch/cyberduck/core/jersey/HttpComponentsConnector.java index e3b9431b26f..f0dad399250 100644 --- a/jersey/src/main/java/ch/cyberduck/core/jersey/HttpComponentsConnector.java +++ b/jersey/src/main/java/ch/cyberduck/core/jersey/HttpComponentsConnector.java @@ -28,7 +28,8 @@ import org.apache.http.entity.AbstractHttpEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.protocol.BasicHttpContext; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.glassfish.jersey.client.ClientRequest; import org.glassfish.jersey.client.ClientResponse; import org.glassfish.jersey.client.spi.AsyncConnectorCallback; @@ -54,7 +55,7 @@ import com.google.common.util.concurrent.MoreExecutors; public class HttpComponentsConnector implements Connector { - private static final Logger log = Logger.getLogger(HttpComponentsConnector.class); + private static final Logger log = LogManager.getLogger(HttpComponentsConnector.class); private final CloseableHttpClient client; private final HttpClientContext context; diff --git a/manta/src/main/java/ch/cyberduck/core/manta/MantaObjectAttributeAdapter.java b/manta/src/main/java/ch/cyberduck/core/manta/MantaObjectAttributeAdapter.java index 5b2378a7195..0df3448543a 100644 --- a/manta/src/main/java/ch/cyberduck/core/manta/MantaObjectAttributeAdapter.java +++ b/manta/src/main/java/ch/cyberduck/core/manta/MantaObjectAttributeAdapter.java @@ -25,7 +25,8 @@ import ch.cyberduck.core.io.HashAlgorithm; import org.apache.commons.codec.binary.Hex; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.net.URI; import java.net.URISyntaxException; @@ -34,7 +35,7 @@ import com.joyent.manta.client.MantaObject; public final class MantaObjectAttributeAdapter { - private static final Logger log = Logger.getLogger(MantaObjectAttributeAdapter.class); + private static final Logger log = LogManager.getLogger(MantaObjectAttributeAdapter.class); private final MantaSession session; diff --git a/manta/src/main/java/ch/cyberduck/core/manta/MantaPublicKeyAuthentication.java b/manta/src/main/java/ch/cyberduck/core/manta/MantaPublicKeyAuthentication.java index 5d731ec230e..7ba2ea6ccc2 100644 --- a/manta/src/main/java/ch/cyberduck/core/manta/MantaPublicKeyAuthentication.java +++ b/manta/src/main/java/ch/cyberduck/core/manta/MantaPublicKeyAuthentication.java @@ -32,7 +32,8 @@ import ch.cyberduck.core.threading.CancelCallback; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.bouncycastle.openssl.EncryptionException; import org.bouncycastle.openssl.PasswordException; @@ -54,7 +55,7 @@ import net.schmizz.sshj.userauth.password.Resource; public class MantaPublicKeyAuthentication implements AuthenticationProvider { - private static final Logger log = Logger.getLogger(MantaPublicKeyAuthentication.class); + private static final Logger log = LogManager.getLogger(MantaPublicKeyAuthentication.class); private final MantaSession session; diff --git a/manta/src/main/java/ch/cyberduck/core/manta/MantaSession.java b/manta/src/main/java/ch/cyberduck/core/manta/MantaSession.java index b9411449fc0..b440a93f45e 100644 --- a/manta/src/main/java/ch/cyberduck/core/manta/MantaSession.java +++ b/manta/src/main/java/ch/cyberduck/core/manta/MantaSession.java @@ -40,7 +40,8 @@ import ch.cyberduck.core.threading.CancelCallback; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; @@ -56,7 +57,7 @@ import com.joyent.manta.http.MantaConnectionFactoryConfigurator; public class MantaSession extends HttpSession { - private static final Logger log = Logger.getLogger(MantaSession.class); + private static final Logger log = LogManager.getLogger(MantaSession.class); private final AuthAwareConfigContext config; diff --git a/manta/src/main/java/ch/cyberduck/core/manta/MantaUrlProviderFeature.java b/manta/src/main/java/ch/cyberduck/core/manta/MantaUrlProviderFeature.java index 4f10679c1d9..6152b8678e5 100644 --- a/manta/src/main/java/ch/cyberduck/core/manta/MantaUrlProviderFeature.java +++ b/manta/src/main/java/ch/cyberduck/core/manta/MantaUrlProviderFeature.java @@ -22,14 +22,15 @@ import ch.cyberduck.core.UrlProvider; import ch.cyberduck.core.UserDateFormatterFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.text.MessageFormat; import java.time.Duration; public class MantaUrlProviderFeature implements UrlProvider { - private static final Logger log = Logger.getLogger(MantaUrlProviderFeature.class); + private static final Logger log = LogManager.getLogger(MantaUrlProviderFeature.class); private final MantaSession session; diff --git a/manta/src/test/java/ch/cyberduck/core/manta/AbstractMantaTest.java b/manta/src/test/java/ch/cyberduck/core/manta/AbstractMantaTest.java index 9d45d5b0059..c7634971c1c 100644 --- a/manta/src/test/java/ch/cyberduck/core/manta/AbstractMantaTest.java +++ b/manta/src/test/java/ch/cyberduck/core/manta/AbstractMantaTest.java @@ -35,7 +35,8 @@ import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.ObjectUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.junit.After; import org.junit.Before; @@ -46,7 +47,7 @@ import java.util.UUID; public abstract class AbstractMantaTest { - private static final Logger log = Logger.getLogger(AbstractMantaTest.class); + private static final Logger log = LogManager.getLogger(AbstractMantaTest.class); protected MantaSession session; protected Path testPathPrefix; diff --git a/nio/src/main/java/ch/cyberduck/core/nio/LocalFindFeature.java b/nio/src/main/java/ch/cyberduck/core/nio/LocalFindFeature.java index fa9bfb5e8ab..f440140ab31 100644 --- a/nio/src/main/java/ch/cyberduck/core/nio/LocalFindFeature.java +++ b/nio/src/main/java/ch/cyberduck/core/nio/LocalFindFeature.java @@ -21,14 +21,15 @@ import ch.cyberduck.core.features.Find; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.nio.file.Files; import java.nio.file.LinkOption; public class LocalFindFeature implements Find { - private static final Logger log = Logger.getLogger(LocalFindFeature.class); + private static final Logger log = LogManager.getLogger(LocalFindFeature.class); private final LocalSession session; diff --git a/nio/src/main/java/ch/cyberduck/core/nio/LocalListService.java b/nio/src/main/java/ch/cyberduck/core/nio/LocalListService.java index 1b0943df7c8..87baf4ed578 100644 --- a/nio/src/main/java/ch/cyberduck/core/nio/LocalListService.java +++ b/nio/src/main/java/ch/cyberduck/core/nio/LocalListService.java @@ -16,14 +16,14 @@ */ import ch.cyberduck.core.AttributedList; -import ch.cyberduck.core.Cache; import ch.cyberduck.core.ListProgressListener; import ch.cyberduck.core.ListService; import ch.cyberduck.core.Path; import ch.cyberduck.core.PathAttributes; import ch.cyberduck.core.exception.BackgroundException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.nio.file.DirectoryStream; @@ -31,7 +31,7 @@ import java.util.EnumSet; public class LocalListService implements ListService { - private static final Logger log = Logger.getLogger(LocalListService.class); + private static final Logger log = LogManager.getLogger(LocalListService.class); private final LocalSession session; private final LocalAttributesFinderFeature feature; diff --git a/nio/src/main/java/ch/cyberduck/core/nio/LocalSession.java b/nio/src/main/java/ch/cyberduck/core/nio/LocalSession.java index af6f2801693..c321be43cfa 100644 --- a/nio/src/main/java/ch/cyberduck/core/nio/LocalSession.java +++ b/nio/src/main/java/ch/cyberduck/core/nio/LocalSession.java @@ -43,14 +43,15 @@ import ch.cyberduck.core.ssl.X509TrustManager; import ch.cyberduck.core.threading.CancelCallback; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.nio.file.FileSystem; import java.nio.file.FileSystems; import java.nio.file.InvalidPathException; public class LocalSession extends Session { - private static final Logger log = Logger.getLogger(LocalSession.class); + private static final Logger log = LogManager.getLogger(LocalSession.class); private Object lock; diff --git a/oauth/src/main/java/ch/cyberduck/core/oauth/OAuth2AuthorizationService.java b/oauth/src/main/java/ch/cyberduck/core/oauth/OAuth2AuthorizationService.java index 43b7138c092..bf3d8c94d7a 100644 --- a/oauth/src/main/java/ch/cyberduck/core/oauth/OAuth2AuthorizationService.java +++ b/oauth/src/main/java/ch/cyberduck/core/oauth/OAuth2AuthorizationService.java @@ -38,7 +38,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.http.client.HttpClient; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.HashMap; @@ -66,7 +67,7 @@ import com.google.api.client.json.gson.GsonFactory; public class OAuth2AuthorizationService { - private static final Logger log = Logger.getLogger(OAuth2AuthorizationService.class); + private static final Logger log = LogManager.getLogger(OAuth2AuthorizationService.class); public static final String OOB_REDIRECT_URI = "urn:ietf:wg:oauth:2.0:oob"; public static final String CYBERDUCK_REDIRECT_URI = String.format("%s:oauth", PreferencesFactory.get().getProperty("oauth.handler.scheme")); diff --git a/oauth/src/main/java/ch/cyberduck/core/oauth/OAuth2ErrorResponseInterceptor.java b/oauth/src/main/java/ch/cyberduck/core/oauth/OAuth2ErrorResponseInterceptor.java index 7005b9c3666..83e98f80d1c 100644 --- a/oauth/src/main/java/ch/cyberduck/core/oauth/OAuth2ErrorResponseInterceptor.java +++ b/oauth/src/main/java/ch/cyberduck/core/oauth/OAuth2ErrorResponseInterceptor.java @@ -27,10 +27,11 @@ import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.apache.http.protocol.HttpContext; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class OAuth2ErrorResponseInterceptor extends DisabledServiceUnavailableRetryStrategy { - private static final Logger log = Logger.getLogger(OAuth2ErrorResponseInterceptor.class); + private static final Logger log = LogManager.getLogger(OAuth2ErrorResponseInterceptor.class); private static final int MAX_RETRIES = 1; diff --git a/oauth/src/main/java/ch/cyberduck/core/oauth/OAuth2RequestInterceptor.java b/oauth/src/main/java/ch/cyberduck/core/oauth/OAuth2RequestInterceptor.java index a3cdf6d0896..fcd524fca9c 100644 --- a/oauth/src/main/java/ch/cyberduck/core/oauth/OAuth2RequestInterceptor.java +++ b/oauth/src/main/java/ch/cyberduck/core/oauth/OAuth2RequestInterceptor.java @@ -30,7 +30,8 @@ import org.apache.http.client.HttpClient; import org.apache.http.message.BasicHeader; import org.apache.http.protocol.HttpContext; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.List; @@ -39,7 +40,7 @@ import com.google.api.client.http.HttpTransport; public class OAuth2RequestInterceptor extends OAuth2AuthorizationService implements HttpRequestInterceptor { - private static final Logger log = Logger.getLogger(OAuth2RequestInterceptor.class); + private static final Logger log = LogManager.getLogger(OAuth2RequestInterceptor.class); /** * Currently valid tokens diff --git a/oauth/src/main/java/ch/cyberduck/core/oauth/OAuth2TokenListenerRegistry.java b/oauth/src/main/java/ch/cyberduck/core/oauth/OAuth2TokenListenerRegistry.java index 55881f03c99..6b8953711fa 100644 --- a/oauth/src/main/java/ch/cyberduck/core/oauth/OAuth2TokenListenerRegistry.java +++ b/oauth/src/main/java/ch/cyberduck/core/oauth/OAuth2TokenListenerRegistry.java @@ -15,13 +15,14 @@ * GNU General Public License for more details. */ -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.HashMap; import java.util.Map; public class OAuth2TokenListenerRegistry { - private static final Logger log = Logger.getLogger(OAuth2TokenListenerRegistry.class); + private static final Logger log = LogManager.getLogger(OAuth2TokenListenerRegistry.class); private static final OAuth2TokenListenerRegistry global = new OAuth2TokenListenerRegistry(); diff --git a/onedrive/src/main/java/ch/cyberduck/core/onedrive/AbstractDriveListService.java b/onedrive/src/main/java/ch/cyberduck/core/onedrive/AbstractDriveListService.java index c651810c112..fe80df51ed6 100644 --- a/onedrive/src/main/java/ch/cyberduck/core/onedrive/AbstractDriveListService.java +++ b/onedrive/src/main/java/ch/cyberduck/core/onedrive/AbstractDriveListService.java @@ -20,14 +20,15 @@ import ch.cyberduck.core.onedrive.features.GraphFileIdProvider; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuxeo.onedrive.client.types.Drive; import org.nuxeo.onedrive.client.types.Quota; import java.util.EnumSet; public abstract class AbstractDriveListService extends AbstractListService { - private static final Logger log = Logger.getLogger(AbstractDriveListService.class); + private static final Logger log = LogManager.getLogger(AbstractDriveListService.class); public AbstractDriveListService(final GraphFileIdProvider fileid) { super(fileid); diff --git a/onedrive/src/main/java/ch/cyberduck/core/onedrive/AbstractListService.java b/onedrive/src/main/java/ch/cyberduck/core/onedrive/AbstractListService.java index 7bf31974ff4..b1131e24237 100644 --- a/onedrive/src/main/java/ch/cyberduck/core/onedrive/AbstractListService.java +++ b/onedrive/src/main/java/ch/cyberduck/core/onedrive/AbstractListService.java @@ -22,13 +22,14 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.onedrive.features.GraphFileIdProvider; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuxeo.onedrive.client.OneDriveRuntimeException; import java.util.Iterator; public abstract class AbstractListService implements ListService { - private static final Logger log = Logger.getLogger(AbstractListService.class); + private static final Logger log = LogManager.getLogger(AbstractListService.class); private final GraphFileIdProvider fileid; diff --git a/onedrive/src/main/java/ch/cyberduck/core/onedrive/AbstractSharepointSession.java b/onedrive/src/main/java/ch/cyberduck/core/onedrive/AbstractSharepointSession.java index d395d2b4467..2795a7dbd66 100644 --- a/onedrive/src/main/java/ch/cyberduck/core/onedrive/AbstractSharepointSession.java +++ b/onedrive/src/main/java/ch/cyberduck/core/onedrive/AbstractSharepointSession.java @@ -30,7 +30,8 @@ import ch.cyberduck.core.ssl.X509TrustManager; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuxeo.onedrive.client.OneDriveAPIException; import org.nuxeo.onedrive.client.types.Drive; import org.nuxeo.onedrive.client.types.DriveItem; @@ -44,7 +45,7 @@ import java.util.function.Predicate; public abstract class AbstractSharepointSession extends GraphSession { - private static final Logger log = Logger.getLogger(SharepointSession.class); + private static final Logger log = LogManager.getLogger(SharepointSession.class); private final Path home; private final Predicate homeComparer; diff --git a/onedrive/src/main/java/ch/cyberduck/core/onedrive/GraphDrivesListService.java b/onedrive/src/main/java/ch/cyberduck/core/onedrive/GraphDrivesListService.java index a2324799be3..f734823155c 100644 --- a/onedrive/src/main/java/ch/cyberduck/core/onedrive/GraphDrivesListService.java +++ b/onedrive/src/main/java/ch/cyberduck/core/onedrive/GraphDrivesListService.java @@ -18,7 +18,8 @@ import ch.cyberduck.core.Path; import ch.cyberduck.core.onedrive.features.GraphFileIdProvider; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuxeo.onedrive.client.Drives; import org.nuxeo.onedrive.client.types.Drive; @@ -28,7 +29,7 @@ * List the available drives for a user (OneDrive) or SharePoint site (document libraries). */ public class GraphDrivesListService extends AbstractDriveListService { - private static final Logger log = Logger.getLogger(GraphDrivesListService.class); + private static final Logger log = LogManager.getLogger(GraphDrivesListService.class); private final GraphSession session; diff --git a/onedrive/src/main/java/ch/cyberduck/core/onedrive/GraphItemListService.java b/onedrive/src/main/java/ch/cyberduck/core/onedrive/GraphItemListService.java index 75f7b62ecae..19e42f6195c 100644 --- a/onedrive/src/main/java/ch/cyberduck/core/onedrive/GraphItemListService.java +++ b/onedrive/src/main/java/ch/cyberduck/core/onedrive/GraphItemListService.java @@ -21,14 +21,15 @@ import ch.cyberduck.core.onedrive.features.GraphFileIdProvider; import ch.cyberduck.core.preferences.HostPreferences; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuxeo.onedrive.client.Files; import org.nuxeo.onedrive.client.types.DriveItem; import java.util.Iterator; public class GraphItemListService extends AbstractItemListService { - private static final Logger log = Logger.getLogger(GraphItemListService.class); + private static final Logger log = LogManager.getLogger(GraphItemListService.class); private final GraphSession session; diff --git a/onedrive/src/main/java/ch/cyberduck/core/onedrive/GraphSession.java b/onedrive/src/main/java/ch/cyberduck/core/onedrive/GraphSession.java index 6d6dc323375..b46b0a2b2af 100644 --- a/onedrive/src/main/java/ch/cyberduck/core/onedrive/GraphSession.java +++ b/onedrive/src/main/java/ch/cyberduck/core/onedrive/GraphSession.java @@ -66,7 +66,8 @@ import org.apache.http.HttpRequest; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.protocol.HttpContext; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuxeo.onedrive.client.OneDriveAPI; import org.nuxeo.onedrive.client.OneDriveAPIException; import org.nuxeo.onedrive.client.RequestExecutor; @@ -83,7 +84,7 @@ public abstract class GraphSession extends HttpSession { private final static String API_VERSION = "v1.0"; - private static final Logger log = Logger.getLogger(GraphSession.class); + private static final Logger log = LogManager.getLogger(GraphSession.class); private OAuth2RequestInterceptor authorizationService; diff --git a/onedrive/src/main/java/ch/cyberduck/core/onedrive/SharepointListService.java b/onedrive/src/main/java/ch/cyberduck/core/onedrive/SharepointListService.java index a775474ff3f..01d50f3b14c 100644 --- a/onedrive/src/main/java/ch/cyberduck/core/onedrive/SharepointListService.java +++ b/onedrive/src/main/java/ch/cyberduck/core/onedrive/SharepointListService.java @@ -24,7 +24,8 @@ import ch.cyberduck.core.onedrive.features.sharepoint.GroupDrivesListService; import ch.cyberduck.core.onedrive.features.sharepoint.GroupListService; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuxeo.onedrive.client.types.Site; import java.io.IOException; @@ -32,7 +33,7 @@ import java.util.Optional; public class SharepointListService extends AbstractSharepointListService { - static final Logger log = Logger.getLogger(SharepointListService.class); + static final Logger log = LogManager.getLogger(SharepointListService.class); public static final String DEFAULT_SITE = "Default"; public static final String DRIVES_CONTAINER = "Drives"; diff --git a/onedrive/src/main/java/ch/cyberduck/core/onedrive/SharepointSession.java b/onedrive/src/main/java/ch/cyberduck/core/onedrive/SharepointSession.java index ddfef2c6ecb..3e711754a1c 100644 --- a/onedrive/src/main/java/ch/cyberduck/core/onedrive/SharepointSession.java +++ b/onedrive/src/main/java/ch/cyberduck/core/onedrive/SharepointSession.java @@ -23,7 +23,8 @@ import ch.cyberduck.core.ssl.X509KeyManager; import ch.cyberduck.core.ssl.X509TrustManager; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuxeo.onedrive.client.types.Drive; import java.util.Deque; @@ -31,7 +32,7 @@ import static ch.cyberduck.core.onedrive.SharepointListService.*; public class SharepointSession extends AbstractSharepointSession { - private static final Logger log = Logger.getLogger(SharepointSession.class); + private static final Logger log = LogManager.getLogger(SharepointSession.class); public SharepointSession(final Host host, final X509TrustManager trust, final X509KeyManager key) { super(host, trust, key); diff --git a/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphAttributesFinderFeature.java b/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphAttributesFinderFeature.java index c12e69bd689..376321816d2 100644 --- a/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphAttributesFinderFeature.java +++ b/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphAttributesFinderFeature.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.onedrive.GraphSession; import ch.cyberduck.core.webloc.UrlFileWriterFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuxeo.onedrive.client.OneDriveAPIException; import org.nuxeo.onedrive.client.types.DriveItem; import org.nuxeo.onedrive.client.types.FileSystemInfo; @@ -39,7 +40,7 @@ import java.util.Optional; public class GraphAttributesFinderFeature implements AttributesFinder { - private static final Logger log = Logger.getLogger(GraphAttributesFinderFeature.class); + private static final Logger log = LogManager.getLogger(GraphAttributesFinderFeature.class); private final GraphSession session; private final GraphFileIdProvider fileid; diff --git a/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphCopyFeature.java b/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphCopyFeature.java index 997c527f1f0..191127347f1 100644 --- a/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphCopyFeature.java +++ b/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphCopyFeature.java @@ -28,7 +28,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.codec.binary.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuxeo.onedrive.client.CopyOperation; import org.nuxeo.onedrive.client.Files; import org.nuxeo.onedrive.client.OneDriveAPIException; @@ -38,7 +39,7 @@ import java.util.Collections; public class GraphCopyFeature implements Copy { - private static final Logger logger = Logger.getLogger(GraphCopyFeature.class); + private static final Logger logger = LogManager.getLogger(GraphCopyFeature.class); private final GraphSession session; private final GraphAttributesFinderFeature attributes; diff --git a/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphDeleteFeature.java b/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphDeleteFeature.java index 12d682199bd..675841e8d92 100644 --- a/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphDeleteFeature.java +++ b/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphDeleteFeature.java @@ -25,7 +25,8 @@ import ch.cyberduck.core.onedrive.GraphSession; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuxeo.onedrive.client.Files; import org.nuxeo.onedrive.client.OneDriveAPIException; import org.nuxeo.onedrive.client.types.DriveItem; @@ -34,7 +35,7 @@ import java.util.Map; public class GraphDeleteFeature implements Delete { - private static final Logger logger = Logger.getLogger(GraphDeleteFeature.class); + private static final Logger logger = LogManager.getLogger(GraphDeleteFeature.class); private final GraphSession session; private final GraphFileIdProvider fileid; diff --git a/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphFileIdProvider.java b/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphFileIdProvider.java index b68132e0d42..0e21b71d0b6 100644 --- a/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphFileIdProvider.java +++ b/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphFileIdProvider.java @@ -28,10 +28,11 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class GraphFileIdProvider implements FileIdProvider { - private static final Logger log = Logger.getLogger(GraphFileIdProvider.class); + private static final Logger log = LogManager.getLogger(GraphFileIdProvider.class); private final GraphSession session; private final LRUCache cache = LRUCache.build(PreferencesFactory.get().getLong("fileid.cache.size")); diff --git a/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphReadFeature.java b/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphReadFeature.java index f3127cc2202..c15d09e76d7 100644 --- a/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphReadFeature.java +++ b/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphReadFeature.java @@ -31,7 +31,8 @@ import org.apache.commons.io.IOUtils; import org.apache.commons.io.input.NullInputStream; import org.apache.http.HttpStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuxeo.onedrive.client.Files; import org.nuxeo.onedrive.client.OneDriveAPIException; import org.nuxeo.onedrive.client.types.DriveItem; @@ -41,7 +42,7 @@ import java.nio.charset.Charset; public class GraphReadFeature implements Read { - private static final Logger log = Logger.getLogger(GraphReadFeature.class); + private static final Logger log = LogManager.getLogger(GraphReadFeature.class); private final GraphSession session; private final GraphFileIdProvider fileid; diff --git a/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphWriteFeature.java b/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphWriteFeature.java index 7d58ada7840..82a070dfaa9 100644 --- a/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphWriteFeature.java +++ b/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/GraphWriteFeature.java @@ -32,7 +32,8 @@ import ch.cyberduck.core.threading.DefaultRetryCallable; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuxeo.onedrive.client.Files; import org.nuxeo.onedrive.client.OneDriveAPIException; import org.nuxeo.onedrive.client.OneDriveJsonObject; @@ -45,7 +46,7 @@ import java.util.concurrent.atomic.AtomicBoolean; public class GraphWriteFeature implements Write { - private static final Logger log = Logger.getLogger(GraphWriteFeature.class); + private static final Logger log = LogManager.getLogger(GraphWriteFeature.class); private final GraphSession session; private final GraphFileIdProvider fileid; diff --git a/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/sharepoint/GroupListService.java b/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/sharepoint/GroupListService.java index cf49f49b4bd..b8a8c58f43c 100644 --- a/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/sharepoint/GroupListService.java +++ b/onedrive/src/main/java/ch/cyberduck/core/onedrive/features/sharepoint/GroupListService.java @@ -21,7 +21,8 @@ import ch.cyberduck.core.onedrive.SharepointSession; import ch.cyberduck.core.onedrive.features.GraphFileIdProvider; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.nuxeo.onedrive.client.Groups; import org.nuxeo.onedrive.client.types.GroupItem; import org.nuxeo.onedrive.client.types.User; @@ -30,7 +31,7 @@ import java.util.Iterator; public class GroupListService extends AbstractListService { - private static final Logger log = Logger.getLogger(GroupListService.class); + private static final Logger log = LogManager.getLogger(GroupListService.class); private final SharepointSession session; diff --git a/onedrive/src/test/java/ch/cyberduck/core/onedrive/GraphTouchFeatureTest.java b/onedrive/src/test/java/ch/cyberduck/core/onedrive/GraphTouchFeatureTest.java index a4977511c46..3da00b05a29 100644 --- a/onedrive/src/test/java/ch/cyberduck/core/onedrive/GraphTouchFeatureTest.java +++ b/onedrive/src/test/java/ch/cyberduck/core/onedrive/GraphTouchFeatureTest.java @@ -26,7 +26,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import ch.cyberduck.test.IntegrationTest; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.junit.Test; import org.junit.experimental.categories.Category; @@ -38,7 +39,7 @@ @Category(IntegrationTest.class) public class GraphTouchFeatureTest extends AbstractOneDriveTest { - private static final Logger log = Logger.getLogger(GraphTouchFeatureTest.class); + private static final Logger log = LogManager.getLogger(GraphTouchFeatureTest.class); @Test public void testTouch() throws Exception { diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftAccountLoader.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftAccountLoader.java index 124247be40a..a39d65937bd 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftAccountLoader.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftAccountLoader.java @@ -24,7 +24,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.Collections; @@ -37,7 +38,7 @@ import ch.iterate.openstack.swift.model.Region; public class SwiftAccountLoader extends OneTimeSchedulerFeature> { - private static final Logger log = Logger.getLogger(SwiftAccountLoader.class); + private static final Logger log = LogManager.getLogger(SwiftAccountLoader.class); private final SwiftSession session; diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftAttributesFinderFeature.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftAttributesFinderFeature.java index 0ae8162d2f0..fc2e40bc9d7 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftAttributesFinderFeature.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftAttributesFinderFeature.java @@ -36,7 +36,8 @@ import org.apache.commons.lang3.RegExUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; @@ -48,7 +49,7 @@ import ch.iterate.openstack.swift.model.StorageObject; public class SwiftAttributesFinderFeature implements AttributesFinder { - private static final Logger log = Logger.getLogger(SwiftAttributesFinderFeature.class); + private static final Logger log = LogManager.getLogger(SwiftAttributesFinderFeature.class); private final SwiftSession session; private final PathContainerService containerService = new DefaultPathContainerService(); diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftAuthenticationService.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftAuthenticationService.java index 672078248be..ea482d3d48d 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftAuthenticationService.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftAuthenticationService.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.exception.LoginCanceledException; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.net.URI; import java.util.Collections; @@ -44,7 +45,7 @@ import ch.iterate.openstack.swift.method.AuthenticationRequest; public class SwiftAuthenticationService { - private static final Logger log = Logger.getLogger(SwiftAuthenticationService.class); + private static final Logger log = LogManager.getLogger(SwiftAuthenticationService.class); public Set getRequest(final Host bookmark, final LoginCallback prompt) throws LoginCanceledException { diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftContainerListService.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftContainerListService.java index 2e7cecc0be6..b87ce278a3c 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftContainerListService.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftContainerListService.java @@ -29,7 +29,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.EnumSet; @@ -41,7 +42,7 @@ import ch.iterate.openstack.swift.model.Region; public class SwiftContainerListService implements RootListService { - private static final Logger log = Logger.getLogger(SwiftContainerListService.class); + private static final Logger log = LogManager.getLogger(SwiftContainerListService.class); private final SwiftSession session; private final SwiftLocationFeature.SwiftRegion region; diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftContainerSizeLoader.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftContainerSizeLoader.java index e873ac56788..22211141c85 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftContainerSizeLoader.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftContainerSizeLoader.java @@ -21,7 +21,8 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.shared.OneTimeSchedulerFeature; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; @@ -31,7 +32,7 @@ * Preload container size */ public class SwiftContainerSizeLoader extends OneTimeSchedulerFeature { - private static final Logger log = Logger.getLogger(SwiftContainerSizeLoader.class); + private static final Logger log = LogManager.getLogger(SwiftContainerSizeLoader.class); private final SwiftSession session; private final SwiftRegionService regionService; diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftDeleteFeature.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftDeleteFeature.java index 2acaaba8968..baa795cb434 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftDeleteFeature.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftDeleteFeature.java @@ -28,7 +28,8 @@ import ch.cyberduck.core.features.Delete; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.List; @@ -37,7 +38,7 @@ import ch.iterate.openstack.swift.exception.GenericException; public class SwiftDeleteFeature implements Delete { - private static final Logger log = Logger.getLogger(SwiftDeleteFeature.class); + private static final Logger log = LogManager.getLogger(SwiftDeleteFeature.class); private final SwiftSession session; private final PathContainerService containerService = new DefaultPathContainerService(); diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftDistributionConfiguration.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftDistributionConfiguration.java index 76702592608..b6459210767 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftDistributionConfiguration.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftDistributionConfiguration.java @@ -32,7 +32,8 @@ import ch.cyberduck.core.exception.BackgroundException; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.net.URI; @@ -46,7 +47,7 @@ import ch.iterate.openstack.swift.model.ContainerMetadata; public class SwiftDistributionConfiguration implements DistributionConfiguration, Index, DistributionLogging { - private static final Logger log = Logger.getLogger(SwiftDistributionConfiguration.class); + private static final Logger log = LogManager.getLogger(SwiftDistributionConfiguration.class); private final PathContainerService containerService = new DefaultPathContainerService(); private final SwiftSession session; diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftDistributionConfigurationLoader.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftDistributionConfigurationLoader.java index 1aaaf5f36ef..a2df82ec271 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftDistributionConfigurationLoader.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftDistributionConfigurationLoader.java @@ -25,7 +25,8 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.shared.OneTimeSchedulerFeature; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; import java.util.EnumSet; @@ -36,7 +37,7 @@ * Preload CDN configuration */ public class SwiftDistributionConfigurationLoader extends OneTimeSchedulerFeature> { - private static final Logger log = Logger.getLogger(SwiftDistributionConfigurationLoader.class); + private static final Logger log = LogManager.getLogger(SwiftDistributionConfigurationLoader.class); private final SwiftSession session; diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftLargeObjectUploadFeature.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftLargeObjectUploadFeature.java index 0da7bc1374c..c052ae3b4dc 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftLargeObjectUploadFeature.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftLargeObjectUploadFeature.java @@ -42,7 +42,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import ch.cyberduck.core.worker.DefaultExceptionMappingService; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.security.MessageDigest; @@ -56,7 +57,7 @@ import ch.iterate.openstack.swift.model.StorageObject; public class SwiftLargeObjectUploadFeature extends HttpUploadFeature { - private static final Logger log = Logger.getLogger(SwiftLargeObjectUploadFeature.class); + private static final Logger log = LogManager.getLogger(SwiftLargeObjectUploadFeature.class); private final SwiftSession session; private final PathContainerService containerService = new DefaultPathContainerService(); diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftLargeUploadWriteFeature.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftLargeUploadWriteFeature.java index 8faa9cbc37d..6f4f52db072 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftLargeUploadWriteFeature.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftLargeUploadWriteFeature.java @@ -30,7 +30,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.http.entity.ByteArrayEntity; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -45,7 +46,7 @@ import ch.iterate.openstack.swift.model.StorageObject; public class SwiftLargeUploadWriteFeature implements MultipartWrite> { - private static final Logger log = Logger.getLogger(SwiftLargeUploadWriteFeature.class); + private static final Logger log = LogManager.getLogger(SwiftLargeUploadWriteFeature.class); private final PathContainerService containerService = new DefaultPathContainerService(); private final SwiftSession session; diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftLocationFeature.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftLocationFeature.java index ac23cfb6ccb..9eb72e240be 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftLocationFeature.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftLocationFeature.java @@ -29,7 +29,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.ArrayList; @@ -47,7 +48,7 @@ import ch.iterate.openstack.swift.model.Region; public class SwiftLocationFeature implements Location { - private static final Logger log = Logger.getLogger(SwiftLocationFeature.class); + private static final Logger log = LogManager.getLogger(SwiftLocationFeature.class); private final SwiftSession session; private final PathContainerService containerService = new DefaultPathContainerService(); diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftMetadataFeature.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftMetadataFeature.java index 9a679531e51..91f9d7c3e3b 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftMetadataFeature.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftMetadataFeature.java @@ -29,7 +29,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.Map; @@ -38,7 +39,7 @@ import ch.iterate.openstack.swift.model.ContainerMetadata; public class SwiftMetadataFeature implements Headers { - private static final Logger log = Logger.getLogger(SwiftMetadataFeature.class); + private static final Logger log = LogManager.getLogger(SwiftMetadataFeature.class); private final SwiftSession session; private final PathContainerService containerService = new DefaultPathContainerService(); diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftObjectListService.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftObjectListService.java index 77f161b6e49..74edcae6d97 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftObjectListService.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftObjectListService.java @@ -31,7 +31,8 @@ import ch.cyberduck.core.preferences.HostPreferences; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.EnumSet; @@ -41,7 +42,7 @@ import ch.iterate.openstack.swift.model.StorageObject; public class SwiftObjectListService implements ListService { - private static final Logger log = Logger.getLogger(SwiftObjectListService.class); + private static final Logger log = LogManager.getLogger(SwiftObjectListService.class); private final SwiftSession session; private final PathContainerService containerService = new DefaultPathContainerService(); diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftQuotaFeature.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftQuotaFeature.java index 05f8c231229..eeb84735880 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftQuotaFeature.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftQuotaFeature.java @@ -21,7 +21,8 @@ import ch.cyberduck.core.features.Quota; import org.apache.http.HttpStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.EnumSet; @@ -30,7 +31,7 @@ import ch.iterate.openstack.swift.model.Region; public class SwiftQuotaFeature implements Quota { - private static final Logger log = Logger.getLogger(SwiftQuotaFeature.class); + private static final Logger log = LogManager.getLogger(SwiftQuotaFeature.class); private final SwiftSession session; diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftReadFeature.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftReadFeature.java index f2688c28cbd..4d87314a145 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftReadFeature.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftReadFeature.java @@ -30,7 +30,8 @@ import ch.cyberduck.core.io.Checksum; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; @@ -39,7 +40,7 @@ import ch.iterate.openstack.swift.exception.GenericException; public class SwiftReadFeature implements Read { - private static final Logger log = Logger.getLogger(SwiftReadFeature.class); + private static final Logger log = LogManager.getLogger(SwiftReadFeature.class); private final PathContainerService containerService = new DefaultPathContainerService(); diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftRegionService.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftRegionService.java index eec5f8a1c89..b04337b3b66 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftRegionService.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftRegionService.java @@ -25,12 +25,13 @@ import ch.cyberduck.core.features.Location; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import ch.iterate.openstack.swift.model.Region; public class SwiftRegionService { - private static final Logger log = Logger.getLogger(SwiftRegionService.class); + private static final Logger log = LogManager.getLogger(SwiftRegionService.class); private final SwiftSession session; diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftSegmentService.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftSegmentService.java index cb4499d9a58..82e2c008208 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftSegmentService.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftSegmentService.java @@ -32,7 +32,8 @@ import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.nio.charset.Charset; @@ -48,7 +49,7 @@ import com.google.gson.JsonObject; public class SwiftSegmentService { - private static final Logger log = Logger.getLogger(SwiftSegmentService.class); + private static final Logger log = LogManager.getLogger(SwiftSegmentService.class); private final SwiftSession session; diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftSession.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftSession.java index 9f357988294..bed2c4d8bcf 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftSession.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftSession.java @@ -41,7 +41,8 @@ import ch.cyberduck.core.threading.CancelCallback; import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.HashSet; @@ -57,7 +58,7 @@ import ch.iterate.openstack.swift.model.Region; public class SwiftSession extends HttpSession { - private static final Logger log = Logger.getLogger(SwiftSession.class); + private static final Logger log = LogManager.getLogger(SwiftSession.class); private final SwiftRegionService regionService = new SwiftRegionService(this); diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftSmallObjectUploadFeature.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftSmallObjectUploadFeature.java index 6a8519cefa2..934ef8dd5f0 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftSmallObjectUploadFeature.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftSmallObjectUploadFeature.java @@ -24,7 +24,8 @@ import ch.cyberduck.core.io.Checksum; import ch.cyberduck.core.preferences.HostPreferences; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; @@ -35,7 +36,7 @@ import ch.iterate.openstack.swift.model.StorageObject; public class SwiftSmallObjectUploadFeature extends HttpUploadFeature { - private static final Logger log = Logger.getLogger(SwiftSmallObjectUploadFeature.class); + private static final Logger log = LogManager.getLogger(SwiftSmallObjectUploadFeature.class); private final SwiftSession session; diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftThresholdUploadService.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftThresholdUploadService.java index b3cc7d8cb25..f333eea1f8d 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftThresholdUploadService.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftThresholdUploadService.java @@ -29,7 +29,8 @@ import ch.cyberduck.core.preferences.HostPreferences; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.List; @@ -37,7 +38,7 @@ import ch.iterate.openstack.swift.model.StorageObject; public class SwiftThresholdUploadService implements Upload { - private static final Logger log = Logger.getLogger(SwiftThresholdUploadService.class); + private static final Logger log = LogManager.getLogger(SwiftThresholdUploadService.class); private final SwiftSession session; private final SwiftRegionService regionService; diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftUrlProvider.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftUrlProvider.java index 07ee2c06a4a..5174274f8e7 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftUrlProvider.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftUrlProvider.java @@ -38,7 +38,8 @@ import org.apache.commons.codec.binary.Hex; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.Constants; import javax.crypto.Mac; @@ -61,7 +62,7 @@ import ch.iterate.openstack.swift.model.Region; public class SwiftUrlProvider implements UrlProvider { - private static final Logger log = Logger.getLogger(SwiftUrlProvider.class); + private static final Logger log = LogManager.getLogger(SwiftUrlProvider.class); private final PathContainerService containerService = new DefaultPathContainerService(); diff --git a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftWriteFeature.java b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftWriteFeature.java index bed3585e5a3..409e56fb2eb 100644 --- a/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftWriteFeature.java +++ b/openstack/src/main/java/ch/cyberduck/core/openstack/SwiftWriteFeature.java @@ -37,7 +37,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.http.entity.AbstractHttpEntity; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.HashMap; @@ -47,7 +48,7 @@ import ch.iterate.openstack.swift.model.StorageObject; public class SwiftWriteFeature extends AbstractHttpWriteFeature implements Write { - private static final Logger log = Logger.getLogger(SwiftSession.class); + private static final Logger log = LogManager.getLogger(SwiftSession.class); private final PathContainerService containerService = new DefaultPathContainerService(); diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/ApplicationUserDefaultsPreferences.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/ApplicationUserDefaultsPreferences.java index 6ad290acf6a..d593b16cb29 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/ApplicationUserDefaultsPreferences.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/ApplicationUserDefaultsPreferences.java @@ -42,12 +42,18 @@ import ch.cyberduck.ui.cocoa.controller.UploadPromptController; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.apache.log4j.PatternLayout; -import org.apache.log4j.RollingFileAppender; +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.core.Appender; +import org.apache.logging.log4j.core.LoggerContext; +import org.apache.logging.log4j.core.appender.RollingFileAppender; +import org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy; +import org.apache.logging.log4j.core.appender.rolling.SizeBasedTriggeringPolicy; +import org.apache.logging.log4j.core.config.AppenderRef; +import org.apache.logging.log4j.core.config.Configuration; +import org.apache.logging.log4j.core.config.LoggerConfig; +import org.apache.logging.log4j.core.layout.PatternLayout; -import java.io.IOException; import java.nio.charset.StandardCharsets; public class ApplicationUserDefaultsPreferences extends ApplicationPreferences { @@ -122,18 +128,24 @@ protected void setFactories() { @Override protected void configureLogging(final String level) { super.configureLogging(level); - final Logger root = Logger.getRootLogger(); final Local file = LocalFactory.get(LogDirectoryFinderFactory.get().find().getAbsolute(), String.format("%s.log", StringUtils.replaceChars(StringUtils.lowerCase( - this.getProperty("application.name")), StringUtils.SPACE, StringUtils.EMPTY))); - try { - RollingFileAppender appender = new RollingFileAppender(new PatternLayout("%d [%t] %-5p %c - %m%n"), file.getAbsolute(), true); - appender.setEncoding(StandardCharsets.UTF_8.name()); - appender.setMaxFileSize(Level.DEBUG.toString().equals(level) ? "250MB" : "10MB"); - appender.setMaxBackupIndex(0); - root.addAppender(appender); - } - catch(IOException e) { - // Ignore failure - } + this.getProperty("application.name")), StringUtils.SPACE, StringUtils.EMPTY))); + final LoggerContext ctx = (LoggerContext) LogManager.getContext(false); + final Configuration config = ctx.getConfiguration(); + final Appender appender = RollingFileAppender.newBuilder() + .withFileName(file.getAbsolute()) + .withPolicy(Level.DEBUG.toString().equals(level) ? SizeBasedTriggeringPolicy.createPolicy("250MB") : SizeBasedTriggeringPolicy.createPolicy("10MB")) + .withStrategy(DefaultRolloverStrategy.newBuilder().withMin("1").withMax("1").build()) + .setLayout(PatternLayout.newBuilder().withConfiguration(config).withPattern("%d [%t] %-5p %c - %m%n").withCharset(StandardCharsets.UTF_8).build()) + .build(); + appender.start(); + config.addAppender(appender); + final AppenderRef ref = AppenderRef.createAppenderRef("File", null, null); + final AppenderRef[] refs = new AppenderRef[]{ref}; + LoggerConfig loggerConfig = LoggerConfig.createLogger(false, Level.getLevel(level), LogManager.ROOT_LOGGER_NAME, + "true", refs, null, config, null); + loggerConfig.addAppender(appender, null, null); + config.addLogger(LogManager.ROOT_LOGGER_NAME, loggerConfig); + ctx.updateLoggers(); } } diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/callback/PromptCertificateIdentityCallback.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/callback/PromptCertificateIdentityCallback.java index 6307a88e4a3..dda03c9bd07 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/callback/PromptCertificateIdentityCallback.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/callback/PromptCertificateIdentityCallback.java @@ -33,7 +33,8 @@ import ch.cyberduck.core.keychain.SecurityFunctions; import ch.cyberduck.core.threading.DefaultMainAction; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import java.security.cert.X509Certificate; @@ -42,7 +43,7 @@ import java.util.concurrent.atomic.AtomicReference; public class PromptCertificateIdentityCallback implements CertificateIdentityCallback { - private static final Logger log = Logger.getLogger(PromptCertificateIdentityCallback.class); + private static final Logger log = LogManager.getLogger(PromptCertificateIdentityCallback.class); private final Controller controller; diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/callback/PromptCertificateTrustCallback.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/callback/PromptCertificateTrustCallback.java index 00e017c4d92..2ec8bbc9b91 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/callback/PromptCertificateTrustCallback.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/callback/PromptCertificateTrustCallback.java @@ -32,7 +32,8 @@ import ch.cyberduck.core.keychain.SecurityFunctions; import ch.cyberduck.core.threading.DefaultMainAction; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import java.security.cert.X509Certificate; @@ -42,7 +43,7 @@ import com.sun.jna.ptr.PointerByReference; public class PromptCertificateTrustCallback implements CertificateTrustCallback { - private static final Logger log = Logger.getLogger(PromptCertificateTrustCallback.class); + private static final Logger log = LogManager.getLogger(PromptCertificateTrustCallback.class); private final Controller controller; diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/callback/PromptHostKeyCallback.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/callback/PromptHostKeyCallback.java index c4121105294..97559a121c8 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/callback/PromptHostKeyCallback.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/callback/PromptHostKeyCallback.java @@ -29,7 +29,8 @@ import ch.cyberduck.ui.cocoa.controller.ChangedHostKeyAlertController; import ch.cyberduck.ui.cocoa.controller.UnknownHostKeyAlertController; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.security.PublicKey; @@ -37,7 +38,7 @@ * Using known_hosts from OpenSSH to store accepted host keys. */ public class PromptHostKeyCallback extends OpenSSHHostKeyVerifier { - private static final Logger log = Logger.getLogger(PromptHostKeyCallback.class); + private static final Logger log = LogManager.getLogger(PromptHostKeyCallback.class); private final WindowController controller; diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/callback/PromptLoginCallback.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/callback/PromptLoginCallback.java index baac199d306..0a41d5f8350 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/callback/PromptLoginCallback.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/callback/PromptLoginCallback.java @@ -41,14 +41,15 @@ import ch.cyberduck.ui.cocoa.controller.ProgressAlertController; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import org.rococoa.Rococoa; import java.util.concurrent.CountDownLatch; public final class PromptLoginCallback extends PromptPasswordCallback implements LoginCallback { - private static final Logger log = Logger.getLogger(PromptLoginCallback.class); + private static final Logger log = LogManager.getLogger(PromptLoginCallback.class); private final Preferences preferences = PreferencesFactory.get(); diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/AbstractPathTableDelegate.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/AbstractPathTableDelegate.java index 82cfca111f1..23687d4847d 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/AbstractPathTableDelegate.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/AbstractPathTableDelegate.java @@ -35,12 +35,13 @@ import ch.cyberduck.ui.comparator.TimestampComparator; import ch.cyberduck.ui.comparator.VersionComparator; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Comparator; public abstract class AbstractPathTableDelegate extends AbstractTableDelegate { - private static final Logger log = Logger.getLogger(AbstractTableDelegate.class); + private static final Logger log = LogManager.getLogger(AbstractTableDelegate.class); protected AbstractPathTableDelegate(final NSTableColumn selectedColumn) { super(selectedColumn); diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/ActivityController.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/ActivityController.java index def6784f3cd..11dd491a58b 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/ActivityController.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/ActivityController.java @@ -31,7 +31,8 @@ import ch.cyberduck.core.threading.BackgroundAction; import ch.cyberduck.core.threading.BackgroundActionRegistry; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.ID; import org.rococoa.Rococoa; import org.rococoa.cocoa.CGFloat; @@ -42,7 +43,7 @@ import java.util.Map; public final class ActivityController extends WindowController { - private static final Logger log = Logger.getLogger(ActivityController.class); + private static final Logger log = LogManager.getLogger(ActivityController.class); private final BackgroundActionRegistry registry = BackgroundActionRegistry.global(); diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/BookmarkController.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/BookmarkController.java index a29d5a5313f..bd9e138745e 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/BookmarkController.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/BookmarkController.java @@ -48,7 +48,8 @@ import ch.cyberduck.ui.LoginInputValidator; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import org.rococoa.ID; import org.rococoa.Rococoa; @@ -63,7 +64,7 @@ import java.util.Objects; public class BookmarkController extends SheetController implements CollectionListener { - private static final Logger log = Logger.getLogger(BookmarkController.class); + private static final Logger log = LogManager.getLogger(BookmarkController.class); private static NSPoint cascade = new NSPoint(0, 0); diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/BrowserController.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/BrowserController.java index f2f53ee8cc7..78ed3889f2e 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/BrowserController.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/BrowserController.java @@ -130,7 +130,8 @@ import org.apache.commons.codec.binary.Base64; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import org.rococoa.ID; import org.rococoa.Rococoa; @@ -159,7 +160,7 @@ import java.util.Set; public class BrowserController extends WindowController implements NSToolbar.Delegate, NSMenu.Validation, QLPreviewPanelController { - private static final Logger log = Logger.getLogger(BrowserController.class); + private static final Logger log = LogManager.getLogger(BrowserController.class); private static NSPoint cascade = new NSPoint(0, 0); diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/DefaultBookmarkController.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/DefaultBookmarkController.java index 8238cb91ca5..2cf9d6a4558 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/DefaultBookmarkController.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/DefaultBookmarkController.java @@ -40,7 +40,8 @@ import ch.cyberduck.ui.LoginInputValidator; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import org.rococoa.Rococoa; import org.rococoa.Selector; @@ -53,7 +54,7 @@ import java.util.TimeZone; public class DefaultBookmarkController extends BookmarkController { - private static final Logger log = Logger.getLogger(DefaultBookmarkController.class); + private static final Logger log = LogManager.getLogger(DefaultBookmarkController.class); private static final String TIMEZONE_CONTINENT_PREFIXES = "^(Africa|America|Asia|Atlantic|Australia|Europe|Indian|Pacific)/.*"; diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/DownloadController.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/DownloadController.java index f77e49af883..78dfcf28210 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/DownloadController.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/DownloadController.java @@ -36,13 +36,14 @@ import ch.cyberduck.core.transfer.TransferOptions; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.cocoa.foundation.NSRect; import java.util.EnumSet; public class DownloadController extends AlertController { - private static final Logger log = Logger.getLogger(DownloadController.class); + private static final Logger log = LogManager.getLogger(DownloadController.class); protected final NSTextField urlField = NSTextField.textfieldWithFrame(new NSRect(0, 22)); diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/InfoController.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/InfoController.java index cf354c76fac..08c1b04d2fa 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/InfoController.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/InfoController.java @@ -71,7 +71,8 @@ import ch.cyberduck.ui.cocoa.callback.PromptRecursiveCallback; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import org.rococoa.ID; import org.rococoa.Rococoa; @@ -94,7 +95,7 @@ import java.util.TimeZone; public class InfoController extends ToolbarWindowController { - private static final Logger log = Logger.getLogger(InfoController.class); + private static final Logger log = LogManager.getLogger(InfoController.class); private static NSPoint cascade = new NSPoint(0, 0); diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/MainController.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/MainController.java index f278f4de2ca..b3d6b891221 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/MainController.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/MainController.java @@ -93,7 +93,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.http.NameValuePair; import org.apache.http.client.utils.URLEncodedUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import org.rococoa.ID; import org.rococoa.Rococoa; @@ -122,7 +123,7 @@ * Setting the main menu and implements application delegate methods */ public class MainController extends BundleController implements NSApplication.Delegate, NSMenu.Validation { - private static final Logger log = Logger.getLogger(MainController.class); + private static final Logger log = LogManager.getLogger(MainController.class); /** * Apple event constants
**********************************************************************************************
diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/PreferencesController.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/PreferencesController.java index 7b742e062b9..d3fe41d0375 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/PreferencesController.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/PreferencesController.java @@ -55,8 +55,10 @@ import ch.cyberduck.ui.cocoa.view.BookmarkCell; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.apache.logging.log4j.core.LoggerContext; import org.rococoa.Foundation; import org.rococoa.ID; import org.rococoa.Rococoa; @@ -77,7 +79,7 @@ import java.util.regex.PatternSyntaxException; public class PreferencesController extends ToolbarWindowController { - private static final Logger log = Logger.getLogger(PreferencesController.class); + private static final Logger log = LogManager.getLogger(PreferencesController.class); private final NSNotificationCenter notificationCenter = NSNotificationCenter.defaultCenter(); @@ -2400,7 +2402,8 @@ public void setLogCheckbox(final NSButton b) { this.logCheckbox = b; this.logCheckbox.setTarget(this.id()); this.logCheckbox.setAction(Foundation.selector("logCheckboxClicked:")); - this.logCheckbox.setState(Level.DEBUG.equals(Logger.getRootLogger().getLevel()) ? NSCell.NSOnState : NSCell.NSOffState); + this.logCheckbox.setState(Level.DEBUG.equals(LoggerContext.getContext(false).getConfiguration().getRootLogger().getLevel()) ? + NSCell.NSOnState : NSCell.NSOffState); } @Action @@ -2430,7 +2433,7 @@ public void logShowButtonClicked(final NSButton sender) { public Void call() { try { final Local file = LocalFactory.get(LogDirectoryFinderFactory.get().find().getAbsolute(), String.format("%s.log", StringUtils.replaceChars(StringUtils.lowerCase( - preferences.getProperty("application.name")), StringUtils.SPACE, StringUtils.EMPTY))); + preferences.getProperty("application.name")), StringUtils.SPACE, StringUtils.EMPTY))); if(!RevealServiceFactory.get().reveal(file)) { log.warn(String.format("Failure reveal log file %s", file)); } diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/ProfilesPreferencesController.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/ProfilesPreferencesController.java index baffa9cd696..5dd95cc66f5 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/ProfilesPreferencesController.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/ProfilesPreferencesController.java @@ -50,7 +50,8 @@ import ch.cyberduck.core.serializer.impl.dd.ProfilePlistReader; import org.apache.commons.lang.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import org.rococoa.ID; import org.rococoa.cocoa.CGFloat; @@ -67,7 +68,7 @@ import java.util.stream.Collectors; public class ProfilesPreferencesController extends BundleController { - private static final Logger log = Logger.getLogger(ProfilesPreferencesController.class); + private static final Logger log = LogManager.getLogger(ProfilesPreferencesController.class); private final ProtocolFactory protocols = ProtocolFactory.get(); diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/ProgressAlertController.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/ProgressAlertController.java index a2d0d861caa..5b42580cf8c 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/ProgressAlertController.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/ProgressAlertController.java @@ -28,14 +28,15 @@ import ch.cyberduck.core.ProviderHelpServiceFactory; import ch.cyberduck.core.StringAppender; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.cocoa.foundation.NSPoint; import org.rococoa.cocoa.foundation.NSRect; import java.util.concurrent.CountDownLatch; public class ProgressAlertController extends AlertController { - private static final Logger log = Logger.getLogger(ProgressAlertController.class); + private static final Logger log = LogManager.getLogger(ProgressAlertController.class); private final CountDownLatch signal; private final String title; diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/TransferController.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/TransferController.java index 054c8fa7f4e..ba79b7c9f26 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/TransferController.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/TransferController.java @@ -30,8 +30,6 @@ import ch.cyberduck.core.AbstractCollectionListener; import ch.cyberduck.core.Cache; import ch.cyberduck.core.Collection; -import ch.cyberduck.core.DisabledTranscriptListener; -import ch.cyberduck.core.Factory; import ch.cyberduck.core.Host; import ch.cyberduck.core.LocalFactory; import ch.cyberduck.core.LocaleFactory; @@ -76,7 +74,8 @@ import ch.cyberduck.ui.cocoa.toolbar.TransferToolbarValidator; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import org.rococoa.ID; import org.rococoa.Rococoa; @@ -92,7 +91,7 @@ import java.util.StringTokenizer; public final class TransferController extends WindowController implements TransferListener, NSToolbar.Delegate, NSMenu.Validation { - private static final Logger log = Logger.getLogger(TransferController.class); + private static final Logger log = LogManager.getLogger(TransferController.class); private final TransferToolbarValidator toolbarValidator = new TransferToolbarValidator(this); diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/TransferPromptController.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/TransferPromptController.java index 3fd1e30266f..c05a37aa54a 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/TransferPromptController.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/controller/TransferPromptController.java @@ -51,7 +51,8 @@ import ch.cyberduck.ui.cocoa.view.OutlineCell; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import org.rococoa.ID; import org.rococoa.Rococoa; @@ -62,7 +63,7 @@ import java.text.MessageFormat; public abstract class TransferPromptController extends SheetController implements TransferPrompt, ProgressListener, TranscriptListener { - private static final Logger log = Logger.getLogger(TransferPromptController.class); + private static final Logger log = LogManager.getLogger(TransferPromptController.class); private static final NSAttributedString UNKNOWN_STRING = NSAttributedString.attributedStringWithAttributes( LocaleFactory.localizedString("Unknown"), diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/BookmarkTableDataSource.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/BookmarkTableDataSource.java index b18e0c3ad69..353db5a8067 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/BookmarkTableDataSource.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/BookmarkTableDataSource.java @@ -49,7 +49,8 @@ import ch.cyberduck.ui.cocoa.controller.TransferControllerFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Rococoa; import org.rococoa.cocoa.foundation.NSInteger; import org.rococoa.cocoa.foundation.NSPoint; @@ -64,7 +65,7 @@ import java.util.concurrent.TimeUnit; public class BookmarkTableDataSource extends ListDataSource { - private static final Logger log = Logger.getLogger(BookmarkTableDataSource.class); + private static final Logger log = LogManager.getLogger(BookmarkTableDataSource.class); protected final BrowserController controller; diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/BrowserListViewDataSource.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/BrowserListViewDataSource.java index 67fe90d5f86..9368b45bcc3 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/BrowserListViewDataSource.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/BrowserListViewDataSource.java @@ -28,7 +28,8 @@ import ch.cyberduck.core.Path; import ch.cyberduck.ui.cocoa.controller.BrowserController; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.cocoa.foundation.NSInteger; import org.rococoa.cocoa.foundation.NSUInteger; @@ -36,7 +37,7 @@ import java.util.List; public class BrowserListViewDataSource extends BrowserTableDataSource implements NSTableView.DataSource { - private static final Logger log = Logger.getLogger(BrowserListViewDataSource.class); + private static final Logger log = LogManager.getLogger(BrowserListViewDataSource.class); public BrowserListViewDataSource(final BrowserController controller, final Cache cache) { super(controller, cache); diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/BrowserOutlineViewDataSource.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/BrowserOutlineViewDataSource.java index d1e4ae4d3b8..9914a0c1c29 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/BrowserOutlineViewDataSource.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/BrowserOutlineViewDataSource.java @@ -32,7 +32,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import ch.cyberduck.ui.cocoa.controller.BrowserController; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.cocoa.foundation.NSInteger; import org.rococoa.cocoa.foundation.NSUInteger; @@ -40,7 +41,7 @@ import java.util.List; public class BrowserOutlineViewDataSource extends BrowserTableDataSource implements NSOutlineView.DataSource { - private static final Logger log = Logger.getLogger(BrowserOutlineViewDataSource.class); + private static final Logger log = LogManager.getLogger(BrowserOutlineViewDataSource.class); public BrowserOutlineViewDataSource(final BrowserController controller, final Cache cache) { super(controller, cache); diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/BrowserTableDataSource.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/BrowserTableDataSource.java index cdca56b4069..d301e3287f5 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/BrowserTableDataSource.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/BrowserTableDataSource.java @@ -78,7 +78,8 @@ import ch.cyberduck.ui.cocoa.controller.MoveController; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Rococoa; import org.rococoa.cocoa.foundation.NSInteger; import org.rococoa.cocoa.foundation.NSPoint; @@ -97,7 +98,7 @@ import java.util.Set; public abstract class BrowserTableDataSource extends ProxyController implements NSDraggingSource { - private static final Logger log = Logger.getLogger(BrowserTableDataSource.class); + private static final Logger log = LogManager.getLogger(BrowserTableDataSource.class); private final SizeFormatter sizeFormatter = SizeFormatterFactory.get(); private final AbstractUserDateFormatter dateFormatter = UserDateFormatterFactory.get(); diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/TransferPromptDataSource.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/TransferPromptDataSource.java index b299b796104..03649f9b707 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/TransferPromptDataSource.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/TransferPromptDataSource.java @@ -40,7 +40,8 @@ import ch.cyberduck.core.worker.TransferPromptListWorker; import ch.cyberduck.ui.cocoa.controller.TransferPromptController; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Rococoa; import org.rococoa.cocoa.foundation.NSInteger; @@ -49,7 +50,7 @@ import java.util.Map; public abstract class TransferPromptDataSource extends OutlineDataSource { - private static final Logger log = Logger.getLogger(TransferPromptDataSource.class); + private static final Logger log = LogManager.getLogger(TransferPromptDataSource.class); private final TransferPromptController controller; diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/TransferTableDataSource.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/TransferTableDataSource.java index fcdcd15a075..bf964acd5a2 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/TransferTableDataSource.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/datasource/TransferTableDataSource.java @@ -42,7 +42,8 @@ import ch.cyberduck.ui.cocoa.controller.TransferControllerFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.cocoa.foundation.NSInteger; import org.rococoa.cocoa.foundation.NSUInteger; @@ -53,7 +54,7 @@ import java.util.Map; public class TransferTableDataSource extends ListDataSource { - private static final Logger log = Logger.getLogger(TransferTableDataSource.class); + private static final Logger log = LogManager.getLogger(TransferTableDataSource.class); private final Map controllers = new HashMap(); diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/AbstractMenuDelegate.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/AbstractMenuDelegate.java index 19b65fa24bd..636985fef3a 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/AbstractMenuDelegate.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/AbstractMenuDelegate.java @@ -24,7 +24,8 @@ import ch.cyberduck.binding.application.NSMenuItem; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.ID; import org.rococoa.Selector; import org.rococoa.cocoa.foundation.NSInteger; @@ -32,7 +33,7 @@ import java.util.concurrent.atomic.AtomicBoolean; public abstract class AbstractMenuDelegate extends ProxyController implements NSMenu.Delegate, NSMenu.Validation { - private static final Logger log = Logger.getLogger(AbstractMenuDelegate.class); + private static final Logger log = LogManager.getLogger(AbstractMenuDelegate.class); /** * Menu needs revalidation diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/BookmarkMenuDelegate.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/BookmarkMenuDelegate.java index 148485c3b5f..77186daca44 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/BookmarkMenuDelegate.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/BookmarkMenuDelegate.java @@ -41,7 +41,8 @@ import ch.cyberduck.ui.cocoa.view.BookmarkCell; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import org.rococoa.Selector; import org.rococoa.cocoa.foundation.NSInteger; @@ -49,7 +50,7 @@ import java.text.MessageFormat; public class BookmarkMenuDelegate extends CollectionMenuDelegate { - private static final Logger log = Logger.getLogger(BookmarkMenuDelegate.class); + private static final Logger log = LogManager.getLogger(BookmarkMenuDelegate.class); private static final int BOOKMARKS_INDEX = 8; diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/CopyURLMenuDelegate.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/CopyURLMenuDelegate.java index 2292b4be3be..0e9e0fd7301 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/CopyURLMenuDelegate.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/CopyURLMenuDelegate.java @@ -28,14 +28,15 @@ import ch.cyberduck.core.UrlProvider; import ch.cyberduck.core.pool.SessionPool; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.Iterator; import java.util.List; public abstract class CopyURLMenuDelegate extends URLMenuDelegate { - private static final Logger log = Logger.getLogger(CopyURLMenuDelegate.class); + private static final Logger log = LogManager.getLogger(CopyURLMenuDelegate.class); @Override protected String getKeyEquivalent() { diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/HistoryMenuDelegate.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/HistoryMenuDelegate.java index c83eea6b0d0..9f36622ef01 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/HistoryMenuDelegate.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/HistoryMenuDelegate.java @@ -37,7 +37,8 @@ import ch.cyberduck.ui.cocoa.controller.MainController; import ch.cyberduck.ui.cocoa.view.BookmarkCell; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import org.rococoa.Selector; import org.rococoa.cocoa.foundation.NSInteger; @@ -45,7 +46,7 @@ import java.util.Date; public class HistoryMenuDelegate extends CollectionMenuDelegate { - private static final Logger log = Logger.getLogger(HistoryMenuDelegate.class); + private static final Logger log = LogManager.getLogger(HistoryMenuDelegate.class); private final AbstractHostCollection collection = HistoryCollection.defaultCollection(); diff --git a/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/RendezvousMenuDelegate.java b/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/RendezvousMenuDelegate.java index 694a02b87e2..a0df1c6b91e 100644 --- a/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/RendezvousMenuDelegate.java +++ b/osx/src/main/java/ch/cyberduck/ui/cocoa/delegate/RendezvousMenuDelegate.java @@ -32,13 +32,14 @@ import ch.cyberduck.core.resources.IconCacheFactory; import ch.cyberduck.ui.cocoa.controller.MainController; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.rococoa.Foundation; import org.rococoa.Selector; import org.rococoa.cocoa.foundation.NSInteger; public class RendezvousMenuDelegate extends CollectionMenuDelegate { - private static final Logger log = Logger.getLogger(RendezvousMenuDelegate.class); + private static final Logger log = LogManager.getLogger(RendezvousMenuDelegate.class); private final AbstractHostCollection collection; diff --git a/pom.xml b/pom.xml index 7162aa6a0cf..64926dd0829 100644 --- a/pom.xml +++ b/pom.xml @@ -193,18 +193,23 @@ 2.8.9 - log4j - log4j - 1.2.17 + org.apache.logging.log4j + log4j-api + 2.17.0 - org.slf4j - slf4j-api - ${slf4j-version} + org.apache.logging.log4j + log4j-core + 2.17.0 + + + org.apache.logging.log4j + log4j-slf4j-impl + 2.17.0 org.slf4j - slf4j-log4j12 + slf4j-api ${slf4j-version} @@ -744,8 +749,12 @@ - log4j - log4j + org.apache.logging.log4j + log4j-api + + + org.apache.logging.log4j + log4j-core diff --git a/s3/src/main/java/ch/cyberduck/core/auth/AWSCredentialsConfigurator.java b/s3/src/main/java/ch/cyberduck/core/auth/AWSCredentialsConfigurator.java index da837a73710..0a757f6b16a 100644 --- a/s3/src/main/java/ch/cyberduck/core/auth/AWSCredentialsConfigurator.java +++ b/s3/src/main/java/ch/cyberduck/core/auth/AWSCredentialsConfigurator.java @@ -20,7 +20,8 @@ import ch.cyberduck.core.Host; import ch.cyberduck.core.LoginOptions; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.security.ProviderCredentials; import com.amazonaws.SdkClientException; @@ -31,7 +32,7 @@ import com.amazonaws.auth.AWSStaticCredentialsProvider; public class AWSCredentialsConfigurator implements CredentialsConfigurator { - private static final Logger log = Logger.getLogger(AWSCredentialsConfigurator.class); + private static final Logger log = LogManager.getLogger(AWSCredentialsConfigurator.class); private final AWSCredentialsProvider[] providers; diff --git a/s3/src/main/java/ch/cyberduck/core/cloudfront/CloudFrontDistributionConfiguration.java b/s3/src/main/java/ch/cyberduck/core/cloudfront/CloudFrontDistributionConfiguration.java index 4656fc4a6ba..e6eba8fa0be 100644 --- a/s3/src/main/java/ch/cyberduck/core/cloudfront/CloudFrontDistributionConfiguration.java +++ b/s3/src/main/java/ch/cyberduck/core/cloudfront/CloudFrontDistributionConfiguration.java @@ -52,7 +52,8 @@ import ch.cyberduck.core.ssl.X509TrustManager; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.utils.ServiceUtils; import java.net.URI; @@ -74,7 +75,7 @@ * Amazon CloudFront CDN configuration. */ public class CloudFrontDistributionConfiguration implements DistributionConfiguration, Purge, Index, DistributionLogging, Cname { - private static final Logger log = Logger.getLogger(CloudFrontDistributionConfiguration.class); + private static final Logger log = LogManager.getLogger(CloudFrontDistributionConfiguration.class); private final Preferences preferences = PreferencesFactory.get(); diff --git a/s3/src/main/java/ch/cyberduck/core/cloudfront/CloudFrontDistributionConfigurationPreloader.java b/s3/src/main/java/ch/cyberduck/core/cloudfront/CloudFrontDistributionConfigurationPreloader.java index a5b305170d3..20dc262b237 100644 --- a/s3/src/main/java/ch/cyberduck/core/cloudfront/CloudFrontDistributionConfigurationPreloader.java +++ b/s3/src/main/java/ch/cyberduck/core/cloudfront/CloudFrontDistributionConfigurationPreloader.java @@ -28,7 +28,8 @@ import ch.cyberduck.core.s3.S3Session; import ch.cyberduck.core.shared.OneTimeSchedulerFeature; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; import java.util.EnumSet; @@ -36,7 +37,7 @@ import java.util.Set; public class CloudFrontDistributionConfigurationPreloader extends OneTimeSchedulerFeature> { - private static final Logger log = Logger.getLogger(CloudFrontDistributionConfigurationPreloader.class); + private static final Logger log = LogManager.getLogger(CloudFrontDistributionConfigurationPreloader.class); private final S3Session session; diff --git a/s3/src/main/java/ch/cyberduck/core/cloudfront/CustomOriginCloudFrontDistributionConfiguration.java b/s3/src/main/java/ch/cyberduck/core/cloudfront/CustomOriginCloudFrontDistributionConfiguration.java index e272d21f7de..653482f972d 100644 --- a/s3/src/main/java/ch/cyberduck/core/cloudfront/CustomOriginCloudFrontDistributionConfiguration.java +++ b/s3/src/main/java/ch/cyberduck/core/cloudfront/CustomOriginCloudFrontDistributionConfiguration.java @@ -36,7 +36,8 @@ import ch.cyberduck.core.ssl.X509KeyManager; import ch.cyberduck.core.ssl.X509TrustManager; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.net.URI; import java.util.Collections; @@ -44,7 +45,7 @@ import java.util.concurrent.Callable; public class CustomOriginCloudFrontDistributionConfiguration extends CloudFrontDistributionConfiguration { - private static final Logger log = Logger.getLogger(CustomOriginCloudFrontDistributionConfiguration.class); + private static final Logger log = LogManager.getLogger(CustomOriginCloudFrontDistributionConfiguration.class); private final Host origin; diff --git a/s3/src/main/java/ch/cyberduck/core/kms/KMSEncryptionFeature.java b/s3/src/main/java/ch/cyberduck/core/kms/KMSEncryptionFeature.java index 7dc08ac5dfc..b23e3fe1115 100644 --- a/s3/src/main/java/ch/cyberduck/core/kms/KMSEncryptionFeature.java +++ b/s3/src/main/java/ch/cyberduck/core/kms/KMSEncryptionFeature.java @@ -34,7 +34,8 @@ import ch.cyberduck.core.ssl.X509TrustManager; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.HashMap; import java.util.Map; @@ -50,7 +51,7 @@ import com.amazonaws.services.kms.model.KeyListEntry; public class KMSEncryptionFeature extends S3EncryptionFeature { - private static final Logger log = Logger.getLogger(KMSEncryptionFeature.class); + private static final Logger log = LogManager.getLogger(KMSEncryptionFeature.class); private final S3Session session; private final PathContainerService containerService; diff --git a/s3/src/main/java/ch/cyberduck/core/restore/Glacier.java b/s3/src/main/java/ch/cyberduck/core/restore/Glacier.java index 0eafb64c860..995e9da9bb8 100644 --- a/s3/src/main/java/ch/cyberduck/core/restore/Glacier.java +++ b/s3/src/main/java/ch/cyberduck/core/restore/Glacier.java @@ -32,7 +32,8 @@ import ch.cyberduck.core.ssl.X509TrustManager; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import com.amazonaws.AmazonClientException; import com.amazonaws.ClientConfiguration; @@ -44,7 +45,7 @@ import com.amazonaws.services.s3.model.RestoreObjectRequest; public class Glacier implements Restore { - private static final Logger log = Logger.getLogger(Glacier.class); + private static final Logger log = LogManager.getLogger(Glacier.class); private final S3Session session; private final ClientConfiguration configuration; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/RequestEntityRestStorageService.java b/s3/src/main/java/ch/cyberduck/core/s3/RequestEntityRestStorageService.java index 73394778c3d..14b3362e2be 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/RequestEntityRestStorageService.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/RequestEntityRestStorageService.java @@ -34,7 +34,8 @@ import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.protocol.HTTP; import org.apache.http.protocol.HttpContext; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.Constants; import org.jets3t.service.Jets3tProperties; import org.jets3t.service.S3ServiceException; @@ -50,7 +51,7 @@ import java.util.Map; public class RequestEntityRestStorageService extends RestS3Service { - private static final Logger log = Logger.getLogger(RequestEntityRestStorageService.class); + private static final Logger log = LogManager.getLogger(RequestEntityRestStorageService.class); private final S3Session session; private final Jets3tProperties properties; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3AccessControlListFeature.java b/s3/src/main/java/ch/cyberduck/core/s3/S3AccessControlListFeature.java index e0a4145cfac..e12e772d65b 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3AccessControlListFeature.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3AccessControlListFeature.java @@ -31,7 +31,8 @@ import ch.cyberduck.core.shared.DefaultAclFeature; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.acl.AccessControlList; import org.jets3t.service.acl.CanonicalGrantee; @@ -49,7 +50,7 @@ import java.util.Set; public class S3AccessControlListFeature extends DefaultAclFeature implements AclPermission { - private static final Logger log = Logger.getLogger(S3AccessControlListFeature.class); + private static final Logger log = LogManager.getLogger(S3AccessControlListFeature.class); public static final Set CANNED_LIST = new LinkedHashSet<>(Arrays.asList( Acl.CANNED_PRIVATE, diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3AttributesFinderFeature.java b/s3/src/main/java/ch/cyberduck/core/s3/S3AttributesFinderFeature.java index 4dd59c3ad8d..9069f2186dd 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3AttributesFinderFeature.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3AttributesFinderFeature.java @@ -39,7 +39,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.model.S3Object; import org.jets3t.service.model.StorageObject; @@ -52,7 +53,7 @@ import static ch.cyberduck.core.s3.S3VersionedObjectListService.KEY_DELETE_MARKER; public class S3AttributesFinderFeature implements AttributesFinder { - private static final Logger log = Logger.getLogger(S3AttributesFinderFeature.class); + private static final Logger log = LogManager.getLogger(S3AttributesFinderFeature.class); private final S3Session session; private final PathContainerService containerService; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3BucketCreateService.java b/s3/src/main/java/ch/cyberduck/core/s3/S3BucketCreateService.java index 01f20b5c0df..74a1840503e 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3BucketCreateService.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3BucketCreateService.java @@ -26,13 +26,14 @@ import ch.cyberduck.core.preferences.HostPreferences; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.acl.AccessControlList; import org.jets3t.service.utils.ServiceUtils; public class S3BucketCreateService { - private static final Logger log = Logger.getLogger(S3BucketCreateService.class); + private static final Logger log = LogManager.getLogger(S3BucketCreateService.class); private final S3Session session; private final PathContainerService containerService; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3BucketHostnameTrustManager.java b/s3/src/main/java/ch/cyberduck/core/s3/S3BucketHostnameTrustManager.java index 5bd8f597521..a35f04c95d8 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3BucketHostnameTrustManager.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3BucketHostnameTrustManager.java @@ -18,13 +18,14 @@ import ch.cyberduck.core.ssl.ThreadLocalHostnameDelegatingTrustManager; import ch.cyberduck.core.ssl.X509TrustManager; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.regex.Matcher; import java.util.regex.Pattern; public class S3BucketHostnameTrustManager extends ThreadLocalHostnameDelegatingTrustManager { - private static final Logger log = Logger.getLogger(S3BucketHostnameTrustManager.class); + private static final Logger log = LogManager.getLogger(S3BucketHostnameTrustManager.class); /** * Test for pattern of bucket name containing dot diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3BucketListService.java b/s3/src/main/java/ch/cyberduck/core/s3/S3BucketListService.java index 0ccf3827399..4c2d500ff49 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3BucketListService.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3BucketListService.java @@ -28,14 +28,15 @@ import ch.cyberduck.core.features.Location; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.model.StorageBucket; import java.util.EnumSet; public class S3BucketListService implements RootListService { - private static final Logger log = Logger.getLogger(S3BucketListService.class); + private static final Logger log = LogManager.getLogger(S3BucketListService.class); private final S3Session session; private final PathContainerService containerService; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3BucketRegionRedirectStrategy.java b/s3/src/main/java/ch/cyberduck/core/s3/S3BucketRegionRedirectStrategy.java index c4e02c499ba..f3e8c18603e 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3BucketRegionRedirectStrategy.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3BucketRegionRedirectStrategy.java @@ -27,12 +27,13 @@ import org.apache.http.client.methods.RequestBuilder; import org.apache.http.impl.client.DefaultRedirectStrategy; import org.apache.http.protocol.HttpContext; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.utils.ServiceUtils; public class S3BucketRegionRedirectStrategy extends DefaultRedirectStrategy { - private static final Logger log = Logger.getLogger(S3BucketRegionRedirectStrategy.class); + private static final Logger log = LogManager.getLogger(S3BucketRegionRedirectStrategy.class); private final RequestEntityRestStorageService requestEntityRestStorageService; private final S3Session session; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3BulkTransferAccelerationFeature.java b/s3/src/main/java/ch/cyberduck/core/s3/S3BulkTransferAccelerationFeature.java index aba1d08c385..b8caf920231 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3BulkTransferAccelerationFeature.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3BulkTransferAccelerationFeature.java @@ -30,14 +30,15 @@ import ch.cyberduck.core.transfer.TransferItem; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.HashSet; import java.util.Map; import java.util.Set; public class S3BulkTransferAccelerationFeature implements Bulk { - private static final Logger log = Logger.getLogger(S3BulkTransferAccelerationFeature.class); + private static final Logger log = LogManager.getLogger(S3BulkTransferAccelerationFeature.class); private final S3Session session; private final TransferAcceleration accelerationService; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3CopyFeature.java b/s3/src/main/java/ch/cyberduck/core/s3/S3CopyFeature.java index b10a75bdafa..4271ac4d300 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3CopyFeature.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3CopyFeature.java @@ -30,7 +30,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.Constants; import org.jets3t.service.ServiceException; import org.jets3t.service.model.S3Object; @@ -39,7 +40,7 @@ import java.util.Map; public class S3CopyFeature implements Copy { - private static final Logger log = Logger.getLogger(S3CopyFeature.class); + private static final Logger log = LogManager.getLogger(S3CopyFeature.class); private final S3Session session; private final PathContainerService containerService; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3DefaultDeleteFeature.java b/s3/src/main/java/ch/cyberduck/core/s3/S3DefaultDeleteFeature.java index 19155035a44..1ace846b21e 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3DefaultDeleteFeature.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3DefaultDeleteFeature.java @@ -26,7 +26,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.model.MultipartUpload; @@ -35,7 +36,7 @@ import java.util.Map; public class S3DefaultDeleteFeature implements Delete { - private static final Logger log = Logger.getLogger(S3DefaultDeleteFeature.class); + private static final Logger log = LogManager.getLogger(S3DefaultDeleteFeature.class); private final S3Session session; private final PathContainerService containerService; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3DefaultMultipartService.java b/s3/src/main/java/ch/cyberduck/core/s3/S3DefaultMultipartService.java index 9b12d6af6f5..5513ad7eec0 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3DefaultMultipartService.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3DefaultMultipartService.java @@ -25,7 +25,8 @@ import ch.cyberduck.core.exception.NotfoundException; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.MultipartUploadChunk; import org.jets3t.service.S3ServiceException; import org.jets3t.service.model.MultipartPart; @@ -45,7 +46,7 @@ public class S3DefaultMultipartService implements S3MultipartService { */ public static final int MAXIMUM_UPLOAD_PARTS = 10000; - private static final Logger log = Logger.getLogger(S3DefaultMultipartService.class); + private static final Logger log = LogManager.getLogger(S3DefaultMultipartService.class); private final S3Session session; private final PathContainerService containerService; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3HttpRequestRetryHandler.java b/s3/src/main/java/ch/cyberduck/core/s3/S3HttpRequestRetryHandler.java index 42614a22761..f99ee91fdcb 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3HttpRequestRetryHandler.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3HttpRequestRetryHandler.java @@ -24,14 +24,15 @@ import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.protocol.HttpContext; import org.apache.http.protocol.HttpCoreContext; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.impl.rest.httpclient.JetS3tRequestAuthorizer; import java.io.IOException; public class S3HttpRequestRetryHandler extends ExtendedHttpRequestRetryHandler { - private static final Logger log = Logger.getLogger(S3HttpRequestRetryHandler.class); + private static final Logger log = LogManager.getLogger(S3HttpRequestRetryHandler.class); private static final int MAX_RETRIES = 1; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3LifecycleConfiguration.java b/s3/src/main/java/ch/cyberduck/core/s3/S3LifecycleConfiguration.java index ec1f50d2a74..cd115e97ce8 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3LifecycleConfiguration.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3LifecycleConfiguration.java @@ -29,12 +29,13 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.model.LifecycleConfig; public class S3LifecycleConfiguration implements Lifecycle { - private static final Logger log = Logger.getLogger(S3LifecycleConfiguration.class); + private static final Logger log = LogManager.getLogger(S3LifecycleConfiguration.class); private final S3Session session; private final PathContainerService containerService; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3ListService.java b/s3/src/main/java/ch/cyberduck/core/s3/S3ListService.java index 835bb06b93a..7ee53b4b93a 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3ListService.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3ListService.java @@ -28,13 +28,14 @@ import ch.cyberduck.core.features.Versioning; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.model.MultipartUpload; import java.util.EnumSet; public class S3ListService implements ListService { - private static final Logger log = Logger.getLogger(S3ListService.class); + private static final Logger log = LogManager.getLogger(S3ListService.class); private final S3Session session; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3LocationFeature.java b/s3/src/main/java/ch/cyberduck/core/s3/S3LocationFeature.java index a6d33fc3170..8790a55b097 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3LocationFeature.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3LocationFeature.java @@ -27,7 +27,8 @@ import ch.cyberduck.core.preferences.HostPreferences; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.impl.rest.httpclient.RegionEndpointCache; @@ -35,7 +36,7 @@ import java.util.Set; public class S3LocationFeature implements Location { - private static final Logger log = Logger.getLogger(S3LocationFeature.class); + private static final Logger log = LogManager.getLogger(S3LocationFeature.class); private final S3Session session; private final PathContainerService containerService; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3LoggingFeature.java b/s3/src/main/java/ch/cyberduck/core/s3/S3LoggingFeature.java index 3df84a0e803..12410afc85a 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3LoggingFeature.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3LoggingFeature.java @@ -28,7 +28,8 @@ import ch.cyberduck.core.preferences.HostPreferences; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.model.S3BucketLoggingStatus; import org.jets3t.service.model.StorageBucketLoggingStatus; @@ -37,7 +38,7 @@ import java.util.EnumSet; public class S3LoggingFeature implements Logging { - private static final Logger log = Logger.getLogger(S3LoggingFeature.class); + private static final Logger log = LogManager.getLogger(S3LoggingFeature.class); private final S3Session session; private final PathContainerService containerService; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3MetadataFeature.java b/s3/src/main/java/ch/cyberduck/core/s3/S3MetadataFeature.java index 44fb170f667..bc82a238dee 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3MetadataFeature.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3MetadataFeature.java @@ -32,7 +32,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.model.StorageObject; @@ -40,7 +41,7 @@ import java.util.Map; public class S3MetadataFeature implements Headers { - private static final Logger log = Logger.getLogger(S3MetadataFeature.class); + private static final Logger log = LogManager.getLogger(S3MetadataFeature.class); private final S3Session session; private final PathContainerService containerService; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3MoveFeature.java b/s3/src/main/java/ch/cyberduck/core/s3/S3MoveFeature.java index be3d819e6ea..e162e4c6555 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3MoveFeature.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3MoveFeature.java @@ -31,7 +31,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.VersionOrDeleteMarkersChunk; import org.jets3t.service.model.BaseVersionOrDeleteMarker; @@ -41,7 +42,7 @@ import static ch.cyberduck.core.s3.S3VersionedObjectListService.KEY_DELETE_MARKER; public class S3MoveFeature implements Move { - private static final Logger log = Logger.getLogger(S3MoveFeature.class); + private static final Logger log = LogManager.getLogger(S3MoveFeature.class); private final PathContainerService containerService; private final S3Session session; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3MultipartCopyFeature.java b/s3/src/main/java/ch/cyberduck/core/s3/S3MultipartCopyFeature.java index 40c7deaea5b..5c4ddef3244 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3MultipartCopyFeature.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3MultipartCopyFeature.java @@ -29,7 +29,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.S3ServiceException; import org.jets3t.service.ServiceException; import org.jets3t.service.model.MultipartCompleted; @@ -45,7 +46,7 @@ import java.util.concurrent.Future; public class S3MultipartCopyFeature extends S3CopyFeature { - private static final Logger log = Logger.getLogger(S3MultipartCopyFeature.class); + private static final Logger log = LogManager.getLogger(S3MultipartCopyFeature.class); private final S3Session session; private final PathContainerService containerService; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3MultipartUploadService.java b/s3/src/main/java/ch/cyberduck/core/s3/S3MultipartUploadService.java index f16814a6749..708bfdf12c8 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3MultipartUploadService.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3MultipartUploadService.java @@ -43,7 +43,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.model.MultipartCompleted; import org.jets3t.service.model.MultipartPart; @@ -62,7 +63,7 @@ import java.util.concurrent.Future; public class S3MultipartUploadService extends HttpUploadFeature { - private static final Logger log = Logger.getLogger(S3MultipartUploadService.class); + private static final Logger log = LogManager.getLogger(S3MultipartUploadService.class); private final S3Session session; private final PathContainerService containerService; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3MultipartWriteFeature.java b/s3/src/main/java/ch/cyberduck/core/s3/S3MultipartWriteFeature.java index b9d8da852a1..b2a95d76620 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3MultipartWriteFeature.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3MultipartWriteFeature.java @@ -18,7 +18,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.http.entity.ByteArrayEntity; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.model.MultipartCompleted; import org.jets3t.service.model.MultipartPart; @@ -37,7 +38,7 @@ import java.util.concurrent.atomic.AtomicBoolean; public class S3MultipartWriteFeature implements MultipartWrite { - private static final Logger log = Logger.getLogger(S3MultipartWriteFeature.class); + private static final Logger log = LogManager.getLogger(S3MultipartWriteFeature.class); private final PathContainerService containerService; private final S3Session session; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3MultipleDeleteFeature.java b/s3/src/main/java/ch/cyberduck/core/s3/S3MultipleDeleteFeature.java index 7bb64f3c0ff..0d42b08454c 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3MultipleDeleteFeature.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3MultipleDeleteFeature.java @@ -30,7 +30,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.model.MultipartUpload; import org.jets3t.service.model.MultipleDeleteResult; @@ -43,7 +44,7 @@ import java.util.Map; public class S3MultipleDeleteFeature implements Delete { - private static final Logger log = Logger.getLogger(S3MultipleDeleteFeature.class); + private static final Logger log = LogManager.getLogger(S3MultipleDeleteFeature.class); private final S3Session session; private final PathContainerService containerService; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3ObjectListService.java b/s3/src/main/java/ch/cyberduck/core/s3/S3ObjectListService.java index 1fe16d80bc8..e9d025f0cd4 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3ObjectListService.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3ObjectListService.java @@ -32,7 +32,8 @@ import ch.cyberduck.core.preferences.HostPreferences; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.StorageObjectsChunk; import org.jets3t.service.model.StorageObject; @@ -41,7 +42,7 @@ import java.util.EnumSet; public class S3ObjectListService extends S3AbstractListService implements ListService { - private static final Logger log = Logger.getLogger(S3ObjectListService.class); + private static final Logger log = LogManager.getLogger(S3ObjectListService.class); private final PathContainerService containerService; private final S3Session session; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3PathStyleFallbackAdapter.java b/s3/src/main/java/ch/cyberduck/core/s3/S3PathStyleFallbackAdapter.java index 768e1a8cef7..8a889188a31 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3PathStyleFallbackAdapter.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3PathStyleFallbackAdapter.java @@ -18,10 +18,11 @@ import ch.cyberduck.core.exception.ResolveFailedException; import ch.cyberduck.core.threading.BackgroundExceptionCallable; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class S3PathStyleFallbackAdapter extends BackgroundExceptionCallable { - private static final Logger log = Logger.getLogger(S3PathStyleFallbackAdapter.class); + private static final Logger log = LogManager.getLogger(S3PathStyleFallbackAdapter.class); private final S3Session session; private final BackgroundExceptionCallable proxy; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3Protocol.java b/s3/src/main/java/ch/cyberduck/core/s3/S3Protocol.java index 5629acb3eb1..eee6298445d 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3Protocol.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3Protocol.java @@ -29,7 +29,8 @@ import ch.cyberduck.core.io.HashAlgorithm; import ch.cyberduck.core.preferences.PreferencesFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Arrays; import java.util.HashSet; @@ -40,7 +41,7 @@ import com.amazonaws.auth.profile.ProfileCredentialsProvider; public class S3Protocol extends AbstractProtocol { - private static final Logger log = Logger.getLogger(S3Protocol.class); + private static final Logger log = LogManager.getLogger(S3Protocol.class); private final AWSCredentialsConfigurator credentials = new AWSCredentialsConfigurator( new AWSCredentialsProviderChain( diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3ReadFeature.java b/s3/src/main/java/ch/cyberduck/core/s3/S3ReadFeature.java index 0f87aab4a84..00560892f4d 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3ReadFeature.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3ReadFeature.java @@ -33,7 +33,8 @@ import org.apache.http.HttpHeaders; import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import java.io.IOException; @@ -42,7 +43,7 @@ import java.util.Map; public class S3ReadFeature implements Read { - private static final Logger log = Logger.getLogger(S3ReadFeature.class); + private static final Logger log = LogManager.getLogger(S3ReadFeature.class); private final PathContainerService containerService; private final S3Session session; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3Session.java b/s3/src/main/java/ch/cyberduck/core/s3/S3Session.java index 506d762ef26..1637008fc78 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3Session.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3Session.java @@ -66,7 +66,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.impl.rest.XmlResponsesSaxParser; import org.jets3t.service.model.StorageObject; @@ -79,7 +80,7 @@ import java.util.concurrent.ConcurrentHashMap; public class S3Session extends HttpSession { - private static final Logger log = Logger.getLogger(S3Session.class); + private static final Logger log = LogManager.getLogger(S3Session.class); private final PreferencesReader preferences = new HostPreferences(host); diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3SingleUploadService.java b/s3/src/main/java/ch/cyberduck/core/s3/S3SingleUploadService.java index 19c2341a555..fe164468ec0 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3SingleUploadService.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3SingleUploadService.java @@ -32,7 +32,8 @@ import ch.cyberduck.core.preferences.HostPreferences; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.model.StorageObject; import java.io.IOException; @@ -42,7 +43,7 @@ import java.security.NoSuchAlgorithmException; public class S3SingleUploadService extends HttpUploadFeature { - private static final Logger log = Logger.getLogger(S3SingleUploadService.class); + private static final Logger log = LogManager.getLogger(S3SingleUploadService.class); private final S3Session session; private Write writer; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3ThresholdUploadService.java b/s3/src/main/java/ch/cyberduck/core/s3/S3ThresholdUploadService.java index 94d181a8169..ed6d531a2f3 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3ThresholdUploadService.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3ThresholdUploadService.java @@ -31,11 +31,12 @@ import ch.cyberduck.core.preferences.HostPreferences; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.model.StorageObject; public class S3ThresholdUploadService implements Upload { - private static final Logger log = Logger.getLogger(S3ThresholdUploadService.class); + private static final Logger log = LogManager.getLogger(S3ThresholdUploadService.class); private final S3Session session; private final Long threshold; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3TokenExpiredResponseInterceptor.java b/s3/src/main/java/ch/cyberduck/core/s3/S3TokenExpiredResponseInterceptor.java index 9f829cacd68..d38222651d2 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3TokenExpiredResponseInterceptor.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3TokenExpiredResponseInterceptor.java @@ -30,13 +30,14 @@ import org.apache.http.entity.BufferedHttpEntity; import org.apache.http.protocol.HttpContext; import org.apache.http.util.EntityUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.S3ServiceException; import java.io.IOException; public class S3TokenExpiredResponseInterceptor extends DisabledServiceUnavailableRetryStrategy { - private static final Logger log = Logger.getLogger(S3TokenExpiredResponseInterceptor.class); + private static final Logger log = LogManager.getLogger(S3TokenExpiredResponseInterceptor.class); private static final int MAX_RETRIES = 1; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3UrlProvider.java b/s3/src/main/java/ch/cyberduck/core/s3/S3UrlProvider.java index fcbb592dd54..96845ed89be 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3UrlProvider.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3UrlProvider.java @@ -36,7 +36,8 @@ import ch.cyberduck.core.shared.DefaultUrlProvider; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.utils.ServiceUtils; import java.net.URI; @@ -50,7 +51,7 @@ import java.util.concurrent.TimeUnit; public class S3UrlProvider implements UrlProvider { - private static final Logger log = Logger.getLogger(S3UrlProvider.class); + private static final Logger log = LogManager.getLogger(S3UrlProvider.class); private final S3Session session; private final PathContainerService containerService; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3VersionedObjectListService.java b/s3/src/main/java/ch/cyberduck/core/s3/S3VersionedObjectListService.java index f10d95613d3..9fa89ded284 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3VersionedObjectListService.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3VersionedObjectListService.java @@ -34,7 +34,8 @@ import ch.cyberduck.core.threading.ThreadPoolFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.StorageObjectsChunk; import org.jets3t.service.VersionOrDeleteMarkersChunk; @@ -52,7 +53,7 @@ import com.google.common.collect.ImmutableMap; public class S3VersionedObjectListService extends S3AbstractListService implements ListService { - private static final Logger log = Logger.getLogger(S3VersionedObjectListService.class); + private static final Logger log = LogManager.getLogger(S3VersionedObjectListService.class); public static final String KEY_DELETE_MARKER = "delete_marker"; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3VersioningFeature.java b/s3/src/main/java/ch/cyberduck/core/s3/S3VersioningFeature.java index 6bce8f9ffe6..62386d0dd32 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3VersioningFeature.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3VersioningFeature.java @@ -33,13 +33,14 @@ import ch.cyberduck.core.features.Versioning; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.model.S3BucketVersioningStatus; import org.jets3t.service.model.S3Object; public class S3VersioningFeature implements Versioning { - private static final Logger log = Logger.getLogger(S3VersioningFeature.class); + private static final Logger log = LogManager.getLogger(S3VersioningFeature.class); private final S3Session session; private final PathContainerService containerService; diff --git a/s3/src/main/java/ch/cyberduck/core/s3/S3WriteFeature.java b/s3/src/main/java/ch/cyberduck/core/s3/S3WriteFeature.java index 43afd2a6a29..168cd4b9915 100644 --- a/s3/src/main/java/ch/cyberduck/core/s3/S3WriteFeature.java +++ b/s3/src/main/java/ch/cyberduck/core/s3/S3WriteFeature.java @@ -37,7 +37,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.http.entity.AbstractHttpEntity; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import org.jets3t.service.model.MultipartPart; import org.jets3t.service.model.MultipartUpload; @@ -49,7 +50,7 @@ import java.util.Map; public class S3WriteFeature extends AbstractHttpWriteFeature implements Write { - private static final Logger log = Logger.getLogger(S3WriteFeature.class); + private static final Logger log = LogManager.getLogger(S3WriteFeature.class); private final PathContainerService containerService; private final S3Session session; diff --git a/s3/src/main/java/ch/cyberduck/core/sts/STSCredentialsConfigurator.java b/s3/src/main/java/ch/cyberduck/core/sts/STSCredentialsConfigurator.java index 4c4c5b39255..d8542b41cfb 100644 --- a/s3/src/main/java/ch/cyberduck/core/sts/STSCredentialsConfigurator.java +++ b/s3/src/main/java/ch/cyberduck/core/sts/STSCredentialsConfigurator.java @@ -32,10 +32,11 @@ import ch.cyberduck.core.ssl.X509TrustManager; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; -import java.io.InputStream; import java.io.IOException; +import java.io.InputStream; import java.nio.charset.StandardCharsets; import java.time.Instant; import java.util.HashMap; @@ -70,7 +71,7 @@ public class STSCredentialsConfigurator { - private static final Logger log = Logger.getLogger(STSCredentialsConfigurator.class); + private static final Logger log = LogManager.getLogger(STSCredentialsConfigurator.class); private static final ObjectMapper MAPPER = new ObjectMapper(); static { MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); diff --git a/s3/src/test/java/ch/cyberduck/core/sts/STSCredentialsConfiguratorTest.java b/s3/src/test/java/ch/cyberduck/core/sts/STSCredentialsConfiguratorTest.java index f174056377e..cbdbf0fc3eb 100644 --- a/s3/src/test/java/ch/cyberduck/core/sts/STSCredentialsConfiguratorTest.java +++ b/s3/src/test/java/ch/cyberduck/core/sts/STSCredentialsConfiguratorTest.java @@ -15,33 +15,15 @@ * GNU General Public License for more details. */ -import ch.cyberduck.core.DisabledPasswordCallback; -import ch.cyberduck.core.Host; -import ch.cyberduck.core.TestProtocol; -import ch.cyberduck.core.preferences.PreferencesFactory; -import ch.cyberduck.core.ssl.DefaultX509KeyManager; -import ch.cyberduck.core.ssl.DisabledX509TrustManager; - -import org.apache.log4j.Appender; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.apache.log4j.spi.LoggingEvent; -import org.junit.Test; import org.junit.runner.RunWith; -import org.mockito.ArgumentCaptor; -import org.mockito.Captor; -import org.mockito.Mock; -import org.mockito.Mockito; import org.mockito.junit.MockitoJUnitRunner; -import java.io.File; - -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.verify; - @RunWith(MockitoJUnitRunner.class) public class STSCredentialsConfiguratorTest { +// TODO Refactor STSCredentialsConfigurator#configure to make it testable. Method way too long. + +/* @Mock private Appender mockedAppender; @@ -73,5 +55,6 @@ public void readSuccessForValidAWSCredentialsProfileEntry() throws Exception { new STSCredentialsConfigurator(new DisabledX509TrustManager(), new DefaultX509KeyManager(), new DisabledPasswordCallback()).configure(new Host(new TestProtocol())); verify(mockedAppender, Mockito.atLeast(0)).doAppend(loggingEventCaptor.capture()); } +*/ } diff --git a/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraAttributesFinderFeature.java b/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraAttributesFinderFeature.java index ee1d5b58635..b152605e2a3 100644 --- a/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraAttributesFinderFeature.java +++ b/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraAttributesFinderFeature.java @@ -27,7 +27,8 @@ import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.binary.Hex; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.HashMap; @@ -39,7 +40,7 @@ import com.spectralogic.ds3client.networking.FailedRequestException; public class SpectraAttributesFinderFeature implements AttributesFinder { - private static final Logger log = Logger.getLogger(SpectraAttributesFinderFeature.class); + private static final Logger log = LogManager.getLogger(SpectraAttributesFinderFeature.class); private final SpectraSession session; private final PathContainerService containerService; diff --git a/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraBulkService.java b/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraBulkService.java index b5f75039151..5c165decdc4 100644 --- a/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraBulkService.java +++ b/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraBulkService.java @@ -40,7 +40,8 @@ import org.apache.http.HttpStatus; import org.apache.http.client.HttpResponseException; import org.apache.http.client.methods.HttpPut; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jets3t.service.ServiceException; import java.io.IOException; @@ -72,7 +73,7 @@ import com.spectralogic.ds3client.serializer.XmlProcessingException; public class SpectraBulkService implements Bulk> { - private static final Logger log = Logger.getLogger(SpectraBulkService.class); + private static final Logger log = LogManager.getLogger(SpectraBulkService.class); private final SpectraSession session; private Delete delete; diff --git a/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraFindFeature.java b/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraFindFeature.java index c13152049c3..9b8874ffcfa 100644 --- a/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraFindFeature.java +++ b/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraFindFeature.java @@ -22,7 +22,8 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.features.Find; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; @@ -34,7 +35,7 @@ import com.spectralogic.ds3client.networking.FailedRequestException; public class SpectraFindFeature implements Find { - private static final Logger log = Logger.getLogger(SpectraFindFeature.class); + private static final Logger log = LogManager.getLogger(SpectraFindFeature.class); private final SpectraSession session; private final PathContainerService containerService; diff --git a/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraObjectListService.java b/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraObjectListService.java index 71f970281df..7f22f887a74 100644 --- a/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraObjectListService.java +++ b/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraObjectListService.java @@ -29,7 +29,8 @@ import ch.cyberduck.core.s3.S3AbstractListService; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.jetbrains.annotations.NotNull; import java.io.IOException; @@ -45,7 +46,7 @@ import com.spectralogic.ds3client.networking.FailedRequestException; public class SpectraObjectListService extends S3AbstractListService { - private static final Logger log = Logger.getLogger(SpectraObjectListService.class); + private static final Logger log = LogManager.getLogger(SpectraObjectListService.class); private final PathContainerService containerService; private final SpectraSession session; diff --git a/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraVersioningFeature.java b/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraVersioningFeature.java index 3e2d5ee8f54..4659df95fca 100644 --- a/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraVersioningFeature.java +++ b/spectra/src/main/java/ch/cyberduck/core/spectra/SpectraVersioningFeature.java @@ -25,7 +25,8 @@ import ch.cyberduck.core.exception.BackgroundException; import ch.cyberduck.core.features.Versioning; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.UUID; @@ -41,7 +42,7 @@ import com.spectralogic.ds3client.networking.FailedRequestException; public class SpectraVersioningFeature implements Versioning { - private static final Logger log = Logger.getLogger(SpectraVersioningFeature.class); + private static final Logger log = LogManager.getLogger(SpectraVersioningFeature.class); public static final String KEY_REVERTABLE = "revertable"; diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/PreferencesHostKeyVerifier.java b/ssh/src/main/java/ch/cyberduck/core/sftp/PreferencesHostKeyVerifier.java index 54fd7853f9e..fa3e245d3ac 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/PreferencesHostKeyVerifier.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/PreferencesHostKeyVerifier.java @@ -26,7 +26,8 @@ import ch.cyberduck.core.preferences.PreferencesFactory; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.bouncycastle.util.encoders.Base64; import java.security.PublicKey; @@ -37,7 +38,7 @@ * Saving accepted host keys in preferences as Base64 encoded strings. */ public abstract class PreferencesHostKeyVerifier extends AbstractHostKeyCallback { - private static final Logger log = Logger.getLogger(PreferencesHostKeyVerifier.class); + private static final Logger log = LogManager.getLogger(PreferencesHostKeyVerifier.class); private final Preferences preferences = PreferencesFactory.get(); diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPCommandFeature.java b/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPCommandFeature.java index 50c4269efb1..91f812b05d0 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPCommandFeature.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPCommandFeature.java @@ -27,7 +27,8 @@ import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.BufferedReader; import java.io.IOException; @@ -37,7 +38,7 @@ import net.schmizz.sshj.connection.channel.direct.Session; public class SFTPCommandFeature implements Command { - private static final Logger log = Logger.getLogger(SFTPCommandFeature.class); + private static final Logger log = LogManager.getLogger(SFTPCommandFeature.class); private final SFTPSession session; @@ -107,4 +108,4 @@ public void send(final String command, final ProgressListener listener, final Tr throw new DefaultIOExceptionMappingService().map(e); } } -} \ No newline at end of file +} diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPExceptionMappingService.java b/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPExceptionMappingService.java index c51d9373275..e531ccd4c9e 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPExceptionMappingService.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPExceptionMappingService.java @@ -29,7 +29,8 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.exception.ExceptionUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; @@ -43,7 +44,7 @@ import net.schmizz.sshj.userauth.UserAuthException; public class SFTPExceptionMappingService extends AbstractExceptionMappingService { - private static final Logger log = Logger.getLogger(SFTPExceptionMappingService.class); + private static final Logger log = LogManager.getLogger(SFTPExceptionMappingService.class); @Override public BackgroundException map(final IOException e) { diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPListService.java b/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPListService.java index 53bcad1db1e..628b5478d19 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPListService.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPListService.java @@ -28,7 +28,8 @@ import ch.cyberduck.core.exception.InteroperabilityException; import ch.cyberduck.core.exception.NotfoundException; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.EnumSet; @@ -41,7 +42,7 @@ import net.schmizz.sshj.sftp.SFTPException; public class SFTPListService implements ListService { - private static final Logger log = Logger.getLogger(SFTPListService.class); + private static final Logger log = LogManager.getLogger(SFTPListService.class); private final SFTPSession session; private final SFTPAttributesFinderFeature attributes; diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPQuotaFeature.java b/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPQuotaFeature.java index 1e50cf5326e..30c1aad4414 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPQuotaFeature.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPQuotaFeature.java @@ -20,7 +20,8 @@ import ch.cyberduck.core.features.Quota; import ch.cyberduck.core.shared.DefaultHomeFinderService; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; @@ -31,7 +32,7 @@ public class SFTPQuotaFeature implements Quota { private static final int MIN_SFTP_SPACE_AVAILABLE_VERSION = 6; - private static final Logger log = Logger.getLogger(SFTPQuotaFeature.class); + private static final Logger log = LogManager.getLogger(SFTPQuotaFeature.class); private final SFTPSession session; diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPReadFeature.java b/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPReadFeature.java index 5f2892e5efc..7b0c9b30d01 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPReadFeature.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPReadFeature.java @@ -25,7 +25,8 @@ import ch.cyberduck.core.preferences.PreferencesReader; import ch.cyberduck.core.transfer.TransferStatus; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; @@ -36,7 +37,7 @@ import net.schmizz.sshj.sftp.RemoteFile; public class SFTPReadFeature implements Read { - private static final Logger log = Logger.getLogger(SFTPReadFeature.class); + private static final Logger log = LogManager.getLogger(SFTPReadFeature.class); private final SFTPSession session; diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPSession.java b/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPSession.java index 56763aef1bd..047344579a8 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPSession.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPSession.java @@ -51,7 +51,8 @@ import ch.cyberduck.core.threading.CancelCallback; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.nio.charset.Charset; @@ -87,7 +88,7 @@ import net.schmizz.sshj.transport.verification.HostKeyVerifier; public class SFTPSession extends Session { - private static final Logger log = Logger.getLogger(SFTPSession.class); + private static final Logger log = LogManager.getLogger(SFTPSession.class); private final PreferencesReader preferences = new HostPreferences(host); diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPWriteFeature.java b/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPWriteFeature.java index 024e445db83..7f8ec6150e5 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPWriteFeature.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/SFTPWriteFeature.java @@ -28,7 +28,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.commons.io.output.ChunkedOutputStream; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.EnumSet; @@ -38,7 +39,7 @@ import net.schmizz.sshj.sftp.RemoteFile; public class SFTPWriteFeature extends AppendWriteFeature { - private static final Logger log = Logger.getLogger(SFTPWriteFeature.class); + private static final Logger log = LogManager.getLogger(SFTPWriteFeature.class); private final SFTPSession session; private final PreferencesReader preferences; diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPAgentAuthentication.java b/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPAgentAuthentication.java index b7d2af107e2..9ac3ebd821e 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPAgentAuthentication.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPAgentAuthentication.java @@ -23,7 +23,8 @@ import ch.cyberduck.core.sftp.SFTPExceptionMappingService; import ch.cyberduck.core.threading.CancelCallback; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import com.jcraft.jsch.agentproxy.Identity; import com.jcraft.jsch.agentproxy.sshj.AuthAgent; @@ -33,7 +34,7 @@ import net.schmizz.sshj.userauth.UserAuthException; public class SFTPAgentAuthentication implements AuthenticationProvider { - private static final Logger log = Logger.getLogger(SFTPAgentAuthentication.class); + private static final Logger log = LogManager.getLogger(SFTPAgentAuthentication.class); private final SSHClient client; private final AgentAuthenticator agent; diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPChallengeResponseAuthentication.java b/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPChallengeResponseAuthentication.java index 229ad117745..f420a34eee1 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPChallengeResponseAuthentication.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPChallengeResponseAuthentication.java @@ -29,7 +29,8 @@ import ch.cyberduck.core.threading.CancelCallback; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.text.MessageFormat; @@ -44,7 +45,7 @@ import net.schmizz.sshj.userauth.password.Resource; public class SFTPChallengeResponseAuthentication implements AuthenticationProvider { - private static final Logger log = Logger.getLogger(SFTPChallengeResponseAuthentication.class); + private static final Logger log = LogManager.getLogger(SFTPChallengeResponseAuthentication.class); private static final Pattern DEFAULT_PROMPT_PATTERN = Pattern.compile(".*[pP]assword.*", Pattern.DOTALL); diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPNoneAuthentication.java b/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPNoneAuthentication.java index 0062d192f0c..e6d60fadd97 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPNoneAuthentication.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPNoneAuthentication.java @@ -22,7 +22,8 @@ import ch.cyberduck.core.sftp.SFTPExceptionMappingService; import ch.cyberduck.core.threading.CancelCallback; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; @@ -30,7 +31,7 @@ import net.schmizz.sshj.userauth.method.AuthNone; public class SFTPNoneAuthentication implements AuthenticationProvider { - private static final Logger log = Logger.getLogger(SFTPNoneAuthentication.class); + private static final Logger log = LogManager.getLogger(SFTPNoneAuthentication.class); private final SSHClient client; diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPPasswordAuthentication.java b/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPPasswordAuthentication.java index 449f8ffb852..44704743d55 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPPasswordAuthentication.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPPasswordAuthentication.java @@ -29,7 +29,8 @@ import ch.cyberduck.core.threading.CancelCallback; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.text.MessageFormat; @@ -41,7 +42,7 @@ import net.schmizz.sshj.userauth.password.Resource; public class SFTPPasswordAuthentication implements AuthenticationProvider { - private static final Logger log = Logger.getLogger(SFTPPasswordAuthentication.class); + private static final Logger log = LogManager.getLogger(SFTPPasswordAuthentication.class); private final SSHClient client; diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPPublicKeyAuthentication.java b/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPPublicKeyAuthentication.java index e07b51dc097..f41761499b6 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPPublicKeyAuthentication.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/auth/SFTPPublicKeyAuthentication.java @@ -29,7 +29,8 @@ import ch.cyberduck.core.threading.CancelCallback; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStreamReader; @@ -50,7 +51,7 @@ import net.schmizz.sshj.userauth.password.Resource; public class SFTPPublicKeyAuthentication implements AuthenticationProvider { - private static final Logger log = Logger.getLogger(SFTPPublicKeyAuthentication.class); + private static final Logger log = LogManager.getLogger(SFTPPublicKeyAuthentication.class); private final SSHClient client; diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHAgentAuthenticator.java b/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHAgentAuthenticator.java index 4452d2f9c22..66add2fd45a 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHAgentAuthenticator.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHAgentAuthenticator.java @@ -20,7 +20,8 @@ import ch.cyberduck.core.sftp.auth.AgentAuthenticator; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Arrays; import java.util.Collection; @@ -34,7 +35,7 @@ import com.jcraft.jsch.agentproxy.usocket.JNAUSocketFactory; public class OpenSSHAgentAuthenticator extends AgentAuthenticator { - private static final Logger log = Logger.getLogger(OpenSSHAgentAuthenticator.class); + private static final Logger log = LogManager.getLogger(OpenSSHAgentAuthenticator.class); private AgentProxy proxy; diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHCredentialsConfigurator.java b/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHCredentialsConfigurator.java index f2e3f63029b..0b13870ef9e 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHCredentialsConfigurator.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHCredentialsConfigurator.java @@ -25,10 +25,11 @@ import ch.cyberduck.core.sftp.openssh.config.transport.OpenSshConfig; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class OpenSSHCredentialsConfigurator implements CredentialsConfigurator { - private static final Logger log = Logger.getLogger(OpenSSHCredentialsConfigurator.class); + private static final Logger log = LogManager.getLogger(OpenSSHCredentialsConfigurator.class); private final OpenSshConfig configuration; diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHHostKeyVerifier.java b/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHHostKeyVerifier.java index 49a1fc70c0c..fe90c671c96 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHHostKeyVerifier.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHHostKeyVerifier.java @@ -30,7 +30,8 @@ import org.apache.commons.codec.binary.Base64; import org.apache.commons.io.IOUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; @@ -48,7 +49,7 @@ import net.schmizz.sshj.transport.verification.OpenSSHKnownHosts; public abstract class OpenSSHHostKeyVerifier extends PreferencesHostKeyVerifier { - private static final Logger log = Logger.getLogger(OpenSSHHostKeyVerifier.class); + private static final Logger log = LogManager.getLogger(OpenSSHHostKeyVerifier.class); /** * It is a thread safe implementation, therefore, you need only to instantiate one diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHHostnameConfigurator.java b/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHHostnameConfigurator.java index 7dd259c45e4..e1535405fe5 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHHostnameConfigurator.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHHostnameConfigurator.java @@ -23,10 +23,11 @@ import ch.cyberduck.core.sftp.openssh.config.transport.OpenSshConfig; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class OpenSSHHostnameConfigurator implements HostnameConfigurator { - private static final Logger log = Logger.getLogger(OpenSSHHostnameConfigurator.class); + private static final Logger log = LogManager.getLogger(OpenSSHHostnameConfigurator.class); private final OpenSshConfig configuration; diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHJumpHostConfigurator.java b/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHJumpHostConfigurator.java index 2d023bdc411..d0b34878d60 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHJumpHostConfigurator.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHJumpHostConfigurator.java @@ -23,12 +23,13 @@ import ch.cyberduck.core.sftp.openssh.config.transport.OpenSshConfig; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.Collections; public class OpenSSHJumpHostConfigurator implements JumphostConfigurator { - private static final Logger log = Logger.getLogger(OpenSSHJumpHostConfigurator.class); + private static final Logger log = LogManager.getLogger(OpenSSHJumpHostConfigurator.class); private final OpenSshConfig configuration; private final OpenSSHHostnameConfigurator hostname; diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHPreferredAuthenticationsConfigurator.java b/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHPreferredAuthenticationsConfigurator.java index 0df1010fede..28b1ed4f9ee 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHPreferredAuthenticationsConfigurator.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHPreferredAuthenticationsConfigurator.java @@ -22,10 +22,11 @@ import ch.cyberduck.core.sftp.openssh.config.transport.OpenSshConfig; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class OpenSSHPreferredAuthenticationsConfigurator { - private static final Logger log = Logger.getLogger(OpenSSHPreferredAuthenticationsConfigurator.class); + private static final Logger log = LogManager.getLogger(OpenSSHPreferredAuthenticationsConfigurator.class); private final OpenSshConfig configuration; diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHPrivateKeyConfigurator.java b/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHPrivateKeyConfigurator.java index 573c4390a54..6783ae6dc7b 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHPrivateKeyConfigurator.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/OpenSSHPrivateKeyConfigurator.java @@ -21,7 +21,8 @@ import ch.cyberduck.core.exception.AccessDeniedException; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStreamReader; @@ -34,7 +35,7 @@ import net.schmizz.sshj.userauth.keyprovider.KeyProviderUtil; public class OpenSSHPrivateKeyConfigurator { - private static final Logger log = Logger.getLogger(OpenSSHPrivateKeyConfigurator.class); + private static final Logger log = LogManager.getLogger(OpenSSHPrivateKeyConfigurator.class); private final Local directory; diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/config/transport/OpenSshConfig.java b/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/config/transport/OpenSshConfig.java index 0b48760e9e7..5ae6b4ed828 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/config/transport/OpenSshConfig.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/openssh/config/transport/OpenSshConfig.java @@ -44,7 +44,8 @@ import ch.cyberduck.core.sftp.openssh.config.fnmatch.FileNameMatcher; import org.apache.commons.io.IOUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.BufferedReader; import java.io.IOException; @@ -61,7 +62,7 @@ * Simple configuration parser for the OpenSSH ~/.ssh/config file. */ public class OpenSshConfig { - private static final Logger log = Logger.getLogger(OpenSshConfig.class); + private static final Logger log = LogManager.getLogger(OpenSshConfig.class); /** * The .ssh/config file we read and monitor for updates. diff --git a/ssh/src/main/java/ch/cyberduck/core/sftp/putty/PageantAuthenticator.java b/ssh/src/main/java/ch/cyberduck/core/sftp/putty/PageantAuthenticator.java index 8c7a17ba680..26b9ffaa68f 100644 --- a/ssh/src/main/java/ch/cyberduck/core/sftp/putty/PageantAuthenticator.java +++ b/ssh/src/main/java/ch/cyberduck/core/sftp/putty/PageantAuthenticator.java @@ -20,7 +20,8 @@ import ch.cyberduck.core.sftp.auth.AgentAuthenticator; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.Collection; @@ -36,7 +37,7 @@ * SSH authentication agent for PuTTY */ public class PageantAuthenticator extends AgentAuthenticator { - private static final Logger log = Logger.getLogger(PageantAuthenticator.class); + private static final Logger log = LogManager.getLogger(PageantAuthenticator.class); private AgentProxy proxy; diff --git a/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateIdProvider.java b/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateIdProvider.java index 2fc0d46857c..9633020afa5 100644 --- a/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateIdProvider.java +++ b/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateIdProvider.java @@ -31,10 +31,11 @@ import ch.cyberduck.core.storegate.io.swagger.client.model.RootFolder; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class StoregateIdProvider implements FileIdProvider { - private static final Logger log = Logger.getLogger(StoregateIdProvider.class); + private static final Logger log = LogManager.getLogger(StoregateIdProvider.class); private final StoregateSession session; private final LRUCache cache = LRUCache.build(PreferencesFactory.get().getLong("fileid.cache.size")); diff --git a/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateMultipartWriteFeature.java b/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateMultipartWriteFeature.java index f540adf4d83..1a2a6e6fb41 100644 --- a/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateMultipartWriteFeature.java +++ b/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateMultipartWriteFeature.java @@ -38,7 +38,8 @@ import org.apache.http.client.entity.EntityBuilder; import org.apache.http.client.methods.HttpPut; import org.apache.http.util.EntityUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStreamReader; @@ -50,7 +51,7 @@ import java.util.concurrent.atomic.AtomicReference; public class StoregateMultipartWriteFeature implements MultipartWrite { - private static final Logger log = Logger.getLogger(StoregateMultipartWriteFeature.class); + private static final Logger log = LogManager.getLogger(StoregateMultipartWriteFeature.class); private final StoregateSession session; private final StoregateIdProvider fileid; diff --git a/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateReadFeature.java b/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateReadFeature.java index a0581631e6c..d2ffd3c5677 100644 --- a/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateReadFeature.java +++ b/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateReadFeature.java @@ -33,13 +33,14 @@ import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpUriRequest; import org.apache.http.message.BasicHeader; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; public class StoregateReadFeature implements Read { - private static final Logger log = Logger.getLogger(StoregateReadFeature.class); + private static final Logger log = LogManager.getLogger(StoregateReadFeature.class); private final StoregateSession session; private final StoregateIdProvider fileid; diff --git a/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateSession.java b/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateSession.java index ba9f85afc8a..3a7aacc77df 100644 --- a/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateSession.java +++ b/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateSession.java @@ -58,7 +58,8 @@ import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.protocol.HttpContext; import org.apache.http.util.EntityUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.glassfish.jersey.client.ClientConfig; import org.glassfish.jersey.jackson.JacksonFeature; import org.glassfish.jersey.media.multipart.MultiPartFeature; @@ -82,7 +83,7 @@ import static com.google.api.client.json.Json.MEDIA_TYPE; public class StoregateSession extends HttpSession { - private static final Logger log = Logger.getLogger(StoregateSession.class); + private static final Logger log = LogManager.getLogger(StoregateSession.class); private OAuth2RequestInterceptor authorizationService; private List roots = Collections.emptyList(); diff --git a/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateWriteFeature.java b/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateWriteFeature.java index de69ae1dd53..db2d36dff47 100644 --- a/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateWriteFeature.java +++ b/storegate/src/main/java/ch/cyberduck/core/storegate/StoregateWriteFeature.java @@ -45,7 +45,8 @@ import org.apache.http.entity.StringEntity; import org.apache.http.protocol.HTTP; import org.apache.http.util.EntityUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.joda.time.DateTime; import java.io.IOException; @@ -56,7 +57,7 @@ import static com.google.api.client.json.Json.MEDIA_TYPE; public class StoregateWriteFeature extends AbstractHttpWriteFeature { - private static final Logger log = Logger.getLogger(StoregateWriteFeature.class); + private static final Logger log = LogManager.getLogger(StoregateWriteFeature.class); private final StoregateSession session; private final StoregateIdProvider fileid; diff --git a/udt/src/main/java/ch/cyberduck/core/udt/UDTProxyConfigurator.java b/udt/src/main/java/ch/cyberduck/core/udt/UDTProxyConfigurator.java index a10546a31da..b32ee4059a7 100644 --- a/udt/src/main/java/ch/cyberduck/core/udt/UDTProxyConfigurator.java +++ b/udt/src/main/java/ch/cyberduck/core/udt/UDTProxyConfigurator.java @@ -55,7 +55,8 @@ import org.apache.http.message.BasicHeader; import org.apache.http.protocol.HttpContext; import org.apache.http.protocol.HttpRequestExecutor; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.net.InetSocketAddress; @@ -65,7 +66,7 @@ import com.barchart.udt.ResourceUDT; public class UDTProxyConfigurator implements TrustManagerHostnameCallback { - private static final Logger log = Logger.getLogger(UDTProxyConfigurator.class); + private static final Logger log = LogManager.getLogger(UDTProxyConfigurator.class); private Location.Name location; diff --git a/udt/src/main/java/ch/cyberduck/core/udt/UDTSocket.java b/udt/src/main/java/ch/cyberduck/core/udt/UDTSocket.java index 28c55a1f424..a76fe24442e 100644 --- a/udt/src/main/java/ch/cyberduck/core/udt/UDTSocket.java +++ b/udt/src/main/java/ch/cyberduck/core/udt/UDTSocket.java @@ -20,7 +20,8 @@ import ch.cyberduck.core.threading.NamedThreadFactory; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.net.SocketAddress; @@ -34,7 +35,7 @@ import com.barchart.udt.net.NetSocketUDT; public class UDTSocket extends NetSocketUDT { - private static final Logger log = Logger.getLogger(UDTSocket.class); + private static final Logger log = LogManager.getLogger(UDTSocket.class); private final ThreadFactory threadFactory = new NamedThreadFactory("connect"); diff --git a/udt/src/main/java/ch/cyberduck/core/udt/qloudsonic/QloudsonicProxyProvider.java b/udt/src/main/java/ch/cyberduck/core/udt/qloudsonic/QloudsonicProxyProvider.java index 0aa691ce4d8..124f1241dd8 100644 --- a/udt/src/main/java/ch/cyberduck/core/udt/qloudsonic/QloudsonicProxyProvider.java +++ b/udt/src/main/java/ch/cyberduck/core/udt/qloudsonic/QloudsonicProxyProvider.java @@ -30,13 +30,14 @@ import ch.cyberduck.core.udt.UDTProxyProvider; import ch.cyberduck.core.udt.UDTTLSProtocol; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.util.ArrayList; import java.util.List; public class QloudsonicProxyProvider implements UDTProxyProvider { - private static final Logger log = Logger.getLogger(QloudsonicProxyProvider.class); + private static final Logger log = LogManager.getLogger(QloudsonicProxyProvider.class); private final LicenseFactory factory; diff --git a/webdav/src/main/java/ch/cyberduck/core/dav/DAVAttributesFinderFeature.java b/webdav/src/main/java/ch/cyberduck/core/dav/DAVAttributesFinderFeature.java index b7568bb7aa7..bf469a0c6a9 100644 --- a/webdav/src/main/java/ch/cyberduck/core/dav/DAVAttributesFinderFeature.java +++ b/webdav/src/main/java/ch/cyberduck/core/dav/DAVAttributesFinderFeature.java @@ -31,7 +31,8 @@ import org.apache.commons.lang3.math.NumberUtils; import org.apache.http.HttpHeaders; import org.apache.http.client.methods.HttpHead; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import javax.xml.namespace.QName; import java.io.IOException; @@ -46,7 +47,7 @@ import com.github.sardine.impl.handler.HeadersResponseHandler; public class DAVAttributesFinderFeature implements AttributesFinder { - private static final Logger log = Logger.getLogger(DAVAttributesFinderFeature.class); + private static final Logger log = LogManager.getLogger(DAVAttributesFinderFeature.class); private final DAVSession session; diff --git a/webdav/src/main/java/ch/cyberduck/core/dav/DAVClient.java b/webdav/src/main/java/ch/cyberduck/core/dav/DAVClient.java index 6279b8d2717..78bcd9c64e7 100644 --- a/webdav/src/main/java/ch/cyberduck/core/dav/DAVClient.java +++ b/webdav/src/main/java/ch/cyberduck/core/dav/DAVClient.java @@ -30,7 +30,8 @@ import org.apache.http.client.protocol.HttpClientContext; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.net.URI; @@ -50,7 +51,7 @@ import com.github.sardine.util.SardineUtil; public class DAVClient extends SardineImpl { - private static final Logger log = Logger.getLogger(DAVClient.class); + private static final Logger log = LogManager.getLogger(DAVClient.class); private final String uri; diff --git a/webdav/src/main/java/ch/cyberduck/core/dav/DAVListService.java b/webdav/src/main/java/ch/cyberduck/core/dav/DAVListService.java index ebd9b558126..db454da5541 100644 --- a/webdav/src/main/java/ch/cyberduck/core/dav/DAVListService.java +++ b/webdav/src/main/java/ch/cyberduck/core/dav/DAVListService.java @@ -18,7 +18,6 @@ */ import ch.cyberduck.core.AttributedList; -import ch.cyberduck.core.Cache; import ch.cyberduck.core.ListProgressListener; import ch.cyberduck.core.ListService; import ch.cyberduck.core.Path; @@ -28,7 +27,8 @@ import ch.cyberduck.core.exception.NotfoundException; import ch.cyberduck.core.http.HttpExceptionMappingService; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.EnumSet; @@ -40,7 +40,7 @@ import com.github.sardine.impl.SardineException; public class DAVListService implements ListService { - private static final Logger log = Logger.getLogger(DAVListService.class); + private static final Logger log = LogManager.getLogger(DAVListService.class); private final DAVSession session; private final DAVAttributesFinderFeature attributes; diff --git a/webdav/src/main/java/ch/cyberduck/core/dav/DAVMetadataFeature.java b/webdav/src/main/java/ch/cyberduck/core/dav/DAVMetadataFeature.java index 4c0b6640373..0d0356b2f09 100644 --- a/webdav/src/main/java/ch/cyberduck/core/dav/DAVMetadataFeature.java +++ b/webdav/src/main/java/ch/cyberduck/core/dav/DAVMetadataFeature.java @@ -29,7 +29,8 @@ import ch.cyberduck.core.transfer.TransferStatus; import org.apache.http.HttpHeaders; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.w3c.dom.Element; import javax.xml.namespace.QName; @@ -47,7 +48,7 @@ import static com.github.sardine.util.SardineUtil.CUSTOM_NAMESPACE_URI; public class DAVMetadataFeature implements Headers { - private static final Logger log = Logger.getLogger(DAVMetadataFeature.class); + private static final Logger log = LogManager.getLogger(DAVMetadataFeature.class); private final DAVSession session; diff --git a/webdav/src/main/java/ch/cyberduck/core/dav/DAVReadFeature.java b/webdav/src/main/java/ch/cyberduck/core/dav/DAVReadFeature.java index 61685964c50..5a26c5033de 100644 --- a/webdav/src/main/java/ch/cyberduck/core/dav/DAVReadFeature.java +++ b/webdav/src/main/java/ch/cyberduck/core/dav/DAVReadFeature.java @@ -30,7 +30,8 @@ import org.apache.http.HttpHeaders; import org.apache.http.HttpStatus; import org.apache.http.message.BasicHeader; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.io.InputStream; @@ -43,7 +44,7 @@ import com.github.sardine.impl.SardineException; public class DAVReadFeature implements Read { - private static final Logger log = Logger.getLogger(DAVReadFeature.class); + private static final Logger log = LogManager.getLogger(DAVReadFeature.class); private final DAVSession session; diff --git a/webdav/src/main/java/ch/cyberduck/core/dav/DAVSession.java b/webdav/src/main/java/ch/cyberduck/core/dav/DAVSession.java index 9c525031566..0033753c056 100644 --- a/webdav/src/main/java/ch/cyberduck/core/dav/DAVSession.java +++ b/webdav/src/main/java/ch/cyberduck/core/dav/DAVSession.java @@ -72,7 +72,8 @@ import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.impl.client.SystemDefaultCredentialsProvider; import org.apache.http.impl.client.WinHttpClients; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.net.URL; @@ -84,7 +85,7 @@ import com.github.sardine.impl.handler.ValidatingResponseHandler; public class DAVSession extends HttpSession { - private static final Logger log = Logger.getLogger(DAVSession.class); + private static final Logger log = LogManager.getLogger(DAVSession.class); private final RedirectCallback redirect; private final PreferencesReader preferences diff --git a/webdav/src/main/java/ch/cyberduck/core/dav/DAVWriteFeature.java b/webdav/src/main/java/ch/cyberduck/core/dav/DAVWriteFeature.java index 489260a42aa..bf7796f6a74 100644 --- a/webdav/src/main/java/ch/cyberduck/core/dav/DAVWriteFeature.java +++ b/webdav/src/main/java/ch/cyberduck/core/dav/DAVWriteFeature.java @@ -37,7 +37,8 @@ import org.apache.http.entity.AbstractHttpEntity; import org.apache.http.message.BasicHeader; import org.apache.http.protocol.HTTP; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import java.io.IOException; import java.util.ArrayList; @@ -47,7 +48,7 @@ import com.github.sardine.impl.handler.ETagResponseHandler; public class DAVWriteFeature extends AbstractHttpWriteFeature implements Write { - private static final Logger log = Logger.getLogger(DAVWriteFeature.class); + private static final Logger log = LogManager.getLogger(DAVWriteFeature.class); private final DAVSession session; diff --git a/webdav/src/main/java/ch/cyberduck/core/dav/SaxPropFindResponseHandler.java b/webdav/src/main/java/ch/cyberduck/core/dav/SaxPropFindResponseHandler.java index 0aae40a157a..45f26e078eb 100644 --- a/webdav/src/main/java/ch/cyberduck/core/dav/SaxPropFindResponseHandler.java +++ b/webdav/src/main/java/ch/cyberduck/core/dav/SaxPropFindResponseHandler.java @@ -16,7 +16,8 @@ */ import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.w3c.dom.Element; import org.xml.sax.Attributes; import org.xml.sax.ErrorHandler; @@ -38,7 +39,7 @@ import com.github.sardine.util.SardineUtil; public class SaxPropFindResponseHandler extends MultiStatusResponseHandler { - private static final Logger log = Logger.getLogger(SaxPropFindResponseHandler.class); + private static final Logger log = LogManager.getLogger(SaxPropFindResponseHandler.class); @Override protected Multistatus getMultistatus(final InputStream stream) throws IOException { diff --git a/webdav/src/main/java/ch/cyberduck/core/dav/microsoft/MicrosoftIISDAVAttributesFinderFeature.java b/webdav/src/main/java/ch/cyberduck/core/dav/microsoft/MicrosoftIISDAVAttributesFinderFeature.java index 555ac485ef1..ee7ee9e71f5 100644 --- a/webdav/src/main/java/ch/cyberduck/core/dav/microsoft/MicrosoftIISDAVAttributesFinderFeature.java +++ b/webdav/src/main/java/ch/cyberduck/core/dav/microsoft/MicrosoftIISDAVAttributesFinderFeature.java @@ -24,7 +24,8 @@ import ch.cyberduck.core.dav.DAVSession; import org.apache.commons.lang3.StringUtils; -import org.apache.log4j.Logger; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import javax.xml.namespace.QName; import java.io.IOException; @@ -34,7 +35,7 @@ import com.github.sardine.DavResource; public class MicrosoftIISDAVAttributesFinderFeature extends DAVAttributesFinderFeature { - private static final Logger log = Logger.getLogger(MicrosoftIISDAVAttributesFinderFeature.class); + private static final Logger log = LogManager.getLogger(MicrosoftIISDAVAttributesFinderFeature.class); private final DAVSession session; diff --git a/windows/src/main/csharp/ch/cyberduck/ui/controller/ActivityController.cs b/windows/src/main/csharp/ch/cyberduck/ui/controller/ActivityController.cs index 2b72e86f0c7..de7b18ce967 100644 --- a/windows/src/main/csharp/ch/cyberduck/ui/controller/ActivityController.cs +++ b/windows/src/main/csharp/ch/cyberduck/ui/controller/ActivityController.cs @@ -23,7 +23,7 @@ using ch.cyberduck.core.exception; using ch.cyberduck.core.threading; using java.lang; -using org.apache.log4j; +using org.apache.logging.log4j; using Exception = System.Exception; using Object = System.Object; @@ -31,7 +31,7 @@ namespace Ch.Cyberduck.Ui.Controller { internal sealed class ActivityController : WindowController { - private static readonly Logger Log = Logger.getLogger(typeof (ActivityController).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof (ActivityController).FullName); private static readonly object SyncRoot = new Object(); private static volatile ActivityController _instance; @@ -126,7 +126,7 @@ public override void collectionItemRemoved(object item) private class AddTaskAction : WindowMainAction { - private static readonly Logger Log = Logger.getLogger(typeof (AddTaskAction).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof (AddTaskAction).FullName); private readonly BackgroundAction _action; private readonly ActivityController _controller; @@ -145,7 +145,7 @@ public override void run() private class RemoveTaskAction : WindowMainAction { - private static readonly Logger Log = Logger.getLogger(typeof (AddTaskAction).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof (AddTaskAction).FullName); private readonly BackgroundAction _action; private readonly ActivityController _controller; @@ -196,4 +196,4 @@ public bool alert(Host host, BackgroundException be, StringBuilder sb) } } } -} \ No newline at end of file +} diff --git a/windows/src/main/csharp/ch/cyberduck/ui/controller/AsyncController.cs b/windows/src/main/csharp/ch/cyberduck/ui/controller/AsyncController.cs index 7af34a250c7..cd03e50c1ed 100644 --- a/windows/src/main/csharp/ch/cyberduck/ui/controller/AsyncController.cs +++ b/windows/src/main/csharp/ch/cyberduck/ui/controller/AsyncController.cs @@ -22,7 +22,7 @@ using Ch.Cyberduck.Core; using Ch.Cyberduck.Ui.Controller.Threading; using java.lang; -using org.apache.log4j; +using org.apache.logging.log4j; using Exception = System.Exception; namespace Ch.Cyberduck.Ui.Controller @@ -33,7 +33,7 @@ public abstract class AsyncController : AbstractController public delegate void SyncDelegate(); - private static readonly Logger Log = Logger.getLogger(typeof (AsyncController).Name); + private static readonly Logger Log = LogManager.getLogger(typeof (AsyncController).Name); public virtual IView View { get; set; } @@ -157,4 +157,4 @@ public override void cleanup() _cleanup(); } } -} \ No newline at end of file +} diff --git a/windows/src/main/csharp/ch/cyberduck/ui/controller/BookmarkController.cs b/windows/src/main/csharp/ch/cyberduck/ui/controller/BookmarkController.cs index 7af496344a4..b6777201bfb 100644 --- a/windows/src/main/csharp/ch/cyberduck/ui/controller/BookmarkController.cs +++ b/windows/src/main/csharp/ch/cyberduck/ui/controller/BookmarkController.cs @@ -30,7 +30,7 @@ using Ch.Cyberduck.Core.Refresh.Services; using Ch.Cyberduck.Ui.Winforms.Controls; using java.util; -using org.apache.log4j; +using org.apache.logging.log4j; using Splat; using StructureMap; using System; @@ -58,7 +58,7 @@ public abstract class BookmarkController : WindowController where T : IBoo protected readonly LoginInputValidator _validator; private const String TimezoneIdPrefixes = "^(Africa|America|Asia|Atlantic|Australia|Europe|Indian|Pacific)/.*"; private static readonly string Default = LocaleFactory.localizedString("Default"); - private static readonly Logger Log = Logger.getLogger(typeof(BookmarkController<>).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof(BookmarkController<>).FullName); private static readonly TimeZone UTC = TimeZone.getTimeZone("UTC"); private readonly AbstractCollectionListener _bookmarkCollectionListener; private readonly HostPasswordStore _keychain = PasswordStoreFactory.get(); diff --git a/windows/src/main/csharp/ch/cyberduck/ui/controller/BrowserController.cs b/windows/src/main/csharp/ch/cyberduck/ui/controller/BrowserController.cs index f194efc152a..74a4204ed73 100644 --- a/windows/src/main/csharp/ch/cyberduck/ui/controller/BrowserController.cs +++ b/windows/src/main/csharp/ch/cyberduck/ui/controller/BrowserController.cs @@ -49,7 +49,7 @@ using java.lang; using java.text; using java.util; -using org.apache.log4j; +using org.apache.logging.log4j; using StructureMap; using static Ch.Cyberduck.ImageHelper; using Application = ch.cyberduck.core.local.Application; @@ -71,7 +71,7 @@ public class BrowserController : WindowController, TranscriptListe public delegate bool DialogCallbackDelegate(DialogResult result); - private static readonly Logger Log = Logger.getLogger(typeof(BrowserController).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof(BrowserController).FullName); protected static string DEFAULT = LocaleFactory.localizedString("Default"); private readonly AbstractHostCollection _bookmarkCollection = BookmarkCollection.defaultCollection(); private readonly BookmarkModel _bookmarkModel; diff --git a/windows/src/main/csharp/ch/cyberduck/ui/controller/ConnectionController.cs b/windows/src/main/csharp/ch/cyberduck/ui/controller/ConnectionController.cs index 033a3543c10..d0e09e614b5 100644 --- a/windows/src/main/csharp/ch/cyberduck/ui/controller/ConnectionController.cs +++ b/windows/src/main/csharp/ch/cyberduck/ui/controller/ConnectionController.cs @@ -22,7 +22,7 @@ using ch.cyberduck.ui; using Ch.Cyberduck.Core; using java.lang; -using org.apache.log4j; +using org.apache.logging.log4j; namespace Ch.Cyberduck.Ui.Controller { @@ -31,7 +31,7 @@ public sealed class ConnectionController : BookmarkController private static readonly IDictionary Controllers = new Dictionary(); - private static readonly Logger Log = Logger.getLogger(typeof(ConnectionController).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof(ConnectionController).FullName); private ConnectionController(Host bookmark) : this(bookmark, new LoginOptions(bookmark.getProtocol())) diff --git a/windows/src/main/csharp/ch/cyberduck/ui/controller/DefaultBookmarkController.cs b/windows/src/main/csharp/ch/cyberduck/ui/controller/DefaultBookmarkController.cs index b7962f7526c..8f53166ff06 100644 --- a/windows/src/main/csharp/ch/cyberduck/ui/controller/DefaultBookmarkController.cs +++ b/windows/src/main/csharp/ch/cyberduck/ui/controller/DefaultBookmarkController.cs @@ -20,14 +20,14 @@ using ch.cyberduck.core; using ch.cyberduck.core.exception; using Ch.Cyberduck.Core; -using org.apache.log4j; +using org.apache.logging.log4j; using org.apache.commons.lang3; namespace Ch.Cyberduck.Ui.Controller { public sealed class DefaultBookmarkController : BookmarkController { - private static readonly Logger Log = Logger.getLogger(typeof(DefaultBookmarkController).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof(DefaultBookmarkController).FullName); public DefaultBookmarkController(Host bookmark) : base(bookmark) { diff --git a/windows/src/main/csharp/ch/cyberduck/ui/controller/DownloadPromptModel.cs b/windows/src/main/csharp/ch/cyberduck/ui/controller/DownloadPromptModel.cs index e20e41ef980..dae5e86bf11 100644 --- a/windows/src/main/csharp/ch/cyberduck/ui/controller/DownloadPromptModel.cs +++ b/windows/src/main/csharp/ch/cyberduck/ui/controller/DownloadPromptModel.cs @@ -19,7 +19,7 @@ using ch.cyberduck.core; using ch.cyberduck.core.pool; using ch.cyberduck.core.transfer; -using org.apache.log4j; +using org.apache.logging.log4j; namespace Ch.Cyberduck.Ui.Controller { @@ -31,4 +31,4 @@ public DownloadPromptModel(TransferPromptController controller, SessionPool sour ; } } -} \ No newline at end of file +} diff --git a/windows/src/main/csharp/ch/cyberduck/ui/controller/HostKeyController.cs b/windows/src/main/csharp/ch/cyberduck/ui/controller/HostKeyController.cs index 2e674d4f6a1..95590cca3c8 100644 --- a/windows/src/main/csharp/ch/cyberduck/ui/controller/HostKeyController.cs +++ b/windows/src/main/csharp/ch/cyberduck/ui/controller/HostKeyController.cs @@ -24,13 +24,13 @@ using Ch.Cyberduck.Core.TaskDialog; using java.security; using net.schmizz.sshj.common; -using org.apache.log4j; +using org.apache.logging.log4j; namespace Ch.Cyberduck.Ui.Controller { public class HostKeyController : PreferencesHostKeyVerifier { - private static readonly Logger Log = Logger.getLogger(typeof (HostKeyController).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof (HostKeyController).FullName); ///

/// Parent browser diff --git a/windows/src/main/csharp/ch/cyberduck/ui/controller/InfoController.cs b/windows/src/main/csharp/ch/cyberduck/ui/controller/InfoController.cs index 82418b46417..920f4103b7f 100755 --- a/windows/src/main/csharp/ch/cyberduck/ui/controller/InfoController.cs +++ b/windows/src/main/csharp/ch/cyberduck/ui/controller/InfoController.cs @@ -44,7 +44,7 @@ using java.text; using java.util; using org.apache.commons.lang3; -using org.apache.log4j; +using org.apache.logging.log4j; using org.jets3t.service.model; using StructureMap; using static Ch.Cyberduck.ImageHelper; @@ -58,7 +58,7 @@ namespace Ch.Cyberduck.Ui.Controller { public sealed class InfoController : WindowController { - private static readonly Logger Log = Logger.getLogger(typeof(InfoController).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof(InfoController).FullName); private static readonly string _multipleFilesString = "(" + LocaleFactory.localizedString("Multiple files") + ")"; diff --git a/windows/src/main/csharp/ch/cyberduck/ui/controller/MainController.cs b/windows/src/main/csharp/ch/cyberduck/ui/controller/MainController.cs index ad107525c86..760bee83389 100755 --- a/windows/src/main/csharp/ch/cyberduck/ui/controller/MainController.cs +++ b/windows/src/main/csharp/ch/cyberduck/ui/controller/MainController.cs @@ -64,7 +64,7 @@ using java.util; using Microsoft.WindowsAPICodePack.Shell; using Microsoft.WindowsAPICodePack.Taskbar; -using org.apache.log4j; +using org.apache.logging.log4j; using ReactiveUI; using Splat; using StructureMap; @@ -91,7 +91,7 @@ internal class MainController : ApplicationContext, CollectionListener, ICyberdu { public static readonly string StartupLanguage; private static readonly IList _browsers = new List(); - private static readonly Logger Logger = Logger.getLogger(typeof(MainController).FullName); + private static readonly Logger Logger = LogManager.getLogger(typeof(MainController).FullName); private static MainController _application; private static JumpList _jumpListManager; private static AutoResetEvent applicationShutdown = new AutoResetEvent(true); diff --git a/windows/src/main/csharp/ch/cyberduck/ui/controller/PreferencesController.cs b/windows/src/main/csharp/ch/cyberduck/ui/controller/PreferencesController.cs index 71d1f05a4c6..2aa65156dfa 100755 --- a/windows/src/main/csharp/ch/cyberduck/ui/controller/PreferencesController.cs +++ b/windows/src/main/csharp/ch/cyberduck/ui/controller/PreferencesController.cs @@ -35,7 +35,7 @@ using ch.cyberduck.core.googlestorage; using java.util; using java.util.regex; -using org.apache.log4j; +using org.apache.logging.log4j; using StructureMap; namespace Ch.Cyberduck.Ui.Controller @@ -44,7 +44,7 @@ internal class PreferencesController : WindowController, Colle { private static readonly string ForFiles = LocaleFactory.localizedString("for Files", "Preferences"); private static readonly string ForFolders = LocaleFactory.localizedString("for Folders", "Preferences"); - private static readonly Logger Log = Logger.getLogger(typeof(PreferencesController).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof(PreferencesController).FullName); private static readonly KeyValueIconTriple NoneBookmark = new KeyValueIconTriple(null, LocaleFactory.localizedString("None"), null); diff --git a/windows/src/main/csharp/ch/cyberduck/ui/controller/PromptLoginController.cs b/windows/src/main/csharp/ch/cyberduck/ui/controller/PromptLoginController.cs index 111a7ddc4f5..01760c8a450 100644 --- a/windows/src/main/csharp/ch/cyberduck/ui/controller/PromptLoginController.cs +++ b/windows/src/main/csharp/ch/cyberduck/ui/controller/PromptLoginController.cs @@ -27,7 +27,7 @@ using Ch.Cyberduck.Core.Native; using Ch.Cyberduck.Core.TaskDialog; using java.util.concurrent; -using org.apache.log4j; +using org.apache.logging.log4j; using StructureMap; using static Ch.Cyberduck.ImageHelper; using Path = System.IO.Path; @@ -36,7 +36,7 @@ namespace Ch.Cyberduck.Ui.Controller { public class PromptLoginController : PromptPasswordController, LoginCallback { - private static readonly Logger Log = Logger.getLogger(typeof(PromptLoginController).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof(PromptLoginController).FullName); private readonly WindowController _browser; private readonly List _keys = new List { LocaleFactory.localizedString("None") }; diff --git a/windows/src/main/csharp/ch/cyberduck/ui/controller/TransferController.cs b/windows/src/main/csharp/ch/cyberduck/ui/controller/TransferController.cs index cf35bffad07..a5412eecdc1 100644 --- a/windows/src/main/csharp/ch/cyberduck/ui/controller/TransferController.cs +++ b/windows/src/main/csharp/ch/cyberduck/ui/controller/TransferController.cs @@ -31,7 +31,7 @@ using Ch.Cyberduck.Core.TaskDialog; using Ch.Cyberduck.Ui.Controller.Threading; using java.text; -using org.apache.log4j; +using org.apache.logging.log4j; using StructureMap; using static Ch.Cyberduck.ImageHelper; @@ -39,7 +39,7 @@ namespace Ch.Cyberduck.Ui.Controller { public class TransferController : WindowController, TranscriptListener, CollectionListener { - private static readonly Logger Log = Logger.getLogger(typeof (TransferController).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof (TransferController).FullName); private static readonly object SyncRoot = new Object(); private static volatile TransferController _instance; private readonly TransferCollection _collection = TransferCollection.defaultCollection(); diff --git a/windows/src/main/csharp/ch/cyberduck/ui/controller/TransferPromptController.cs b/windows/src/main/csharp/ch/cyberduck/ui/controller/TransferPromptController.cs index 0f24a0a2e1c..81aa367fe61 100644 --- a/windows/src/main/csharp/ch/cyberduck/ui/controller/TransferPromptController.cs +++ b/windows/src/main/csharp/ch/cyberduck/ui/controller/TransferPromptController.cs @@ -28,7 +28,7 @@ using ch.cyberduck.core.shared; using ch.cyberduck.core.threading; using ch.cyberduck.core.transfer; -using org.apache.log4j; +using org.apache.logging.log4j; using Ch.Cyberduck.Core; namespace Ch.Cyberduck.Ui.Controller @@ -36,7 +36,7 @@ namespace Ch.Cyberduck.Ui.Controller public abstract class TransferPromptController : WindowController, TransferPrompt, ProgressListener, TranscriptListener { - private static readonly Logger Log = Logger.getLogger(typeof (TransferPromptController)); + private static readonly Logger Log = LogManager.getLogger(typeof (TransferPromptController)); private static readonly string UnknownString = LocaleFactory.localizedString("Unknown"); protected readonly SessionPool Source; protected readonly SessionPool Destination; diff --git a/windows/src/main/csharp/ch/cyberduck/ui/controller/TransferPromptModel.cs b/windows/src/main/csharp/ch/cyberduck/ui/controller/TransferPromptModel.cs index a9e6539babe..ad4819fe064 100644 --- a/windows/src/main/csharp/ch/cyberduck/ui/controller/TransferPromptModel.cs +++ b/windows/src/main/csharp/ch/cyberduck/ui/controller/TransferPromptModel.cs @@ -29,14 +29,14 @@ using ch.cyberduck.core.worker; using Ch.Cyberduck.Core; using java.util; -using org.apache.log4j; +using org.apache.logging.log4j; using static Ch.Cyberduck.ImageHelper; namespace Ch.Cyberduck.Ui.Controller { public abstract class TransferPromptModel { - protected static Logger log = Logger.getLogger(typeof (TransferPromptModel).FullName); + protected static Logger log = LogManager.getLogger(typeof (TransferPromptModel).FullName); private readonly TransferItemCache _cache = new TransferItemCache(int.MaxValue); private readonly TransferPromptController _controller; private readonly List _roots = new List(); diff --git a/windows/src/main/csharp/ch/cyberduck/ui/core/preferences/ApplicationPreferences.cs b/windows/src/main/csharp/ch/cyberduck/ui/core/preferences/ApplicationPreferences.cs index 6c962662744..bbacc23dcc6 100644 --- a/windows/src/main/csharp/ch/cyberduck/ui/core/preferences/ApplicationPreferences.cs +++ b/windows/src/main/csharp/ch/cyberduck/ui/core/preferences/ApplicationPreferences.cs @@ -33,7 +33,7 @@ using Ch.Cyberduck.Core.Urlhandler; using Ch.Cyberduck.Ui.Controller; using Ch.Cyberduck.Ui.Winforms.Threading; -using org.apache.log4j; +using org.apache.logging.log4j; using System.Reflection; using System.Text.RegularExpressions; using Application = System.Windows.Forms.Application; @@ -43,7 +43,7 @@ namespace Ch.Cyberduck.Ui.Core.Preferences { public class ApplicationPreferences : SettingsDictionaryPreferences { - private static readonly Logger Log = Logger.getLogger(typeof(ApplicationPreferences).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof(ApplicationPreferences).FullName); protected override void setDefaults() { diff --git a/windows/src/main/csharp/ch/cyberduck/ui/winforms/BaseForm.cs b/windows/src/main/csharp/ch/cyberduck/ui/winforms/BaseForm.cs index 6cf1cac256f..2113f63637d 100755 --- a/windows/src/main/csharp/ch/cyberduck/ui/winforms/BaseForm.cs +++ b/windows/src/main/csharp/ch/cyberduck/ui/winforms/BaseForm.cs @@ -35,7 +35,7 @@ public partial class BaseForm : Form, IView { private Font _defaultFontBold; private bool _releaseWhenClose = true; - //private static readonly Logger Log = Logger.getLogger(typeof (BaseForm).FullName); + //private static readonly Logger Log = LogManager.getLogger(typeof (BaseForm).FullName); protected Commands Commands = new Commands(); public BaseForm() diff --git a/windows/src/main/csharp/ch/cyberduck/ui/winforms/BrowserForm.cs b/windows/src/main/csharp/ch/cyberduck/ui/winforms/BrowserForm.cs index 6b9f4e5e451..531b9398e1b 100644 --- a/windows/src/main/csharp/ch/cyberduck/ui/winforms/BrowserForm.cs +++ b/windows/src/main/csharp/ch/cyberduck/ui/winforms/BrowserForm.cs @@ -33,7 +33,7 @@ using Ch.Cyberduck.Ui.Winforms.Controls; using org.apache.commons.io; using org.apache.commons.lang3; -using org.apache.log4j; +using org.apache.logging.log4j; using StructureMap; using System; using System.Collections; @@ -63,7 +63,7 @@ namespace Ch.Cyberduck.Ui.Winforms public partial class BrowserForm : BaseForm, IBrowserView { private static readonly Font FixedFont = new Font(FontFamily.GenericMonospace, 8); - private static readonly Logger Log = Logger.getLogger(typeof(BrowserForm).FullName); + private static readonly Logger Log = LogManager.getLogger(typeof(BrowserForm).FullName); private static readonly TypeConverter ShortcutConverter = TypeDescriptor.GetConverter(typeof(Keys)); private bool _browserStateRestored; private BrowserView _currentView;