Skip to content

Commit

Permalink
chore(Swarm): single line debug log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
richardschneider committed Jun 18, 2019
1 parent fb7b435 commit 95b2cad
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/PeerTalk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageReleaseNotes>https://github.com/richardschneider/peer-talk/releases</PackageReleaseNotes>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageReleaseNotes></PackageReleaseNotes>
<Copyright>© 2018 Richard Schneider</Copyright>
<Copyright>© 2018-2019 Richard Schneider</Copyright>
<PackageTags>ipfs peer-to-peer libp2p p2p distributed web</PackageTags>
<IncludeSymbols>True</IncludeSymbols>
<PackageLicenseUrl>https://github.com/richardschneider/peer-talk/blob/master/LICENSE</PackageLicenseUrl>
Expand Down
16 changes: 8 additions & 8 deletions src/Swarm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,6 @@ public Peer RegisterPeer(Peer peer)
if (log.IsDebugEnabled)
{
log.Debug($"New peer registerd {p}");
foreach (var a in p.Addresses)
{
log.Debug($" at {a}");
}
}
PeerDiscovered?.Invoke(this, p);
}
Expand Down Expand Up @@ -838,9 +834,10 @@ async void OnRemoteConnect(Stream stream, MultiAddress local, MultiAddress remot

try
{
log.Debug($"{LocalPeer.Id} got remote connection");
log.Debug("local " + local);
log.Debug("remote " + remote);
if (log.IsDebugEnabled)
{
log.Debug($"remote connect from {remote}");
}

// TODO: Check the policies

Expand Down Expand Up @@ -892,7 +889,10 @@ async void OnRemoteConnect(Stream stream, MultiAddress local, MultiAddress remot
}
catch (Exception e)
{
log.Warn("Remote connect failed", e);
if (log.IsDebugEnabled)
{
log.Debug($"remote connect from {remote} failed: {e.Message}");
}
try
{
stream.Dispose();
Expand Down

0 comments on commit 95b2cad

Please sign in to comment.