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

Convert logging in build.assets/tooling to use slog #50805

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

rosstimothy
Copy link
Contributor

No description provided.

@rosstimothy rosstimothy force-pushed the tross/build.assets_slog branch 4 times, most recently from e6ad66a to d4bf503 Compare January 7, 2025 16:16
@rosstimothy rosstimothy changed the base branch from master to tross/remove_notarize_binaries January 7, 2025 16:16
@rosstimothy rosstimothy marked this pull request as ready for review January 7, 2025 18:01
@github-actions github-actions bot requested review from Joerger and strideynet January 7, 2025 18:02
@rosstimothy rosstimothy added the no-changelog Indicates that a PR does not require a changelog entry label Jan 7, 2025
Base automatically changed from tross/remove_notarize_binaries to master January 7, 2025 19:14
@rosstimothy rosstimothy force-pushed the tross/build.assets_slog branch from d4bf503 to 4d305f9 Compare January 8, 2025 15:20
@rosstimothy rosstimothy mentioned this pull request Jan 8, 2025
)

const pluginInputPathEnvironment = "TELEPORT_PROTOC_READ_FILE"

func readRequest() (*plugin.CodeGeneratorRequest, error) {
inputPath := os.Getenv(pluginInputPathEnvironment)
if inputPath == "" {
log.Error(trace.BadParameter("When built with the 'debug' tag, the input path must be set through the environment variable: %s", pluginInputPathEnvironment))
slog.ErrorContext(context.Background(), "When built with the 'debug' tag, the input path must be set through the TELEPORT_PROTOC_READ_FILE environment variable")
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe:

Suggested change
slog.ErrorContext(context.Background(), "When built with the 'debug' tag, the input path must be set through the TELEPORT_PROTOC_READ_FILE environment variable")
const message = "When built with the 'debug' tag, the input path must be set through the " + pluginInputPathEnvironment + " environment variable"
slog.ErrorContext(context.Background(), message)

@rosstimothy rosstimothy added this pull request to the merge queue Jan 8, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 8, 2025
@rosstimothy rosstimothy added this pull request to the merge queue Jan 8, 2025
Merged via the queue into master with commit 1bc68f7 Jan 8, 2025
43 checks passed
@rosstimothy rosstimothy deleted the tross/build.assets_slog branch January 8, 2025 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog Indicates that a PR does not require a changelog entry size/sm
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants