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

Client debug logging #101

Closed
wneessen opened this issue Jan 14, 2023 · 0 comments · Fixed by #102
Closed

Client debug logging #101

wneessen opened this issue Jan 14, 2023 · 0 comments · Fixed by #102
Assignees
Labels
enhancement New feature or request

Comments

@wneessen
Copy link
Owner

Is your feature request related to a problem? Please describe.

Now that we have net/smtp in our own control, we can implement useful things that weren't possible before (or just very cumbersome). First feature should be debug logging, allowing us see the input and outputs of the SMTP client.

Describe the solution you'd like

The NewClient should get an optional option. If this option is "debug", we want to create a log on the Client and log the different in- and outputs.

Describe alternatives you've considered

No response

Additional context

No response

@wneessen wneessen added the enhancement New feature or request label Jan 14, 2023
@wneessen wneessen self-assigned this Jan 14, 2023
wneessen added a commit that referenced this issue Jan 14, 2023
Resolves #101.

Since we now have full control over the SMTP client we can also access the message input and output.

This PR introduces a new debug logging feature. Via the `Client.WithDebugLog` the user can enable this feature. It will then make use of the new `smtp/Client.SetDebugLog` method. Once the flag is set to true, the SMTP client will start logging incoming and outgoing messages to os.Stderr.

Log directions will be output accordingly
@wneessen wneessen linked a pull request Jan 14, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant