mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 12:19:54 +01:00
Remove debug logging.
This commit is contained in:
@@ -32,22 +32,16 @@ import org.briarproject.bramble.api.system.Clock;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import javax.annotation.concurrent.Immutable;
|
import javax.annotation.concurrent.Immutable;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import static java.util.logging.Level.INFO;
|
|
||||||
|
|
||||||
@Immutable
|
@Immutable
|
||||||
@NotNullByDefault
|
@NotNullByDefault
|
||||||
class TransportPropertyManagerImpl implements TransportPropertyManager,
|
class TransportPropertyManagerImpl implements TransportPropertyManager,
|
||||||
Client, ContactHook, ClientVersioningHook, IncomingMessageHook {
|
Client, ContactHook, ClientVersioningHook, IncomingMessageHook {
|
||||||
|
|
||||||
private static final Logger LOG =
|
|
||||||
Logger.getLogger(TransportPropertyManagerImpl.class.getName());
|
|
||||||
|
|
||||||
private final DatabaseComponent db;
|
private final DatabaseComponent db;
|
||||||
private final ClientHelper clientHelper;
|
private final ClientHelper clientHelper;
|
||||||
private final ClientVersioningManager clientVersioningManager;
|
private final ClientVersioningManager clientVersioningManager;
|
||||||
@@ -89,8 +83,6 @@ class TransportPropertyManagerImpl implements TransportPropertyManager,
|
|||||||
// Apply the client's visibility to the contact group
|
// Apply the client's visibility to the contact group
|
||||||
Visibility client = clientVersioningManager.getClientVisibility(txn,
|
Visibility client = clientVersioningManager.getClientVisibility(txn,
|
||||||
c.getId(), CLIENT_ID, MAJOR_VERSION);
|
c.getId(), CLIENT_ID, MAJOR_VERSION);
|
||||||
if (LOG.isLoggable(INFO))
|
|
||||||
LOG.info("Applying visibility " + client + " to new contact group");
|
|
||||||
db.setGroupVisibility(txn, c.getId(), g.getId(), client);
|
db.setGroupVisibility(txn, c.getId(), g.getId(), client);
|
||||||
// Copy the latest local properties into the group
|
// Copy the latest local properties into the group
|
||||||
Map<TransportId, TransportProperties> local = getLocalProperties(txn);
|
Map<TransportId, TransportProperties> local = getLocalProperties(txn);
|
||||||
@@ -110,8 +102,6 @@ class TransportPropertyManagerImpl implements TransportPropertyManager,
|
|||||||
Visibility v) throws DbException {
|
Visibility v) throws DbException {
|
||||||
// Apply the client's visibility to the contact group
|
// Apply the client's visibility to the contact group
|
||||||
Group g = getContactGroup(c);
|
Group g = getContactGroup(c);
|
||||||
if (LOG.isLoggable(INFO))
|
|
||||||
LOG.info("Applying visibility " + v + " to contact group");
|
|
||||||
db.setGroupVisibility(txn, c.getId(), g.getId(), v);
|
db.setGroupVisibility(txn, c.getId(), g.getId(), v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ import javax.annotation.Nullable;
|
|||||||
import javax.annotation.concurrent.Immutable;
|
import javax.annotation.concurrent.Immutable;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import static java.util.logging.Level.INFO;
|
|
||||||
import static org.briarproject.bramble.api.sync.Group.Visibility.SHARED;
|
import static org.briarproject.bramble.api.sync.Group.Visibility.SHARED;
|
||||||
import static org.briarproject.briar.api.introduction.Role.INTRODUCEE;
|
import static org.briarproject.briar.api.introduction.Role.INTRODUCEE;
|
||||||
import static org.briarproject.briar.api.introduction.Role.INTRODUCER;
|
import static org.briarproject.briar.api.introduction.Role.INTRODUCER;
|
||||||
@@ -128,8 +127,6 @@ class IntroductionManagerImpl extends ConversationClientImpl
|
|||||||
// Apply the client's visibility to the contact group
|
// Apply the client's visibility to the contact group
|
||||||
Visibility client = clientVersioningManager.getClientVisibility(txn,
|
Visibility client = clientVersioningManager.getClientVisibility(txn,
|
||||||
c.getId(), CLIENT_ID, MAJOR_VERSION);
|
c.getId(), CLIENT_ID, MAJOR_VERSION);
|
||||||
if (LOG.isLoggable(INFO))
|
|
||||||
LOG.info("Applying visibility " + client + " to new contact group");db.setGroupVisibility(txn, c.getId(), g.getId(), client);
|
|
||||||
db.setGroupVisibility(txn, c.getId(), g.getId(), client);
|
db.setGroupVisibility(txn, c.getId(), g.getId(), client);
|
||||||
// Attach the contact ID to the group
|
// Attach the contact ID to the group
|
||||||
BdfDictionary meta = new BdfDictionary();
|
BdfDictionary meta = new BdfDictionary();
|
||||||
@@ -156,8 +153,6 @@ class IntroductionManagerImpl extends ConversationClientImpl
|
|||||||
Visibility v) throws DbException {
|
Visibility v) throws DbException {
|
||||||
// Apply the client's visibility to the contact group
|
// Apply the client's visibility to the contact group
|
||||||
Group g = getContactGroup(c);
|
Group g = getContactGroup(c);
|
||||||
if (LOG.isLoggable(INFO))
|
|
||||||
LOG.info("Applying visibility " + v + " to contact group");
|
|
||||||
db.setGroupVisibility(txn, c.getId(), g.getId(), v);
|
db.setGroupVisibility(txn, c.getId(), g.getId(), v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,12 +32,10 @@ import org.briarproject.briar.client.ConversationClientImpl;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import javax.annotation.concurrent.Immutable;
|
import javax.annotation.concurrent.Immutable;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import static java.util.logging.Level.INFO;
|
|
||||||
import static org.briarproject.briar.client.MessageTrackerConstants.MSG_KEY_READ;
|
import static org.briarproject.briar.client.MessageTrackerConstants.MSG_KEY_READ;
|
||||||
|
|
||||||
@Immutable
|
@Immutable
|
||||||
@@ -45,9 +43,6 @@ import static org.briarproject.briar.client.MessageTrackerConstants.MSG_KEY_READ
|
|||||||
class MessagingManagerImpl extends ConversationClientImpl
|
class MessagingManagerImpl extends ConversationClientImpl
|
||||||
implements MessagingManager, Client, ContactHook, ClientVersioningHook {
|
implements MessagingManager, Client, ContactHook, ClientVersioningHook {
|
||||||
|
|
||||||
private static final Logger LOG =
|
|
||||||
Logger.getLogger(MessagingManagerImpl.class.getName());
|
|
||||||
|
|
||||||
private final ClientVersioningManager clientVersioningManager;
|
private final ClientVersioningManager clientVersioningManager;
|
||||||
private final ContactGroupFactory contactGroupFactory;
|
private final ContactGroupFactory contactGroupFactory;
|
||||||
|
|
||||||
@@ -81,8 +76,6 @@ class MessagingManagerImpl extends ConversationClientImpl
|
|||||||
// Apply the client's visibility to the contact group
|
// Apply the client's visibility to the contact group
|
||||||
Visibility client = clientVersioningManager.getClientVisibility(txn,
|
Visibility client = clientVersioningManager.getClientVisibility(txn,
|
||||||
c.getId(), CLIENT_ID, MAJOR_VERSION);
|
c.getId(), CLIENT_ID, MAJOR_VERSION);
|
||||||
if (LOG.isLoggable(INFO))
|
|
||||||
LOG.info("Applying visibility " + client + " to new contact group");
|
|
||||||
db.setGroupVisibility(txn, c.getId(), g.getId(), client);
|
db.setGroupVisibility(txn, c.getId(), g.getId(), client);
|
||||||
// Attach the contact ID to the group
|
// Attach the contact ID to the group
|
||||||
BdfDictionary d = new BdfDictionary();
|
BdfDictionary d = new BdfDictionary();
|
||||||
@@ -110,8 +103,6 @@ class MessagingManagerImpl extends ConversationClientImpl
|
|||||||
Visibility v) throws DbException {
|
Visibility v) throws DbException {
|
||||||
// Apply the client's visibility to the contact group
|
// Apply the client's visibility to the contact group
|
||||||
Group g = getContactGroup(c);
|
Group g = getContactGroup(c);
|
||||||
if (LOG.isLoggable(INFO))
|
|
||||||
LOG.info("Applying visibility " + v + " to contact group");
|
|
||||||
db.setGroupVisibility(txn, c.getId(), g.getId(), v);
|
db.setGroupVisibility(txn, c.getId(), g.getId(), v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -43,13 +43,11 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import javax.annotation.concurrent.Immutable;
|
import javax.annotation.concurrent.Immutable;
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
|
||||||
import static java.util.logging.Level.INFO;
|
|
||||||
import static org.briarproject.briar.privategroup.invitation.CreatorState.START;
|
import static org.briarproject.briar.privategroup.invitation.CreatorState.START;
|
||||||
import static org.briarproject.briar.privategroup.invitation.GroupInvitationConstants.GROUP_KEY_CONTACT_ID;
|
import static org.briarproject.briar.privategroup.invitation.GroupInvitationConstants.GROUP_KEY_CONTACT_ID;
|
||||||
import static org.briarproject.briar.privategroup.invitation.MessageType.ABORT;
|
import static org.briarproject.briar.privategroup.invitation.MessageType.ABORT;
|
||||||
@@ -66,9 +64,6 @@ class GroupInvitationManagerImpl extends ConversationClientImpl
|
|||||||
implements GroupInvitationManager, Client, ContactHook,
|
implements GroupInvitationManager, Client, ContactHook,
|
||||||
PrivateGroupHook, ClientVersioningHook {
|
PrivateGroupHook, ClientVersioningHook {
|
||||||
|
|
||||||
private static final Logger LOG =
|
|
||||||
Logger.getLogger(GroupInvitationManagerImpl.class.getName());
|
|
||||||
|
|
||||||
private final ClientVersioningManager clientVersioningManager;
|
private final ClientVersioningManager clientVersioningManager;
|
||||||
private final ContactGroupFactory contactGroupFactory;
|
private final ContactGroupFactory contactGroupFactory;
|
||||||
private final PrivateGroupFactory privateGroupFactory;
|
private final PrivateGroupFactory privateGroupFactory;
|
||||||
@@ -123,8 +118,6 @@ class GroupInvitationManagerImpl extends ConversationClientImpl
|
|||||||
db.addGroup(txn, g);
|
db.addGroup(txn, g);
|
||||||
Visibility client = clientVersioningManager.getClientVisibility(txn,
|
Visibility client = clientVersioningManager.getClientVisibility(txn,
|
||||||
c.getId(), CLIENT_ID, MAJOR_VERSION);
|
c.getId(), CLIENT_ID, MAJOR_VERSION);
|
||||||
if (LOG.isLoggable(INFO))
|
|
||||||
LOG.info("Applying visibility " + client + " to new contact group");
|
|
||||||
db.setGroupVisibility(txn, c.getId(), g.getId(), client);
|
db.setGroupVisibility(txn, c.getId(), g.getId(), client);
|
||||||
// Attach the contact ID to the group
|
// Attach the contact ID to the group
|
||||||
BdfDictionary meta = new BdfDictionary();
|
BdfDictionary meta = new BdfDictionary();
|
||||||
@@ -584,8 +577,6 @@ class GroupInvitationManagerImpl extends ConversationClientImpl
|
|||||||
public void onClientVisibilityChanging(Transaction txn, Contact c,
|
public void onClientVisibilityChanging(Transaction txn, Contact c,
|
||||||
Visibility v) throws DbException {
|
Visibility v) throws DbException {
|
||||||
// Apply the client's visibility to the contact group
|
// Apply the client's visibility to the contact group
|
||||||
if (LOG.isLoggable(INFO))
|
|
||||||
LOG.info("Applying visibility " + v + " to contact group");
|
|
||||||
Group g = getContactGroup(c);
|
Group g = getContactGroup(c);
|
||||||
db.setGroupVisibility(txn, c.getId(), g.getId(), v);
|
db.setGroupVisibility(txn, c.getId(), g.getId(), v);
|
||||||
}
|
}
|
||||||
@@ -606,11 +597,6 @@ class GroupInvitationManagerImpl extends ConversationClientImpl
|
|||||||
if (preferred == null) continue; // No session for this group
|
if (preferred == null) continue; // No session for this group
|
||||||
// Apply min of preferred visibility and client's visibility
|
// Apply min of preferred visibility and client's visibility
|
||||||
Visibility min = Visibility.min(preferred, client);
|
Visibility min = Visibility.min(preferred, client);
|
||||||
if (LOG.isLoggable(INFO)) {
|
|
||||||
LOG.info("Applying visibility " + min
|
|
||||||
+ " to private group, preferred " + preferred
|
|
||||||
+ ", client " + client);
|
|
||||||
}
|
|
||||||
db.setGroupVisibility(txn, c.getId(), g.getId(), min);
|
db.setGroupVisibility(txn, c.getId(), g.getId(), min);
|
||||||
}
|
}
|
||||||
} catch (FormatException e) {
|
} catch (FormatException e) {
|
||||||
|
|||||||
@@ -40,11 +40,9 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import static java.util.logging.Level.INFO;
|
|
||||||
import static org.briarproject.bramble.api.sync.Group.Visibility.SHARED;
|
import static org.briarproject.bramble.api.sync.Group.Visibility.SHARED;
|
||||||
import static org.briarproject.briar.sharing.MessageType.ABORT;
|
import static org.briarproject.briar.sharing.MessageType.ABORT;
|
||||||
import static org.briarproject.briar.sharing.MessageType.ACCEPT;
|
import static org.briarproject.briar.sharing.MessageType.ACCEPT;
|
||||||
@@ -60,9 +58,6 @@ abstract class SharingManagerImpl<S extends Shareable>
|
|||||||
implements SharingManager<S>, Client, ContactHook,
|
implements SharingManager<S>, Client, ContactHook,
|
||||||
ClientVersioningHook {
|
ClientVersioningHook {
|
||||||
|
|
||||||
private static final Logger LOG =
|
|
||||||
Logger.getLogger(SharingManagerImpl.class.getName());
|
|
||||||
|
|
||||||
private final ClientVersioningManager clientVersioningManager;
|
private final ClientVersioningManager clientVersioningManager;
|
||||||
private final MessageParser<S> messageParser;
|
private final MessageParser<S> messageParser;
|
||||||
private final SessionEncoder sessionEncoder;
|
private final SessionEncoder sessionEncoder;
|
||||||
@@ -115,8 +110,6 @@ abstract class SharingManagerImpl<S extends Shareable>
|
|||||||
db.addGroup(txn, g);
|
db.addGroup(txn, g);
|
||||||
Visibility client = clientVersioningManager.getClientVisibility(txn,
|
Visibility client = clientVersioningManager.getClientVisibility(txn,
|
||||||
c.getId(), getClientId(), getClientVersion());
|
c.getId(), getClientId(), getClientVersion());
|
||||||
if (LOG.isLoggable(INFO))
|
|
||||||
LOG.info("Applying visibility " + client + " to new contact group");
|
|
||||||
db.setGroupVisibility(txn, c.getId(), g.getId(), client);
|
db.setGroupVisibility(txn, c.getId(), g.getId(), client);
|
||||||
// Attach the contact ID to the group
|
// Attach the contact ID to the group
|
||||||
BdfDictionary meta = new BdfDictionary();
|
BdfDictionary meta = new BdfDictionary();
|
||||||
@@ -510,8 +503,6 @@ abstract class SharingManagerImpl<S extends Shareable>
|
|||||||
Visibility v) throws DbException {
|
Visibility v) throws DbException {
|
||||||
// Apply the client's visibility to the contact group
|
// Apply the client's visibility to the contact group
|
||||||
Group g = getContactGroup(c);
|
Group g = getContactGroup(c);
|
||||||
if (LOG.isLoggable(INFO))
|
|
||||||
LOG.info("Applying visibility " + v + " to contact group");
|
|
||||||
db.setGroupVisibility(txn, c.getId(), g.getId(), v);
|
db.setGroupVisibility(txn, c.getId(), g.getId(), v);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -531,11 +522,6 @@ abstract class SharingManagerImpl<S extends Shareable>
|
|||||||
if (preferred == null) continue; // No session for this group
|
if (preferred == null) continue; // No session for this group
|
||||||
// Apply min of preferred visibility and client's visibility
|
// Apply min of preferred visibility and client's visibility
|
||||||
Visibility min = Visibility.min(preferred, client);
|
Visibility min = Visibility.min(preferred, client);
|
||||||
if (LOG.isLoggable(INFO)) {
|
|
||||||
LOG.info("Applying visibility " + min
|
|
||||||
+ " to shareable, preferred " + preferred
|
|
||||||
+ ", client" + client);
|
|
||||||
}
|
|
||||||
db.setGroupVisibility(txn, c.getId(), g.getId(), min);
|
db.setGroupVisibility(txn, c.getId(), g.getId(), min);
|
||||||
}
|
}
|
||||||
} catch (FormatException e) {
|
} catch (FormatException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user