diff --git a/lib/iev/termbase/cli/command.rb b/lib/iev/termbase/cli/command.rb index f5f7f14..95aa9ae 100644 --- a/lib/iev/termbase/cli/command.rb +++ b/lib/iev/termbase/cli/command.rb @@ -83,6 +83,18 @@ def self.shared_option(name, methods:, **kwargs) default: false, methods: %i[xlsx2yaml db2yaml] + shared_option :debug_sources, + desc: "...", + type: :boolean, + default: false, + methods: %i[xlsx2yaml db2yaml] + + shared_option :debug_relaton, + desc: "...", + type: :boolean, + default: false, + methods: %i[xlsx2yaml db2yaml] + shared_option :profile, desc: "Generates profiler reports for this program, requires ruby-prof", type: :boolean, diff --git a/lib/iev/termbase/relaton_db.rb b/lib/iev/termbase/relaton_db.rb index 264a44f..8fe54e9 100644 --- a/lib/iev/termbase/relaton_db.rb +++ b/lib/iev/termbase/relaton_db.rb @@ -56,7 +56,7 @@ def capture_output_streams ensure $stdout = original_stdout $stderr = original_stderr - warn(fake_out.string) if fake_out.pos > 0 + debug(:relaton, fake_out.string) if fake_out.pos > 0 end end end diff --git a/lib/iev/termbase/source_parser.rb b/lib/iev/termbase/source_parser.rb index 93c9773..37768e8 100644 --- a/lib/iev/termbase/source_parser.rb +++ b/lib/iev/termbase/source_parser.rb @@ -106,7 +106,7 @@ def extract_source_ref(str) /Constitution de l’Union internationale des télécommunications (UIT)/ "International Telecommunication Union (ITU) Constitution (Ed. 2015)" else - warn "Failed to parse source: '#{str}'" + debug :sources, "Failed to parse source: '#{str}'" str end