git://git.nikiroo.be
/
fanfix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8096ee8
)
time in log from remote server
author
Niki Roo
<niki@nikiroo.be>
Sun, 12 May 2019 16:26:29 +0000
(18:26 +0200)
committer
Niki Roo
<niki@nikiroo.be>
Sun, 12 May 2019 16:26:29 +0000
(18:26 +0200)
src/be/nikiroo/fanfix/library/RemoteLibraryServer.java
patch
|
blob
|
blame
|
history
diff --git
a/src/be/nikiroo/fanfix/library/RemoteLibraryServer.java
b/src/be/nikiroo/fanfix/library/RemoteLibraryServer.java
index c3933ebb276c65e171546109c59d6daa96df8501..f88b25ae5a3d335938fba59b0c3a24fea6afb8f9 100644
(file)
--- a/
src/be/nikiroo/fanfix/library/RemoteLibraryServer.java
+++ b/
src/be/nikiroo/fanfix/library/RemoteLibraryServer.java
@@
-142,7
+142,8
@@
public class RemoteLibraryServer extends ServerObject {
for (Object arg : args) {
trace += arg + " ";
}
for (Object arg : args) {
trace += arg + " ";
}
- System.out.println(trace);
+ long now = System.currentTimeMillis();
+ System.out.println(StringUtils.fromTime(now) + ": " + trace);
Object rep = null;
try {
Object rep = null;
try {
@@
-180,9
+181,12
@@
public class RemoteLibraryServer extends ServerObject {
String rec = StringUtils.formatNumber(bytesReceived) + "b";
String sent = StringUtils.formatNumber(bytesSent) + "b";
String rec = StringUtils.formatNumber(bytesReceived) + "b";
String sent = StringUtils.formatNumber(bytesSent) + "b";
- System.out.println(String.format("%s[>%s]: (%s sent, %s rec) in %d ms",
- display(whitelist, rw), commands.get(id), sent, rec,
- times.get(id)));
+ long now = System.currentTimeMillis();
+ System.out.println(StringUtils.fromTime(now)
+ + ": "
+ + String.format("%s[>%s]: (%s sent, %s rec) in %d ms",
+ display(whitelist, rw), commands.get(id), sent, rec,
+ times.get(id)));
commands.remove(id);
times.remove(id);
commands.remove(id);
times.remove(id);
@@
-347,7
+351,9
@@
public class RemoteLibraryServer extends ServerObject {
@Override
protected void onError(Exception e) {
if (e instanceof SSLException) {
@Override
protected void onError(Exception e) {
if (e instanceof SSLException) {
- System.out.println("[Client connection refused (bad key)]");
+ long now = System.currentTimeMillis();
+ System.out.println(StringUtils.fromTime(now) + ": "
+ + "[Client connection refused (bad key)]");
} else {
getTraceHandler().error(e);
}
} else {
getTraceHandler().error(e);
}