Skip to content

Commit

Permalink
Update to log4j2.
Browse files Browse the repository at this point in the history
  • Loading branch information
ylangisc authored and dkocher committed Dec 29, 2021
1 parent ac32f12 commit 60ae863
Show file tree
Hide file tree
Showing 691 changed files with 2,213 additions and 1,570 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down
5 changes: 3 additions & 2 deletions azure/src/main/java/ch/cyberduck/core/azure/AzureSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -77,7 +78,7 @@
import com.microsoft.azure.storage.blob.CloudBlobClient;

public class AzureSession extends SSLSession<CloudBlobClient> {
private static final Logger log = Logger.getLogger(AzureSession.class);
private static final Logger log = LogManager.getLogger(AzureSession.class);

private final OperationContext context
= new OperationContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -60,7 +61,7 @@
import com.microsoft.azure.storage.core.SR;

public class AzureWriteFeature extends AppendWriteFeature<Void> implements Write<Void> {
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -39,7 +40,7 @@
import synapticloop.b2.exception.B2ApiException;

public class B2AuthorizedUrlProvider implements PromptUrlProvider<Void, Void> {
private static final Logger log = Logger.getLogger(B2AuthorizedUrlProvider.class);
private static final Logger log = LogManager.getLogger(B2AuthorizedUrlProvider.class);

private final PathContainerService containerService
= new B2PathContainerService();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@
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;

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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<B2ApiException> {
private static final Logger log = Logger.getLogger(B2ExceptionMappingService.class);
private static final Logger log = LogManager.getLogger(B2ExceptionMappingService.class);

private final B2VersionIdProvider fileid;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -59,7 +60,7 @@
import static ch.cyberduck.core.b2.B2MetadataFeature.X_BZ_INFO_SRC_LAST_MODIFIED_MILLIS;

public class B2LargeUploadService extends HttpUploadFeature<BaseB2Response, MessageDigest> {
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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -56,7 +57,7 @@
import static ch.cyberduck.core.b2.B2MetadataFeature.X_BZ_INFO_SRC_LAST_MODIFIED_MILLIS;

public class B2LargeUploadWriteFeature implements MultipartWrite<B2StartLargeFileResponse> {
private static final Logger log = Logger.getLogger(B2LargeUploadWriteFeature.class);
private static final Logger log = LogManager.getLogger(B2LargeUploadWriteFeature.class);

private final PathContainerService containerService
= new B2PathContainerService();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -36,7 +37,7 @@
import synapticloop.b2.response.BaseB2Response;

public class B2SingleUploadService extends HttpUploadFeature<BaseB2Response, MessageDigest> {
private static final Logger log = Logger.getLogger(B2SingleUploadService.class);
private static final Logger log = LogManager.getLogger(B2SingleUploadService.class);

private final B2Session session;
private Write<BaseB2Response> writer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<BaseB2Response> {
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -50,7 +51,7 @@
import static ch.cyberduck.core.b2.B2MetadataFeature.X_BZ_INFO_SRC_LAST_MODIFIED_MILLIS;

public class B2WriteFeature extends AbstractHttpWriteFeature<BaseB2Response> implements Write<BaseB2Response> {
private static final Logger log = Logger.getLogger(B2WriteFeature.class);
private static final Logger log = LogManager.getLogger(B2WriteFeature.class);

private final PathContainerService containerService
= new B2PathContainerService();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading

0 comments on commit 60ae863

Please sign in to comment.