mirror of
https://github.com/google/nomulus
synced 2026-08-29 12:17:06 +00:00
Migrate to Flogger (green)
This is a 'green' Flogger migration CL. Green CLs are intended to be as safe as possible and should be easy to review and submit. No changes should be necessary to the code itself prior to submission, but small changes to BUILD files may be required. Changes within files are completely independent of each other, so this CL can be safely split up for review using tools such as Rosie. For more information, see [] Base CL: 197826149 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=198560170
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
package google.registry.rde;
|
||||
|
||||
import com.google.common.base.Splitter;
|
||||
import com.google.common.logging.FormattingLogger;
|
||||
import com.google.common.flogger.FluentLogger;
|
||||
import com.jcraft.jsch.ChannelSftp;
|
||||
import com.jcraft.jsch.JSch;
|
||||
import com.jcraft.jsch.JSchException;
|
||||
@@ -41,7 +41,7 @@ import org.joda.time.Duration;
|
||||
*/
|
||||
final class JSchSshSession implements Closeable {
|
||||
|
||||
private static final FormattingLogger logger = FormattingLogger.getLoggerForCallerClass();
|
||||
private static final FluentLogger logger = FluentLogger.forEnclosingClass();
|
||||
|
||||
/** Factory for {@link JSchSshSession}. */
|
||||
static final class JSchSshSessionFactory {
|
||||
@@ -60,7 +60,7 @@ final class JSchSshSession implements Closeable {
|
||||
*/
|
||||
JSchSshSession create(JSch jsch, URI uri) throws JSchException {
|
||||
RdeUploadUrl url = RdeUploadUrl.create(uri);
|
||||
logger.infofmt("Connecting to SSH endpoint: %s", url);
|
||||
logger.atInfo().log("Connecting to SSH endpoint: %s", url);
|
||||
Session session = jsch.getSession(
|
||||
url.getUser().orElse("domain-registry"),
|
||||
url.getHost(),
|
||||
@@ -99,7 +99,7 @@ final class JSchSshSession implements Closeable {
|
||||
try {
|
||||
chan.cd(dir);
|
||||
} catch (SftpException e) {
|
||||
logger.warning(e, "Could not open SFTP channel.");
|
||||
logger.atWarning().withCause(e).log("Could not open SFTP channel.");
|
||||
mkdirs(chan, dir);
|
||||
chan.cd(dir);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user