Skip to content

Revise log system#70

Merged
babarot merged 6 commits intomainfrom
babarot/log
Feb 16, 2025
Merged

Revise log system#70
babarot merged 6 commits intomainfrom
babarot/log

Conversation

@babarot
Copy link
Copy Markdown
Owner

@babarot babarot commented Feb 16, 2025

What

  • Restructured the logging package to be more modular and maintainable
  • Split the logging functionality into separate files:
    • types.go: Type definitions and constants
    • styles.go: Style definitions and utility functions
    • options.go: Configuration options and setters
    • log.go: Core logging functionality
  • Added new text styling utilities (Highlight and UnderBold)
  • Enhanced logging messages with structured grouping and better formatting
  • Fixed IMPORTANT log level integration with default styles
  • Improved log output consistency across different storage types
  • Moved environment-related code to utils package for better organization

Why

  • The code structure was becoming difficult to maintain with multiple responsibilities in single files
  • Style definitions were scattered across the codebase, making it hard to maintain consistent styling
  • Log messages lacked proper structure and grouping, making debugging more difficult
  • The new structure makes it easier to extend logging functionality while maintaining backward compatibility
  • Better encapsulation of logging internals allows for easier testing and maintenance

@babarot babarot changed the title Babarot/log Revise log system Feb 16, 2025
@babarot babarot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, issues, etc. label Feb 16, 2025
@babarot babarot merged commit 4c86c51 into main Feb 16, 2025
5 checks passed
@babarot babarot deleted the babarot/log branch February 16, 2025 10:45
@github-actions github-actions bot mentioned this pull request Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/cleanup Categorizes issue or PR as related to cleaning up code, issues, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant