diff --git a/include/ircd/m/vm.h b/include/ircd/m/vm.h index 9d7eb3698..2906de0b4 100644 --- a/include/ircd/m/vm.h +++ b/include/ircd/m/vm.h @@ -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}; diff --git a/ircd/m/vm.cc b/ircd/m/vm.cc index 26f633f71..53a6c4710 100644 --- a/ircd/m/vm.cc +++ b/ircd/m/vm.cc @@ -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)); }