summaryrefslogtreecommitdiff
path: root/src/Network/BitTorrent/PeerWire/Message.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Network/BitTorrent/PeerWire/Message.hs')
-rw-r--r--src/Network/BitTorrent/PeerWire/Message.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Network/BitTorrent/PeerWire/Message.hs b/src/Network/BitTorrent/PeerWire/Message.hs
index e833ba03..3f6647dd 100644
--- a/src/Network/BitTorrent/PeerWire/Message.hs
+++ b/src/Network/BitTorrent/PeerWire/Message.hs
@@ -132,7 +132,10 @@ instance Serialize Message where
132 put (AllowedFast ix) = putInt 5 >> putWord8 0x11 >> putInt ix 132 put (AllowedFast ix) = putInt 5 >> putWord8 0x11 >> putInt ix
133 133
134 134
135-- | Compact output for logging: only useful information but not payload bytes. 135-- | Format messages in human readable form. Note that output is
136-- compact and suitable for logging: only useful information but not
137-- payload bytes.
138--
136ppMessage :: Message -> String 139ppMessage :: Message -> String
137ppMessage (Bitfield _) = "Bitfield " 140ppMessage (Bitfield _) = "Bitfield "
138ppMessage (Piece blk) = "Piece " ++ ppBlock blk 141ppMessage (Piece blk) = "Piece " ++ ppBlock blk