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

宿主应用动态加载业务应用时,业务应用第一次加载完毕不打印日志,需卸载再次加载则正常 #624

Closed
343585776 opened this issue Mar 14, 2023 · 6 comments
Assignees
Labels
bug Something isn't working stale

Comments

@343585776
Copy link

Describe the bug

宿主应用动态加载业务应用时,业务应用第一次加载完毕不打印日志,需卸载再次加载则正常
业务应用功能能正常访问,只是不创建日志目录与打印日志

Expected behavior

业务应用第一次加载时就打印日志

Actual behavior

只打印宿主应用的日志,不打印业务应用日志

Steps to reproduce

1.创建宿主应用
2.telnet localhost 1234
3.biz -i file://xxxxxx.jar 进行动态加载

Environment

  • SOFAArk version:2.1.2
  • JVM version (e.g. java -version):1.8
  • OS version (e.g. uname -a):Darwin 20.6.0
  • Maven version:3.5.4
  • IDE version:IDEA 2020.3
@lylingzhen
Copy link
Contributor

宿主应用(基座)和业务应用(模块)的 maven pom 或者代码样例提供一下?

@343585776
Copy link
Author

@lylingzhen
项目使用的是官方的例子
宿主应用:https://github.com/sofastack-guides/sofa-ark-spring-guides
业务应用:https://github.com/sofastack-guides/spring-boot-ark-biz

有区别的地方是,我在宿主应用与业务应用中分别指定了日志的目录

宿主中:

logging:
  file:
    path: ./logs/base

业务中:

logging:
  file:
    path: ./logs/biz

我期望的是日志打印在各自的目录中,但是经过我测试发现
第一次通过telnet加载业务模块时,日志仍然是追加在宿主的日志中(/logs/base/spring.log),导致了我以为业务模块日志没有进行打印

当我们使用telnet进行卸载后再次进行加载
那么/logs/biz业务日志目录才会创建,并后续日志都写入该路径下的spring.log内了

@lylingzhen lylingzhen added the bug Something isn't working label Mar 17, 2023
@lylingzhen
Copy link
Contributor

这个 bug cc @lvjing2 关注一下。

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue or help wanted) or other activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label Oct 26, 2023
Copy link

github-actions bot commented Nov 2, 2023

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue or help wanted. Thank you for your contributions.

@github-actions github-actions bot closed this as completed Nov 2, 2023
@lvjing2
Copy link
Collaborator

lvjing2 commented Nov 2, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

3 participants