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

Suppress logging when invoked via language binding #118

Open
discount-elf opened this issue Dec 12, 2024 · 1 comment
Open

Suppress logging when invoked via language binding #118

discount-elf opened this issue Dec 12, 2024 · 1 comment

Comments

@discount-elf
Copy link

Utilizing:

pkl: 0.27.1 on MacOS
pkl-go: 0.8.1

I receive these info logs:

{"time":"2024-12-11T15:16:26.898523-06:00","level":"INFO","msg":"warn: Cannot find field on Go struct `pkl.ProjectEvaluatorSettings` matching Pkl property `color`. Ensure the Go structs are up to date with Pkl classes either through codegen or manually adding `pkl` tags."}
{"time":"2024-12-11T15:16:26.898544-06:00","level":"INFO","msg":"warn: Cannot find field on Go struct `pkl.ProjectEvaluatorSettings` matching Pkl property `externalModuleReaders`. Ensure the Go structs are up to date with Pkl classes either through codegen or manually adding `pkl` tags."}
{"time":"2024-12-11T15:16:26.898547-06:00","level":"INFO","msg":"warn: Cannot find field on Go struct `pkl.ProjectEvaluatorSettings` matching Pkl property `externalResourceReaders`. Ensure the Go structs are up to date with Pkl classes either through codegen or manually adding `pkl` tags."}
{"time":"2024-12-11T15:16:26.898551-06:00","level":"INFO","msg":"warn: Cannot find field on Go struct `pkl.Project` matching Pkl property `annotations`. Ensure the Go structs are up to date with Pkl classes either through codegen or manually adding `pkl` tags."}

Code:

evaluator, err := pkl.NewProjectEvaluator(context.Background(), projectDir, pkl.PreconfiguredOptions, func(opts *pkl.EvaluatorOptions) {
	opts.OutputFormat = "json"
})

Ideally it would be useful to be able suppress logging, in the event of a delay/mismatch between the pkl release and the language binding.

@bioball bioball transferred this issue from apple/pkl Dec 12, 2024
@bioball
Copy link
Contributor

bioball commented Dec 12, 2024

Makes sense!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants