Skip to content

Conversation

@karlseguin
Copy link
Collaborator

1 - Add a log_level build option to control the default log level from
the build (e.g. -Dlog_level=debug). Defaults to info

2 - Add a new boolean log_unknown_properties build option to enable
logging unknown properties. Defautls to false.

3 - Remove the log debug for script eval - this can be a huge value
(i.e. hundreds of KB), which makes the debug log unusable IMO.

1 - Add a log_level build option to control the default log level from
    the build (e.g. -Dlog_level=debug). Defaults to info

2 - Add a new boolean log_unknown_properties build option to enable
    logging unknown properties. Defautls to false.

3 - Remove the log debug for script eval - this can be a huge value
    (i.e. hundreds of KB), which makes the debug log unusable IMO.
opts.addOption(
std.log.Level,
"log_level",
b.option(std.log.Level, "log_level", "The log level") orelse std.log.Level.info,
Copy link
Contributor

Choose a reason for hiding this comment

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

What about defaulting to .debug if build.mode == debug?

Copy link
Collaborator Author

@karlseguin karlseguin May 20, 2025

Choose a reason for hiding this comment

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

I find the noise to signal ratio is too low right now. The point of the flag is to let everyone set it to whatever they want, without having to touch the source. So the default can be anything.

@karlseguin karlseguin merged commit fc0281b into main May 21, 2025
9 checks passed
@karlseguin karlseguin deleted the log_debug branch May 21, 2025 01:03
@github-actions github-actions bot locked and limited conversation to collaborators May 21, 2025
@krichprollsch
Copy link
Member

krichprollsch commented May 22, 2025

What about adding a make run-debug command to active -Dlog_level=debug and -Dlog_unknown_properties=true?

EDIT: maybe it's make build-dev we should update since it's a "Build in debug mode"?

@karlseguin
Copy link
Collaborator Author

karlseguin commented May 22, 2025

Well, you were right...depending on the page, -Dlog_unknown_properties=true can be a bit overwhelming. It might be better with the incoming CSS stuff, but right now, I think it's only useful as a one-off in really mysterious situations.

But I'll add a make run-debug and change make build-dev to add the -Dlog_level=debug then have 2 debug commands that we can tweak the parameters for as things progress.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants