-
Notifications
You must be signed in to change notification settings - Fork 223
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
[Update] Documentation Optimization + Logging System #25
Conversation
|
||
from utils.logger import PatchedLogging | ||
|
||
logger = PatchedLogging.getLogger(log_level=logging.DEBUG) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you used logging.DEBUG this means users have to import both patchedLogging and logging
utils/logger.py
Outdated
# pass | ||
|
||
@staticmethod | ||
def getLogger(output_type:str = "console", dir:str = "./logs", filename:Union[str, None] = None, log_level:int = logging.INFO, format: Union[str, None] = None) -> logging.Logger: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you make the argument name the same as the default logger? so that users dont have to learn know argumetns that much
utils/logger.py
Outdated
# pass | ||
|
||
@staticmethod | ||
def getLogger(output_type:str = "console", dir:str = "./logs", filename:Union[str, None] = None, log_level:int = logging.INFO, format: Union[str, None] = None) -> logging.Logger: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dont use Union[str, None], use filename: str = "app.log"
, it is weird to have default values in the init
utils/logger.py
Outdated
logging.Logger: the configured logger | ||
""" | ||
# set up logger with log level | ||
logger = logging.getLogger(__name__) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in other file developers use this line logger = logging.getLogger(name) to indicate the logging info is from that file, but this has no meaning to our users as it is not tracking their file name but our utils
You need to track their file or allow them to track their file names instead
We are a wrapper on default logger but does not mean we will loose clarity and we cant mess up
close this PR, separate documents into another one |
https://www.notion.so/LightRAG-documentation-coverage-2a39791ebe6b461b95a6f33b8b14979b