0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

ircd:Ⓜ️:vm: Option for infolog post-commit.

This commit is contained in:
Jason Volk 2018-03-16 13:19:52 -07:00
parent c83a47eb0f
commit 7180eae4af
2 changed files with 8 additions and 0 deletions

View file

@ -161,6 +161,9 @@ struct ircd::m::vm::opts
/// Whether to log a debug message before commit
bool debuglog_precommit {false};
/// Whether to log an info message after commit accepted
bool infolog_postcommit {false};
/// Whether to log a debug message on successful eval.
bool debuglog_accept {false};

View file

@ -181,6 +181,11 @@ ircd::m::vm::commit(const event &event,
event, opts_
};
if(opts.infolog_postcommit)
log.info("@%lu %s",
vm::current_sequence,
pretty_oneline(event, false));
return unquote(at<"event_id"_>(event));
}