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

[Update] Documentation Optimization + Logging System #25

Closed
wants to merge 40 commits into from
Closed

Conversation

Alleria1809
Copy link
Contributor

@Alleria1809 Alleria1809 commented May 26, 2024

https://www.notion.so/LightRAG-documentation-coverage-2a39791ebe6b461b95a6f33b8b14979b

  • Added navigation header
  • Added the pydata theme, version control by pyproject.toml - pydata-sphinx-theme = "0.15.2”.
  • responsive design with the pydata theme
  • add discord link, add icon
  • follow the logic of pytoch contributing.md, rewrite the documentation.

@Alleria1809 Alleria1809 changed the title [Update] Documentation Style Optimization [Update] Documentation Optimization + Logging System May 29, 2024

from utils.logger import PatchedLogging

logger = PatchedLogging.getLogger(log_level=logging.DEBUG)
Copy link
Collaborator

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:
Copy link
Collaborator

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:
Copy link
Collaborator

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__)
Copy link
Collaborator

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

@Alleria1809
Copy link
Contributor Author

close this PR, separate documents into another one

@Alleria1809 Alleria1809 deleted the xiaoyi branch July 2, 2024 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants