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

feat: send triggered emails #121

Merged
merged 29 commits into from
Jun 24, 2024
Merged

feat: send triggered emails #121

merged 29 commits into from
Jun 24, 2024

Conversation

SKairinos
Copy link
Contributor

@SKairinos SKairinos commented Jun 21, 2024

This change is Reviewable

Copy link
Contributor

@faucomte97 faucomte97 left a comment

Choose a reason for hiding this comment

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

Reviewed 5 of 9 files at r1, 2 of 2 files at r2, 2 of 2 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @SKairinos)


codeforlife/mail.py line 298 at r3 (raw file):

    if not settings.MAIL_ENABLED:
        logging.info(

Does this output to the terminal? If so, what's the difference between this and print - if it is just the log level, how does it show that in the terminal?

Copy link
Contributor Author

@SKairinos SKairinos left a comment

Choose a reason for hiding this comment

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

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @faucomte97)


codeforlife/mail.py line 298 at r3 (raw file):

Previously, faucomte97 (Florian Aucomte) wrote…

Does this output to the terminal? If so, what's the difference between this and print - if it is just the log level, how does it show that in the terminal?

A few points:

  • logs are structured messages that follow an open standard (see Syslog)
  • part of a log message's structure is its severity (INFO, WARN, ERROR, etc.)
  • we should never use print in production servers as it will not interface with log explorers. We will be unable to filter log messages by their different dimensions. For example, we won't be able to filter to show all ERROR logs. This is critical!
  • where the logs get sent to (console or other), can be configured with Python's logging handlers. Notice that I have defaulted Django's logging to print to console (StreamHandler prints to stdout a.k.a. console).

Copy link
Contributor

@faucomte97 faucomte97 left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @SKairinos)

@SKairinos SKairinos merged commit 394cc1b into main Jun 24, 2024
3 of 6 checks passed
@SKairinos SKairinos deleted the send_triggered_emails branch June 24, 2024 09:30
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.

2 participants