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

EVDOC01-142 Redirecció logs Ignite i Microsoft #15

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

bbbbgarcia
Copy link

Afegir fitxers custom-ignite-log4j2.xml i custom-microsoft-log4j2.xml al Tomcat

bgarciaentornos added 2 commits June 7, 2024 11:45
Comment on lines 170 to 173
LoggerContext context = (LoggerContext) LogManager.getContext(false);
context.setConfigLocation(new File(serverConfigurationService.getSakaiHomePath() + "custom-microsoft-log4j2.xml").toURI());
context.reconfigure();

Copy link
Author

Choose a reason for hiding this comment

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

Suggested change
LoggerContext context = (LoggerContext) LogManager.getContext(false);
context.setConfigLocation(new File(serverConfigurationService.getSakaiHomePath() + "custom-microsoft-log4j2.xml").toURI());
context.reconfigure();
log.info("Before Microsoft log reconfiguration");
LoggerContext context = (LoggerContext) LogManager.getContext(false);
context.setConfigLocation(new File(serverConfigurationService.getSakaiHomePath() + "custom-microsoft-log4j2.xml").toURI());
context.reconfigure();
log.info("After Microsoft log reconfiguration");

Copy link
Contributor

Choose a reason for hiding this comment

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

He afegit aquest canvi i ara surt al catalina
10-de juny-2024 12:55:47.336 ^[[0mINFO^[[m [main] o.s.m.i.MicrosoftCommonServiceImpl.init Before Microsoft log reconfiguration
i després escriu al fitxer de log
[INFO ] 10-06-2024 12:55:47.372 [main] MicrosoftCommonServiceImpl - After Microsoft log reconfiguration
Però després si vaig a l'eina de sincro de Microsoft ja no escriu res al fitxer de log

Copy link
Author

Choose a reason for hiding this comment

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

Pots executar el job per a vore si també apareix al fitxer de log de Microsoft?

Copy link
Author

Choose a reason for hiding this comment

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

És estrany, pel que dius està llegint el xml i en el seu contingut està que mostre els logs de debug. De totes maneres, una solució provisional tenint en compte que el que es vol és redirigir el log a un fitxer diferent podria ser modificar els log.debug a log.info.

(Si els missatges del job també apareixen, té per començar i acabar)

Copy link
Contributor

Choose a reason for hiding this comment

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

He executat el job i tampoc ha escrit al fitxer
En canvi al catalina ha escrit logs d'error
ERROR com.microsoft.aad.msal4j.ConfidentialClientApplication - [Correlation ID: 79c135cd-da75-49f0-aceb-a8f45ddf75bd] Execution of class com.microsoft.aad.msal4j.AcquireTokenByClientCredentialSupplier failed.
com.microsoft.aad.msal4j.MsalClientException: java.net.SocketTimeoutException: Read timed out
ERROR org.sakaiproject.microsoft.provider.AdminAuthProvider - Exception retrieving token from Microsoft Graph Auth Provider

Copy link
Contributor

Choose a reason for hiding this comment

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

Se us acudeix alguna altra prova que pugui fer amb la configuració?

Copy link
Author

Choose a reason for hiding this comment

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

[DEBUG] 10-06-2024 13:37:25.865 [pool-8-thread-5] MicrosoftSynchronizationServiceImpl - Message listen from MicrosoftSynchronizationServiceImpl: TOPIC=ADD_MEMBER_TO_AUTHZGROUP => action=ADD, type=SITE, siteId=~admin, groupId=null, userId=admin, status=0, owner=true, forced=false [DEBUG] 10-06-2024 13:37:25.868 [pool-8-thread-5] MicrosoftSynchronizationServiceImpl - NOT allowed to add user to team [INFO ] 10-06-2024 13:37:27.247 [QuartzScheduler_Worker-2] RunSynchronizationsJob - RunSynchronizationsJob started. [DEBUG] 10-06-2024 13:37:27.253 [pool-8-thread-6] MicrosoftSynchronizationServiceImpl - Message listen from MicrosoftSynchronizationServiceImpl: TOPIC=ADD_MEMBER_TO_AUTHZGROUP => action=ADD, type=SITE, siteId=~admin, groupId=null, userId=admin, status=0, owner=true, forced=false [INFO ] 10-06-2024 13:37:27.253 [QuartzScheduler_Worker-2] RunSynchronizationsJob - RunSynchronizationsJob completed. [DEBUG] 10-06-2024 13:37:27.254 [pool-8-thread-6] MicrosoftSynchronizationServiceImpl - NOT allowed to add user to team

A nosaltres ens apareix tot redirigit al fitxer de Microsoft, amb compilar l'eina i reiniciar hauria de ser suficient. Potser alguna configuració del teu entorn pot estar afectant? Si ens dius podem intentar configurar-nos nosaltres el que siga diferent, no estem segurs del motiu

Copy link
Author

Choose a reason for hiding this comment

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

De tota manera jo tornaria a posar org.sakaiproject.microsoft (sense el impl) si ho has canviat al xml i provaria el job d'eixa manera.

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.

2 participants