Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use logs in Adt_rel #1207

Merged
merged 2 commits into from
Aug 22, 2024
Merged

Use logs in Adt_rel #1207

merged 2 commits into from
Aug 22, 2024

Conversation

Halbaroth
Copy link
Collaborator

This PR is rebased on #1204 and #1206

"%a" X.print r

let assume l =
Logs.debug ~src:Sources.adt_rel
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use Logs.debug ~src:.... Instead, define module Log = (val Logs.src_log Sources.adt_rel) at the top of the file, and use Log.debug directly. See the example from Logs's documentation.

let pp_domains loc domains =
if Options.get_debug_adt () then begin
print_dbg ~flushed:false ~module_name:"Adt_rel"
"@[<v 2>--ADT env %s ---------------------------------@ " loc;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this PR removes the the --- separators that can make the logs more readable; is that intentional?

Copy link
Collaborator Author

@Halbaroth Halbaroth Aug 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is intentional because Logs uses correctly indentations. So we will get something like that:

[DEBUG][Adt_rel] environment before assume:
                 the environment here 
                 .... 
[DEBUG][Adt_rel] ... 

The indentation makes clear in which messages we are.

@Halbaroth Halbaroth force-pushed the use-logs-adt branch 2 times, most recently from 2799f7f to 17847a7 Compare August 22, 2024 11:06
Copy link
Collaborator

@bclement-ocp bclement-ocp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Please merge #1206 first and rebase before merging.

@Halbaroth
Copy link
Collaborator Author

Actually I already rebased it and I expected that github will skip empty commit. I rebased it again to be sure but now the CI is dead :D (it is not our fault).

@Halbaroth Halbaroth enabled auto-merge (squash) August 22, 2024 12:14
@Halbaroth Halbaroth merged commit 8fa8b38 into OCamlPro:next Aug 22, 2024
9 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants