@@ -43,11 +43,14 @@ uv add pyhunt
4343
4444## Quick Start
4545
46- ### 1. Set Up Environment Variable File
46+ ### 1. Set Up and Manage Environment Variable File
47+ You can set up and manage the ` .env ` file by running the ` hunt ` command.
48+
4749``` bash
4850hunt
4951```
50- This command sets ` HUNT_LEVEL=DEBUG ` in your ` .env ` file.
52+
53+ Executing the above command sets ` HUNT_LEVEL=DEBUG ` and ` ROOT_DIR ` to the current directory in the ` .env ` file.
5154
5255### 2. Apply ` @trace ` to Functions or Classes
5356See more examples in the [ examples] ( https://github.com/pyhunt/pyhunt/tree/main/examples ) folder.
@@ -115,6 +118,8 @@ logger.critical("This is a critical log.")
115118
116119## CLI Usage
117120
121+ You can manage log levels and other settings using the ` hunt ` command.
122+
118123``` bash
119124hunt [options]
120125```
@@ -126,5 +131,16 @@ hunt [options]
126131- ` --warning ` : WARNING level
127132- ` --error ` : ERROR level
128133- ` --critical ` : CRITICAL level
134+ - ` --root ` : Sets the ` ROOT_DIR ` environment variable to the current directory.
135+ - ` --repeat <count> ` : Sets the ` HUNT_MAX_REPEAT ` environment variable to the specified count. (Log repetition limit)
136+
137+ If no option is specified, the default is ` DEBUG ` .
138+
139+ ### Environment Variables
140+
141+ ` pyhunt ` supports the following environment variables through the ` .env ` file:
129142
130- If no option is specified, the default is ` INFO ` .
143+ - ` HUNT_LEVEL ` : Sets the log level (DEBUG, INFO, WARNING, ERROR, CRITICAL). Default is ` DEBUG ` .
144+ - ` HUNT_MAX_REPEAT ` : The number of times the same log is displayed when repeated. Default is 3.
145+ - ` ELAPSED ` : Sets whether to display function execution time in logs (` True ` or ` False ` ). Default is ` True ` .
146+ - ` ROOT_DIR ` : Sets the base directory for log output. Displays paths more accurately.
0 commit comments