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 error logging to project #43

Merged
merged 2 commits into from Jul 24, 2018
Merged

Conversation

fredlawl
Copy link
Contributor

It is difficult to debug an application that does not produce any erorr
logging. Add error logging to project through an error file and
console output.

Signed-off-by: Frederick Lawler fred@fredlawl.com

},
'file': {
'class': 'logging.FileHandler',
'filename': '/logs/error.log'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this need to have the prefix /code/ path?

'loggers': {
'': { # 'catch all' loggers by referencing it with the empty string
'handlers': ['console', 'file'],
'level': 'DEBUG',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you use the variable debug above?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that when we launch this, we would want the error logging on the server so we can have some insight if something goes wrong. If you want me to change that, I can.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, I'll add a logging level configuration.

It is difficult to debug an application that does not produce any erorr
logging. Add error logging to project through an error file and
console output.

Signed-off-by: Frederick Lawler <fred@fredlawl.com>
Developers should be able to configure their log level for development.
Add a note to the README with updated documentation concerning the new
setting, and add the setting to the settings.py file with a default of
ERROR if unspecified.

Signed-off-by: Frederick Lawler <fred@fredlawl.com>
@fredlawl fredlawl merged commit d41e6f1 into codeforkansascity:master Jul 24, 2018
@fredlawl fredlawl deleted the issue-42 branch July 24, 2018 12:01
@fredlawl fredlawl added this to the Developer Rampup milestone Jul 30, 2018
fredlawl added a commit to fredlawl/tagging_tracker_backend that referenced this pull request Oct 30, 2018
d41e6f1 ("Merge pull request codeforkansascity#43 from fredlawl/issue-42") addressed
an issue where there was need to have error logging in the project. A
bug was introduced such that the log directory did not exists when Django
operations are ran via ssh-ing into the container. This problem also exists
for people who perform operations without the Docker build process.

Fix this by adding in a logs directory into the project
root, and modify the Docker startup script to create the files/directories
before Django build processes runs.

Signed-off-by: Frederick Lawler <fred@fredlawl.com>
fredlawl added a commit to fredlawl/tagging_tracker_backend that referenced this pull request Nov 4, 2018
d41e6f1 ("Merge pull request codeforkansascity#43 from fredlawl/issue-42") addressed
an issue where there was need to have error logging in the project. A
bug was introduced such that the log directory did not exists when Django
operations are ran via ssh-ing into the container. This problem also exists
for people who perform operations without the Docker build process.

Fix this by adding in a logs directory into the project
root, and modify the Docker startup script to create the files/directories
before Django build processes runs.

Signed-off-by: Frederick Lawler <fred@fredlawl.com>
fredlawl added a commit that referenced this pull request Nov 20, 2018
d41e6f1 ("Merge pull request #43 from fredlawl/issue-42") addressed
an issue where there was need to have error logging in the project. A
bug was introduced such that the log directory did not exists when Django
operations are ran via ssh-ing into the container. This problem also exists
for people who perform operations without the Docker build process.

Fix this by adding in a logs directory into the project
root, and modify the Docker startup script to create the files/directories
before Django build processes runs.

Signed-off-by: Frederick Lawler <fred@fredlawl.com>
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