Remove duplicated constants storing key names of Ssh logs
Change-Id: Ife1da542b0e6fef3e77c53e371ae7049581d239f
This commit is contained in:
committed by
Matthias Sohn
parent
b9194d63cc
commit
ffc70d1b74
@@ -45,15 +45,16 @@ import org.eclipse.jgit.lib.Config;
|
||||
@Singleton
|
||||
class SshLog implements LifecycleListener, GerritConfigListener {
|
||||
private static final Logger log = Logger.getLogger(SshLog.class);
|
||||
private static final String LOG_NAME = "sshd_log";
|
||||
private static final String P_SESSION = "session";
|
||||
private static final String P_USER_NAME = "userName";
|
||||
private static final String P_ACCOUNT_ID = "accountId";
|
||||
private static final String P_WAIT = "queueWaitTime";
|
||||
private static final String P_EXEC = "executionTime";
|
||||
private static final String P_STATUS = "status";
|
||||
private static final String P_AGENT = "agent";
|
||||
private static final String P_MESSAGE = "message";
|
||||
|
||||
protected static final String LOG_NAME = "sshd_log";
|
||||
protected static final String P_SESSION = "session";
|
||||
protected static final String P_USER_NAME = "userName";
|
||||
protected static final String P_ACCOUNT_ID = "accountId";
|
||||
protected static final String P_WAIT = "queueWaitTime";
|
||||
protected static final String P_EXEC = "executionTime";
|
||||
protected static final String P_STATUS = "status";
|
||||
protected static final String P_AGENT = "agent";
|
||||
protected static final String P_MESSAGE = "message";
|
||||
|
||||
private final Provider<SshSession> session;
|
||||
private final Provider<Context> context;
|
||||
|
||||
@@ -14,6 +14,15 @@
|
||||
|
||||
package com.google.gerrit.sshd;
|
||||
|
||||
import static com.google.gerrit.sshd.SshLog.P_ACCOUNT_ID;
|
||||
import static com.google.gerrit.sshd.SshLog.P_AGENT;
|
||||
import static com.google.gerrit.sshd.SshLog.P_EXEC;
|
||||
import static com.google.gerrit.sshd.SshLog.P_MESSAGE;
|
||||
import static com.google.gerrit.sshd.SshLog.P_SESSION;
|
||||
import static com.google.gerrit.sshd.SshLog.P_STATUS;
|
||||
import static com.google.gerrit.sshd.SshLog.P_USER_NAME;
|
||||
import static com.google.gerrit.sshd.SshLog.P_WAIT;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
import java.util.TimeZone;
|
||||
@@ -23,15 +32,6 @@ import org.eclipse.jgit.util.QuotedString;
|
||||
|
||||
public final class SshLogLayout extends Layout {
|
||||
|
||||
private static final String P_SESSION = "session";
|
||||
private static final String P_USER_NAME = "userName";
|
||||
private static final String P_ACCOUNT_ID = "accountId";
|
||||
private static final String P_WAIT = "queueWaitTime";
|
||||
private static final String P_EXEC = "executionTime";
|
||||
private static final String P_STATUS = "status";
|
||||
private static final String P_AGENT = "agent";
|
||||
private static final String P_MESSAGE = "message";
|
||||
|
||||
private final Calendar calendar;
|
||||
private long lastTimeMillis;
|
||||
private final char[] lastTimeString = new char[20];
|
||||
|
||||
Reference in New Issue
Block a user