Skip to content

Commit 32e9688

Browse files
committed
log crate name and version during publish
1 parent 2801a64 commit 32e9688

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/controllers/krate/publish.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ pub fn publish(req: &mut dyn Request) -> AppResult<Response> {
194194

195195
// Register this crate in our local git repo.
196196
let git_crate = git::Crate {
197-
name: name.0,
197+
name: name.clone(),
198198
vers: vers.to_string(),
199199
cksum: hex_cksum,
200200
features,
@@ -215,10 +215,13 @@ pub fn publish(req: &mut dyn Request) -> AppResult<Response> {
215215
other: vec![],
216216
};
217217

218-
Ok(req.json(&GoodCrate {
219-
krate: krate.minimal_encodable(&top_versions, None, false, None),
220-
warnings,
221-
}))
218+
Ok(req
219+
.json(&GoodCrate {
220+
krate: krate.minimal_encodable(&top_versions, None, false, None),
221+
warnings,
222+
})
223+
.with_log_metadata("crate_name", &name.0)
224+
.with_log_metadata("crate_version", &vers))
222225
})
223226
}
224227

0 commit comments

Comments
 (0)