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

日志显示问题 #10

Closed
129duckflew opened this issue Feb 13, 2025 · 2 comments
Closed

日志显示问题 #10

129duckflew opened this issue Feb 13, 2025 · 2 comments

Comments

@129duckflew
Copy link

129duckflew commented Feb 13, 2025

版本:1.0.0-beta
问题:
1.控制台日志输出线程名称输出不完整
2.控制台日志没有彩色输出
在启用虚拟线程之后,Tomcat的线程名称会超过15个字符导致被截断,如下所示

2025-02-13 08:53:10.711  INFO 40444 --- [admin-service] [           main] c.sz.platform.listener.AppStartListener  :  ===================== app is running finish ... =====================
2025-02-13 08:53:14.997  INFO 40444 --- [admin-service] [omcat-handler-0] o.a.c.c.C.[.[localhost].[/api/admin]     : Initializing Spring DispatcherServlet 'dispatcherServlet'
2025-02-13 08:53:14.997  INFO 40444 --- [admin-service] [omcat-handler-0] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2025-02-13 08:53:14.998  INFO 40444 --- [admin-service] [omcat-handler-0] o.s.web.servlet.DispatcherServlet        : Completed initialization in 1 ms
2025-02-13 08:53:16.857  INFO 40444 --- [admin-service] [mcat-handler-22] o.springdoc.api.AbstractOpenApiResource  : Init duration for springdoc-openapi is: 1218 ms
2025-02-13 09:28:28.337  INFO 40444 --- [admin-service] [ionShutdownHook] o.s.b.w.e.tomcat.GracefulShutdown        : Commencing graceful shutdown. Waiting for active requests to complete
2025-02-13 09:28:28.347  INFO 40444 --- [admin-service] [tomcat-shutdown] o.s.b.w.e.tomcat.GracefulShutdown        : Graceful shutdown complete
@129duckflew
Copy link
Author

我替换了日志的pattern为:%d{yyyy-MM-dd HH:mm:ss.SSS} [%clr(%t){cyan}] %clr(${PID:- }){magenta} [%clr(${APP_NAME:-}){blue}] %highlight(%-5level) %magenta(%logger{30}:%-3L) - %m%n 后显示正常

@feiyuchuixue
Copy link
Owner

感谢支持!修改后的pattern展示很完美!

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

When branches are created from issues, their pull requests are automatically linked.

2 participants