Skip to content

Suppress logging when invoked via language binding #118

Description

@discount-elf

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions