diff options
author | Neal H. Walfield <neal@pep.foundation> | 2022-12-28 11:08:38 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2023-01-06 13:24:54 +0100 |
commit | 3d2edaab351e27267291b3aaa7f2335aaa125ca7 (patch) | |
tree | 2a3e0b7fe590064d2aa8624dd883098c884bd775 /openpgp/src/cert | |
parent | e06475564729860c7912c1f5a88ec9dbce9c29d9 (diff) |
openpgp: Improve tracing output.
- When tracing is enabled, log what the iterator returned from
`CertParser::From<PacketParserResult>` does.
Diffstat (limited to 'openpgp/src/cert')
-rw-r--r-- | openpgp/src/cert/parser/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/openpgp/src/cert/parser/mod.rs b/openpgp/src/cert/parser/mod.rs index d43b3b06..ad092799 100644 --- a/openpgp/src/cert/parser/mod.rs +++ b/openpgp/src/cert/parser/mod.rs @@ -509,6 +509,7 @@ impl<'a> From<PacketParserResult<'a>> for CertParser<'a> let mut retry_with_reader = Box::new(None); parser.source = Some( Box::new(std::iter::from_fn(move || { + tracer!(TRACE, "PacketParserResult::next", 0); if let Some(reader) = retry_with_reader.take() { // Try to find the next (armored) blob. match PacketParser::from_buffered_reader(reader) { @@ -551,9 +552,13 @@ impl<'a> From<PacketParserResult<'a>> for CertParser<'a> *retry_with_reader = Some(eof.into_reader()), } + t!("PacketParser::next yielded a {}", + packet.tag()); Some(Ok(packet)) }, Err(err) => { + t!("PacketParser::next returned an error: {}.", + err); Some(Err(err)) } } |