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

Syslog added to documentation #70

Merged
merged 7 commits into from
Oct 31, 2023
Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions README.md
boulais01 marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,38 @@ create the tool's command-line arguments and options through a terminal user
interface (TUI). To use TUI-based way to create a complete command-line for
`chasten` you can type the command `chasten interact`.

## 📊Log
`Chasten` has a built-in system log. While using chasten you can use the command `chasten log` in your terminal. The system log feature allows the user to see events and messages that are produced by `chasten`. In addition, the `chasten log` feature will assist in finding bugs and the events that led to the bug happening. For the `chasten` program to display to the system log you will have to open a separate terminal and use the command `chasten log`. In addition for each command that is run the `--debug-level <choice of level>` and `--debug-dest SYSLOG` will need to be added.

For example `chasten datasette-serve --debug-level DEBUG --debug-dest SYSLOG
< database path to file>` with produce the following output in the system log.
boulais01 marked this conversation as resolved.
Show resolved Hide resolved

```
💫 chasten: Analyze the AST of Python Source Code
🔗 GitHub: https://github.com/gkapfham/chasten
✨ Syslog server for receiving debugging information

Display verbose output? False
Debug level? DEBUG
Debug destination? SYSLOG
```

In each command in `chasten`, there is an option to add a `--debug-level`. The debug level has 5 options debug, info, warning, error, and critical. Each level will show different issues in the system log where debug is the lowest level of issue from the input where critical is the highest level of error. To leverage more info on this you can reference `debug.py` file:

``` python
class DebugLevel(str, Enum):
"""The predefined levels for debugging."""

DEBUG = "DEBUG"
INFO = "INFO"
WARNING = "WARNING"
ERROR = "ERROR"
CRITICAL = "CRITICAL"
```




## 🤗 Learning

- **Curious about the nodes that are available in a Python program's AST?**
Expand Down