@@ -83,14 +83,15 @@ struct edb_folder {
8383
8484}
8585
86- static unsigned int g_list_mbox;
86+ static unsigned int g_list_mbox, g_mlog_level = MLOG_DEFAULT_LEVEL ;
8787static char *g_extract_mbox;
8888
8989static constexpr HXoption g_options_table[] = {
9090 {nullptr , ' l' , HXTYPE_NONE, &g_list_mbox, nullptr , nullptr , 0 , " Show available mailboxes in database" },
9191 {nullptr , ' p' , HXTYPE_NONE | HXOPT_INC, &g_show_props, nullptr , nullptr , 0 , " Show properties in detail (if -t)" },
9292 {nullptr , ' t' , HXTYPE_NONE, &g_show_tree, nullptr , nullptr , 0 , " Show tree-based analysis of the archive" },
9393 {nullptr , ' x' , HXTYPE_STRING, &g_extract_mbox, nullptr , nullptr , 0 , " Extract the given mailbox" , " ID/RK/GUID" },
94+ {" loglevel" , 0 , HXTYPE_UINT, &g_mlog_level, {}, {}, {}, " Basic loglevel of the program" , " N" },
9495 HXOPT_AUTOHELP,
9596 HXOPT_TABLEEND,
9697};
@@ -676,6 +677,7 @@ int main(int argc, char **argv)
676677 return EXIT_FAILURE;
677678 }
678679#endif
680+ mlog_init (nullptr , nullptr , g_mlog_level, nullptr );
679681 if (iconv_validate () != 0 )
680682 return EXIT_FAILURE;
681683 textmaps_init (PKGDATADIR);
0 commit comments