File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 66// / \date 2025-08-21
77#include < ROOT/RLogger.hxx>
88
9+ #include " logging.hxx"
910#include " optparse.hxx"
1011
1112#include < TApplication.h>
@@ -44,12 +45,6 @@ positional arguments:
4445 Open the ROOT file 'file.root' in a TBrowser
4546)" ;
4647
47- static ROOT::RLogChannel &RootBrowseLog ()
48- {
49- static ROOT::RLogChannel channel (" RootBrowse" );
50- return channel;
51- }
52-
5348struct RootBrowseArgs {
5449 enum class EPrintUsage {
5550 kNo ,
@@ -97,6 +92,8 @@ static RootBrowseArgs ParseArgs(const char **args, int nArgs)
9792
9893int main (int argc, char **argv)
9994{
95+ InitLog (" rootbrowse" );
96+
10097 auto args = ParseArgs (const_cast <const char **>(argv) + 1 , argc - 1 );
10198 if (args.fPrintHelp != RootBrowseArgs::EPrintUsage::kNo ) {
10299 std::cerr << kShortHelp ;
@@ -119,7 +116,8 @@ int main(int argc, char **argv)
119116 gErrorIgnoreLevel = kError ;
120117 file = std::unique_ptr<TFile>(TFile::Open (std::string (args.fFileName ).c_str (), " READ" ));
121118 if (!file || file->IsZombie ()) {
122- R__LOG_WARNING (RootBrowseLog ()) << " File " << args.fFileName << " does not exist or is unreadable." ;
119+ Err () << " File " << args.fFileName << " does not exist or is unreadable." ;
120+ return 1 ;
123121 }
124122 gErrorIgnoreLevel = kUnset ;
125123 }
You can’t perform that action at this time.
0 commit comments