mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2025-07-09 12:30:15 +02:00
Update troubleshooting.md
This commit is contained in:
parent
3d206e445c
commit
08dc88da1a
@ -2,13 +2,9 @@
|
|||||||
|
|
||||||
## Logging
|
## Logging
|
||||||
|
|
||||||
In its default configuration, your auth project logs INFO and higher messages to myauth/log/allianceauth.log.
|
In its default configuration, your auth project logs INFO and higher messages to myauth/log/allianceauth.log. If you're encountering issues, it's a good idea to view DEBUG messages as these greatly assist the troubleshooting process. These are printed to the console with manually starting the webserver via `python manage.py runserver`.
|
||||||
If you're encountering issues, it's a good idea to view DEBUG messages as these greatly assist the troubleshooting process.
|
|
||||||
These are printed to the console with manually starting the webserver via `python manage.py runserver`.
|
|
||||||
|
|
||||||
To record DEBUG messages in the log file,
|
To record DEBUG messages in the log file, alter a setting in your auth project's settings file: `LOGGING['handlers']['log_file']['level'] = 'DEBUG'`. After restarting gunicorn and celery, your log file will record all logging messages.
|
||||||
alter a setting in your auth project's settings file: `LOGGING['handlers']['log_file']['level'] = 'DEBUG'`.
|
|
||||||
After restarting gunicorn and celery, your log file will record all logging messages.
|
|
||||||
|
|
||||||
## Steps to Check Logs for Errors
|
## Steps to Check Logs for Errors
|
||||||
|
|
||||||
@ -20,8 +16,7 @@ The logs are located within the `myauth/log/` directory of your Alliance Auth pr
|
|||||||
|
|
||||||
Use a text editor or terminal commands (like `tail -f <filename>`) to open the relevant log files.
|
Use a text editor or terminal commands (like `tail -f <filename>`) to open the relevant log files.
|
||||||
|
|
||||||
_(The `tail -f` command displays the last few lines of a file and then continues to monitor the file,
|
_(The `tail -f` command displays the last few lines of a file and then continues to monitor the file, printing any new lines that are added in real-time. Useful to watch while actively testing a troublesome feature while troubleshooting.)_
|
||||||
printing any new lines that are added in real-time. Useful to watch while actively testing a troublesome feature while troubleshooting.)_
|
|
||||||
|
|
||||||
Consider the following:
|
Consider the following:
|
||||||
|
|
||||||
@ -35,20 +30,15 @@ Consider the following:
|
|||||||
|
|
||||||
### Search for Errors:
|
### Search for Errors:
|
||||||
|
|
||||||
Look for keywords like `ERROR`, `WARNING`, `EXCEPTION`, or `CRITICAL`.
|
Look for keywords like `ERROR`, `WARNING`, `EXCEPTION`, or `CRITICAL`. Examine timestamps to correlate errors with user actions or events. Read the error messages carefully for clues about the problem's nature.
|
||||||
Examine timestamps to correlate errors with user actions or events.
|
|
||||||
Read the error messages carefully for clues about the problem's nature.
|
|
||||||
|
|
||||||
Troubleshooting Tips:
|
Troubleshooting Tips:
|
||||||
|
|
||||||
**Filter Logs:** Use tools like `grep` to filter logs based on keywords or timeframes,
|
**Filter Logs:** Use tools like `grep` to filter logs based on keywords or timeframes, making it easier to focus on relevant information.
|
||||||
making it easier to focus on relevant information.
|
|
||||||
|
|
||||||
**_Example_**: `tail -f worker.log | grep -i 'discord'`. This will isolate lines containing discord.
|
**Example**: `tail -f worker.log | grep -i 'discord'`. This will isolate lines containing discord. Making it easier to see among the other logs.
|
||||||
Making it easier to see among the other logs.
|
|
||||||
|
|
||||||
**Debug Mode:** For in-depth troubleshooting, temporarily enable DEBUG logging in your `local.py`
|
**Debug Mode:** For in-depth troubleshooting, temporarily enable DEBUG logging in your `local.py` to get more detailed messages. Remember to set it back to `false` after debugging.
|
||||||
to get more detailed messages. Remember to set it back to `false` after debugging.
|
|
||||||
|
|
||||||
**Important Note: Before sharing logs publicly, sanitize any sensitive information such as usernames, passwords, or API keys.**
|
**Important Note: Before sharing logs publicly, sanitize any sensitive information such as usernames, passwords, or API keys.**
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user