Skip to content

An AI-powered task-management system you can drop into Cursor, Lovable, Windsurf, Roo, and others.

chore: rename log level environment variable to `TASKMASTER_LOG_LEVEL` (#417)

Kayvan Sylvana1f8d52474fd
diff --git a/.changeset/slow-singers-swim.md b/.changeset/slow-singers-swim.md
new file mode 100644
index 00000000..dadfda63
--- /dev/null
+++ b/.changeset/slow-singers-swim.md
@@ -0,0 +1,5 @@
+---
+'task-master-ai': patch
+---
+
+Fix for issue #409 LOG_LEVEL Pydantic validation error
diff --git a/.cursor/rules/dev_workflow.mdc b/.cursor/rules/dev_workflow.mdc
index 4d430323..003251d8 100644
--- a/.cursor/rules/dev_workflow.mdc
+++ b/.cursor/rules/dev_workflow.mdc
@@ -116,7 +116,7 @@ Taskmaster configuration is managed through two main mechanisms:
* For MCP/Cursor integration, configure these keys in the `env` section of `.cursor/mcp.json`.
* Available keys/variables: See `assets/env.example` or the Configuration section in the command reference (previously linked to `taskmaster.mdc`).
-**Important:** Non-API key settings (like model selections, `MAX_TOKENS`, `LOG_LEVEL`) are **no longer configured via environment variables**. Use the `task-master models` command (or `--setup` for interactive configuration) or the `models` MCP tool.
+**Important:** Non-API key settings (like model selections, `MAX_TOKENS`, `TASKMASTER_LOG_LEVEL`) are **no longer configured via environment variables**. Use the `task-master models` command (or `--setup` for interactive configuration) or the `models` MCP tool.
**If AI commands FAIL in MCP** verify that the API key for the selected provider is present in the `env` section of `.cursor/mcp.json`.
**If AI commands FAIL in CLI** verify that the API key for the selected provider is present in the `.env` file in the root of the project.
diff --git a/assets/.windsurfrules b/assets/.windsurfrules
index c253460c..a5cf07aa 100644
--- a/assets/.windsurfrules
+++ b/assets/.windsurfrules
@@ -198,7 +198,7 @@ alwaysApply: true
- **MAX_TOKENS** (Default: `"4000"`): Maximum tokens for responses (Example: `MAX_TOKENS=8000`)
- **TEMPERATURE** (Default: `"0.7"`): Temperature for model responses (Example: `TEMPERATURE=0.5`)
- **DEBUG** (Default: `"false"`): Enable debug logging (Example: `DEBUG=true`)
- - **LOG_LEVEL** (Default: `"info"`): Console output level (Example: `LOG_LEVEL=debug`)
+ - **TASKMASTER_LOG_LEVEL** (Default: `"info"`): Console output level (Example: `TASKMASTER_LOG_LEVEL=debug`)
- **DEFAULT_SUBTASKS** (Default: `"3"`): Default subtask count (Example: `DEFAULT_SUBTASKS=5`)
- **DEFAULT_PRIORITY** (Default: `"medium"`): Default priority (Example: `DEFAULT_PRIORITY=high`)
- **PROJECT_NAME** (Default: `"MCP SaaS MVP"`): Project name in metadata (Example: `PROJECT_NAME=My Awesome Project`)
diff --git a/assets/scripts_README.md b/assets/scripts_README.md
index 0d615389..1e76856f 100644
--- a/assets/scripts_README.md
+++ b/assets/scripts_README.md
@@ -31,7 +31,7 @@ Task Master configuration is now managed through two primary methods:
- Create a `.env` file in your project root for CLI usage.
- See `assets/env.example` for required key names.
-**Important:** Settings like `MODEL`, `MAX_TOKENS`, `TEMPERATURE`, `LOG_LEVEL`, etc., are **no longer set via `.env`**. Use `task-master models --setup` instead.
+**Important:** Settings like `MODEL`, `MAX_TOKENS`, `TEMPERATURE`, `TASKMASTER_LOG_LEVEL`, etc., are **no longer set via `.env`**. Use `task-master models --setup` instead.
## How It Works
@@ -42,7 +42,7 @@ Task Master configuration is now managed through two primary methods:
- Tasks can have `subtasks` for more detailed implementation steps.
- Dependencies are displayed with status indicators (✅ for completed, ⏱️ for pending) to easily track progress.
-2. **CLI Commands**
+2. **CLI Commands**
You can run the commands via:
```bash
@@ -200,7 +200,7 @@ Notes:
## Logging
-The script supports different logging levels controlled by the `LOG_LEVEL` environment variable:
+The script supports different logging levels controlled by the `TASKMASTER_LOG_LEVEL` environment variable:
- `debug`: Detailed information, typically useful for troubleshooting
- `info`: Confirmation that things are working as expected (default)
diff --git a/scripts/README.md b/scripts/README.md
index 640703e4..1b83c635 100644
--- a/scripts/README.md
+++ b/scripts/README.md
@@ -32,7 +32,7 @@ The script can be configured through environment variables in a `.env` file at t
- `PERPLEXITY_API_KEY`: Your Perplexity API key for research-backed subtask generation
- `PERPLEXITY_MODEL`: Specify which Perplexity model to use (default: "sonar-medium-online")
- `DEBUG`: Enable debug logging (default: false)
-- `LOG_LEVEL`: Log level - debug, info, warn, error (default: info)
+- `TASKMASTER_LOG_LEVEL`: Log level - debug, info, warn, error (default: info)
- `DEFAULT_SUBTASKS`: Default number of subtasks when expanding (default: 3)
- `DEFAULT_PRIORITY`: Default priority for generated tasks (default: medium)
- `PROJECT_NAME`: Override default project name in tasks.json
@@ -47,7 +47,7 @@ The script can be configured through environment variables in a `.env` file at t
- Tasks can have `subtasks` for more detailed implementation steps.
- Dependencies are displayed with status indicators (✅ for completed, ⏱️ for pending) to easily track progress.
-2. **Script Commands**
+2. **Script Commands**
You can run the script via:
```bash
@@ -225,7 +225,7 @@ To use the Perplexity integration:
## Logging
-The script supports different logging levels controlled by the `LOG_LEVEL` environment variable:
+The script supports different logging levels controlled by the `TASKMASTER_LOG_LEVEL` environment variable:
- `debug`: Detailed information, typically useful for troubleshooting
- `info`: Confirmation that things are working as expected (default)
diff --git a/scripts/init.js b/scripts/init.js
index efe776d7..9f636314 100755
--- a/scripts/init.js
+++ b/scripts/init.js
@@ -38,10 +38,10 @@ const LOG_LEVELS = {
success: 4
};
-// Get log level from environment or default to info
-const LOG_LEVEL = process.env.LOG_LEVEL
- ? LOG_LEVELS[process.env.LOG_LEVEL.toLowerCase()]
- : LOG_LEVELS.info;
+// Determine log level from environment variable or default to 'info'
+const LOG_LEVEL = process.env.TASKMASTER_LOG_LEVEL
+ ? LOG_LEVELS[process.env.TASKMASTER_LOG_LEVEL.toLowerCase()]
+ : LOG_LEVELS.info; // Default to info
// Create a color gradient for the banner
const coolGradient = gradient(['#00b4d8', '#0077b6', '#03045e']);
diff --git a/tests/setup.js b/tests/setup.js
index 8dedeacd..81e11109 100644
--- a/tests/setup.js
+++ b/tests/setup.js
@@ -9,7 +9,7 @@ process.env.MODEL = 'sonar-pro';
process.env.MAX_TOKENS = '64000';
process.env.TEMPERATURE = '0.2';
process.env.DEBUG = 'false';
-process.env.LOG_LEVEL = 'error'; // Set to error to reduce noise in tests
+process.env.TASKMASTER_LOG_LEVEL = 'error'; // Set to error to reduce noise in tests
process.env.DEFAULT_SUBTASKS = '5';
process.env.DEFAULT_PRIORITY = 'medium';
process.env.PROJECT_NAME = 'Test Project';