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

refactor(logger): remove DefineLogger and InjectEnum #193

Merged
merged 5 commits into from
Sep 8, 2022

Conversation

noahziheng
Copy link
Member

resolve #190

  • 移除不必要的覆盖式自定义类逻辑
    • 包括 DefineXXX 装饰器,和 InjectEnum 枚举值
    • 替换为 IoC 管理 / Core 提供 Interface / 上层各自实现的思路
  • 与 Trigger 对齐命名格式

主要变更:

  • 移除 DefineLogger 装饰器
  • 移除 ArtusInjectEnum.Logger 枚举
  • 修改 app.logger getter 为获取内置实现
    • 上层框架如有需求需自行 override
  • Logger(Interface) 更名为 LoggerType(Interface)
  • ArtusLogger(Class) 更名为 Logger(Class)

src/application.ts Outdated Show resolved Hide resolved
src/logger/base.ts Outdated Show resolved Hide resolved
@hyj1991
Copy link
Member

hyj1991 commented Sep 8, 2022

CI 挂了,需要修下

@codecov-commenter
Copy link

codecov-commenter commented Sep 8, 2022

Codecov Report

Base: 89.97% // Head: 90.71% // Increases project coverage by +0.74% 🎉

Coverage data is based on head (c596fee) compared to base (060ee3f).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #193      +/-   ##
==========================================
+ Coverage   89.97%   90.71%   +0.74%     
==========================================
  Files          50       48       -2     
  Lines        1127     1099      -28     
  Branches      196      195       -1     
==========================================
- Hits         1014      997      -17     
+ Misses        113      102      -11     
Impacted Files Coverage Δ
src/constant.ts 100.00% <ø> (ø)
src/application.ts 90.90% <100.00%> (-0.27%) ⬇️
src/logger/impl.ts 84.61% <100.00%> (+1.28%) ⬆️
src/logger/index.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@hyj1991 hyj1991 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

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.

[RFC] 精简 core 对外透出的装饰器
3 participants