mirror of
https://github.com/hoytech/strfry.git
synced 2025-06-19 09:36:43 +00:00
config params to control logging verbosity
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
static const char USAGE[] =
|
||||
R"(
|
||||
Usage:
|
||||
scan [--pause=<pause>] <filter>
|
||||
scan [--pause=<pause>] [--metrics] <filter>
|
||||
)";
|
||||
|
||||
|
||||
@ -20,6 +20,9 @@ void cmd_scan(const std::vector<std::string> &subArgs) {
|
||||
uint64_t pause = 0;
|
||||
if (args["--pause"]) pause = args["--pause"].asLong();
|
||||
|
||||
bool metrics = false;
|
||||
if (args["--metrics"]) metrics = true;
|
||||
|
||||
|
||||
std::string filterStr = args["<filter>"].asString();
|
||||
auto filterGroup = NostrFilterGroup::unwrapped(tao::json::from_string(filterStr));
|
||||
@ -32,7 +35,7 @@ void cmd_scan(const std::vector<std::string> &subArgs) {
|
||||
auto txn = env.txn_ro();
|
||||
|
||||
while (1) {
|
||||
bool complete = query.process(txn, pause ? pause : MAX_U64, [&](const auto &sub, uint64_t quadId){
|
||||
bool complete = query.process(txn, pause ? pause : MAX_U64, metrics, [&](const auto &sub, uint64_t quadId){
|
||||
std::cout << getEventJson(txn, quadId) << "\n";
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user