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

Add metadata to logger #631

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add metadata to logger #631

wants to merge 1 commit into from

Conversation

teamon
Copy link
Member

@teamon teamon commented Oct 27, 2023

wip, testing in progress

@teamon
Copy link
Member Author

teamon commented Oct 27, 2023

@yordis wdyt of this as an idea?

Use `:conceal` request option to conceal sensitive requests.

```
Tesla.get(client, opts: [conceal: true]])
Copy link
Member

Choose a reason for hiding this comment

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

Overall, I like the idea, the only feedback is about documentation.

We should document in one place all the "reserved" options that have a given intent.

I like it!

def output(:url, env, _, _), do: env.url
def output(:status, _, {:ok, env}, _), do: to_string(env.status)
def output(:status, _, {:error, reason}, _), do: "error: " <> inspect(reason)
def output(:time, _, _, time), do: :io_lib.format("~.3f", [time / 1000])
Copy link
Member Author

Choose a reason for hiding this comment

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

Missing to_string/1

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

Successfully merging this pull request may close these issues.

None yet

2 participants