Project

General

Profile

Actions

Defect #2193

closed

LRT: configure logback to show configured thread name in logs

Added by Radek Tomiška over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Low
Assignee:
Radek Tomiška
Category:
Long running task
Target version:
Start date:
04/07/2020
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

Description

Check thread pools (test + event) usage, prevent to reuse LRT thread in event processing. This could lead to change authentication context for already running task.


Related issues

Related to IdStory Identity Manager - Task #2203: Configure pattern for logback - server configuration documentationClosedPetr Fišer04/09/2020

Actions
Actions #1

Updated by Radek Tomiška over 4 years ago

  • Subject changed from LRT: authentization is changed during tas processing to LRT: authentization is changed during task processing
Actions #2

Updated by Radek Tomiška over 4 years ago

I'm not able to reproduce the issue with changing authorization for running LRT.

Spring default logback configuration uses wrong thread name in logs - is generated generally with prefix 'task-executor-' for all thread pools created by bean configuration. This can lead to misunderstanding, which thread pool is used.
Change logback configuration is needed to show thread pool prefix by thread pool configuration:

logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss.SSS} %5level %relative --- [%thread] %logger{36}.%M : %msg%n
logging.pattern.file=%d{yyyy-MM-dd HH:mm:ss.SSS} %5level %relative --- [%thread] %logger{36}.%M : %msg%n

I will continue with transaction id - is posible to authentication is ok, but transaction is reused somehow. Then i will check project implementation.

Actions #3

Updated by Radek Tomiška over 4 years ago

  • Subject changed from LRT: authentization is changed during task processing to LRT: configure logback to show configured thread name in logs
  • Status changed from In Progress to Needs feedback
  • Assignee changed from Radek Tomiška to Vít Švanda
  • Priority changed from High to Low
  • % Done changed from 0 to 90

I improved logging, added annotations for documentation reason and set properties above into product.
I'm not able to reproduce issue with relogin in processed LRT, but I've added some logs into DefaultLongRunningTaskManager and DefaultEntityEventManager, we can debug project if it occurs again.

Commit:
https://github.com/bcvsolutions/CzechIdMng/commit/0484ca117f2d540bdd769a1d4288340a93ba5657

Doc:
https://wiki.czechidm.com/devel/documentation/application_configuration/dev/backend#logger

Could you please test tomcat setting above and provide me a feedback please? After that I will ask sys to update instalation guides.

Actions #4

Updated by Vít Švanda over 4 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Vít Švanda to Radek Tomiška
  • % Done changed from 90 to 100

I did review. Thanks for that.

Actions #5

Updated by Radek Tomiška over 4 years ago

  • Status changed from Resolved to Closed
Actions #6

Updated by Radek Tomiška over 4 years ago

  • Related to Task #2203: Configure pattern for logback - server configuration documentation added
Actions

Also available in: Atom PDF