Debug info: system properties

This commit is contained in:
M66B 2022-05-12 11:09:57 +02:00
parent 993c5c4ea3
commit 9cf72bc018
1 changed files with 18 additions and 0 deletions

View File

@ -135,6 +135,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.TimeoutException;
@ -2075,6 +2076,23 @@ public class Log {
value = "[redacted]";
size += write(os, key + "=" + value + "\r\n");
}
size += write(os, "\r\n");
try {
List<String> names = new ArrayList<>();
Properties props = System.getProperties();
Enumeration<?> pnames = props.propertyNames();
while (pnames.hasMoreElements())
names.add((String) pnames.nextElement());
Collections.sort(names);
for (String name : names)
size += write(os, name + "=" + props.getProperty(name) + "\r\n");
} catch (Throwable ex) {
size += write(os, ex.getMessage() + "\r\n");
}
}
db.attachment().setDownloaded(attachment.id, size);