File tree Expand file tree Collapse file tree 4 files changed +10
-20
lines changed
Expand file tree Collapse file tree 4 files changed +10
-20
lines changed Original file line number Diff line number Diff line change 44import traceback
55import sqlite3
66import importlib .resources
7- import logging
87from pathlib import Path
98from typing import Optional , Dict , Any , List
109
1413from db import create_analysis , store_file , update_analysis_status
1514from external_api import get_embedding_for_text , call_coding_api
1615from llama_index .core import Document
16+ from logger import get_logger
17+ import logging
1718
1819# reduce noise from httpx used by external libs
1920logging .getLogger ("httpx" ).setLevel (logging .WARNING )
5455DB_LOCK_RETRY_COUNT = 6
5556DB_LOCK_RETRY_BASE_DELAY = 0.05 # seconds, exponential backoff multiplier
5657
57- # configure basic logging for visibility
58- logging .basicConfig (level = logging .INFO )
59- logger = logging .getLogger (__name__ )
58+ logger = get_logger (__name__ )
6059
6160
6261def detect_language (path : str ):
Original file line number Diff line number Diff line change 44
55from config import CFG # config (keeps chunk_size etc if needed)
66import atexit
7- import logging
87import threading
98import queue
9+ from logger import get_logger
1010
11- logging .basicConfig (level = logging .INFO )
12- _LOG = logging .getLogger (__name__ )
11+ _LOG = get_logger (__name__ )
1312
1413# registry of DBWriter instances keyed by database path
1514_WRITERS = {}
Original file line number Diff line number Diff line change @@ -29,15 +29,9 @@ The plugin ZIP will be in `build/distributions/`.
2929## Usage
3030
31311 . Open the PicoCode RAG tool window (right sidebar)
32- 2 . Configure your OpenAI-compatible API:
33- - API Base URL (e.g., ` https://api.openai.com/v1 ` )
34- - API Key (stored securely in IDE password safe)
35- - Embedding Model (e.g., ` text-embedding-3-small ` )
36- - Coding Model (e.g., ` gpt-4 ` )
37- 3 . Click "Save API Key" to store it securely
38- 4 . Click "Start Server" to launch the Python backend
39- 5 . Click "Index Project" to index your current project
40- 6 . Ask questions in the query box and click "Query"
32+ 2 . Click "Start Server" to launch the Python backend
33+ 3 . Click "Index Project" to index your current project
34+ 4 . Ask questions in the query box and click "Query"
4135
4236## Requirements
4337
Original file line number Diff line number Diff line change 66import json
77import sqlite3
88import hashlib
9- import logging
109from pathlib import Path
1110from typing import Dict , List , Optional , Any
1211from datetime import datetime
1312
1413# Import shared database utilities to avoid code duplication
1514from db import _get_connection
15+ from logger import get_logger
1616
17- # Configure logging
18- logging .basicConfig (level = logging .INFO )
19- logger = logging .getLogger (__name__ )
17+ logger = get_logger (__name__ )
2018
2119# Default projects directory
2220PROJECTS_DIR = os .path .expanduser ("~/.picocode/projects" )
You can’t perform that action at this time.
0 commit comments