show first field if no message
This commit is contained in:
parent
f733c65bcf
commit
3037d0711e
1 changed files with 7 additions and 0 deletions
|
|
@ -106,6 +106,13 @@ impl LogEntry {
|
||||||
.message()
|
.message()
|
||||||
.map(|i| i.to_string())
|
.map(|i| i.to_string())
|
||||||
.or_else(|| raw.fields.fields.get("return").map(|i| format!("↩ {i}")))
|
.or_else(|| raw.fields.fields.get("return").map(|i| format!("↩ {i}")))
|
||||||
|
.or_else(|| {
|
||||||
|
raw.fields
|
||||||
|
.fields
|
||||||
|
.iter()
|
||||||
|
.next()
|
||||||
|
.map(|(k, v)| format!("{k} = {v}"))
|
||||||
|
})
|
||||||
.unwrap_or_else(|| NO_MESSAGE.to_string())
|
.unwrap_or_else(|| NO_MESSAGE.to_string())
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue