Skip to content

Commit b4e7f9e

Browse files
committed
CHC: control loglevel via cmdline option
1 parent 27f962c commit b4e7f9e

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

CodeHawk/CHC/cchcil/cCHXParseFile.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
Copyright (c) 2005-2019 Kestrel Technology LLC
88
Copyright (c) 2020-2021 Henny B. Sipma
9-
Copyright (c) 2022-2024 Aarno Labs LLC
9+
Copyright (c) 2022-2026 Aarno Labs LLC
1010
1111
Permission is hereby granted, free of charge, to any person obtaining a copy
1212
of this software and associated documentation files (the "Software"), to deal
@@ -72,6 +72,8 @@ let speclist = [
7272
"directory to store the generated xml files");
7373
("-keep_system_includes", Arg.Unit (fun () -> keep_system_includes := true),
7474
"don't filter out functions in files with an absolute path name");
75+
("-loglevel", Arg.String set_log_level,
76+
"set level for logging (default: WARNING)");
7577
("-keepUnused",
7678
Arg.Set keepUnused, "keep unused type and function definitions")]
7779

@@ -263,7 +265,6 @@ let save_xml_file f =
263265
let main () =
264266
try
265267
let _ = read_args () in
266-
let _ = set_log_level "DEBUG" in
267268
let _ = cildeclarations#set_filename !filename in
268269
let cilfile = Frontc.parse !filename () in
269270
let _ = log_info "Parsed %s [%s:%d]" !filename __FILE__ __LINE__ in

CodeHawk/CHC/cchcmdline/cCHXCAnalyzer.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,8 @@ let speclist = [
135135
"disable printing timing log messages");
136136
("-verbose", Arg.Unit (fun () -> system_settings#set_verbose true),
137137
"print status on proof obligations and invariants");
138+
("-loglevel", Arg.String set_log_level,
139+
"set level for logging (default: WARNING)");
138140
("-projectname", Arg.String system_settings#set_projectname,
139141
"name of the project (determines name of results directory)");
140142
("-keep_system_includes",
@@ -166,7 +168,6 @@ let save_log_files (contenttype:string) =
166168

167169
let main () =
168170
try
169-
let _ = set_log_level "WARNING" in
170171
let _ = read_args () in
171172
let _ = chlog#set_max_entry_size 1000 in
172173
let _ = log_info "AIAIAIAIAIAIAIAIAIAIAIAIAIAIAIAIAIAIAIAIAIAIAIAIAIAIAIAI" in

CodeHawk/CHC/cchlib/cCHVersion.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,5 @@ object (self)
6262
end
6363

6464
let version = new version_info_t
65-
~version:"0.3.0_20260604"
66-
~date:"2026-06-04"
65+
~version:"0.3.0_20260606"
66+
~date:"2026-06-06"

0 commit comments

Comments
 (0)