Improve some log output

This commit is contained in:
AsamK 2024-01-29 18:21:44 +01:00
parent 0840e0dedb
commit d1e32f2b11

View file

@ -192,9 +192,7 @@ public class SignalAccount implements Closeable {
final var pair = openFileChannel(fileName, waitForLock); final var pair = openFileChannel(fileName, waitForLock);
try { try {
var signalAccount = new SignalAccount(pair.first(), pair.second()); var signalAccount = new SignalAccount(pair.first(), pair.second());
logger.trace("Loading account file");
signalAccount.load(dataPath, accountPath, settings); signalAccount.load(dataPath, accountPath, settings);
logger.trace("Migrating legacy parts of account file");
signalAccount.migrateLegacyConfigs(); signalAccount.migrateLegacyConfigs();
signalAccount.init(); signalAccount.init();
@ -367,6 +365,7 @@ public class SignalAccount implements Closeable {
private void migrateLegacyConfigs() { private void migrateLegacyConfigs() {
if (isPrimaryDevice() && getPniIdentityKeyPair() == null) { if (isPrimaryDevice() && getPniIdentityKeyPair() == null) {
logger.trace("Migrating legacy parts of account file");
setPniIdentityKeyPair(KeyUtils.generateIdentityKeyPair()); setPniIdentityKeyPair(KeyUtils.generateIdentityKeyPair());
} }
} }
@ -438,6 +437,7 @@ public class SignalAccount implements Closeable {
private void load( private void load(
File dataPath, String accountPath, final Settings settings File dataPath, String accountPath, final Settings settings
) throws IOException { ) throws IOException {
logger.trace("Loading account file {}", accountPath);
this.dataPath = dataPath; this.dataPath = dataPath;
this.accountPath = accountPath; this.accountPath = accountPath;
this.settings = settings; this.settings = settings;