Skip to content

Add logging - #13

Open
CharlieCumber wants to merge 2 commits into
module-12from
module-13
Open

Add logging#13
CharlieCumber wants to merge 2 commits into
module-12from
module-13

Conversation

@CharlieCumber

Copy link
Copy Markdown
Owner

No description provided.

@BenRamchandani BenRamchandani left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The logging looks good. If you wanted to go further you could set it up to log requests and maybe log warnings when a reader tries to do something they don't have permissions for.

You've broken your tests though. I'll accept this in Aptem, just don't make a habit of raising PRs with broken tests/CI on real projects!

Ideally fix the tests, but go ahead and merge when you're ready.

Comment thread variables.tf
Comment on lines +33 to +35
variable "LOGGLY_TOKEN" {
description = "Customer access token for loggly subscription"
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
variable "LOGGLY_TOKEN" {
description = "Customer access token for loggly subscription"
}
variable "LOGGLY_TOKEN" {
description = "Customer access token for loggly subscription"
sensitive = true
}

Comment thread todo_app/app.py
handler.setFormatter(
Formatter("[%(asctime)s] %(levelname)s in %(module)s: %(message)s")
)
app.logger.addHandler(handler)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This crashes if LOGGLY_TOKEN is not set.

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