Skip to content

Commit 894141f

Browse files
Merge branch 'topic/loggers' into 'master'
Disable the logger's code when the trace is not active See merge request eng/ide/ada_language_server!2081
2 parents 073ef4d + e334a5c commit 894141f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

source/ada/lsp-ada_driver.adb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -740,9 +740,12 @@ begin
740740
Server.Run
741741
(Ada_Handler'Unchecked_Access,
742742
Tracer'Unchecked_Access,
743-
In_Logger => (if In_Trace.Is_Active
743+
-- Disable the In/Out additional logger if the global
744+
-- ALS.MAIN.LOGGER trace is not active or if the specific
745+
-- ALS.IN/ALS.OUT traces are not active.
746+
In_Logger => (if Server_Logger_Trace.Is_Active and then In_Trace.Is_Active
744747
then In_Logger'Unchecked_Access else null),
745-
Out_Logger => (if Out_Trace.Is_Active
748+
Out_Logger => (if Server_Logger_Trace.Is_Active and then Out_Trace.Is_Active
746749
then Out_Logger'Unchecked_Access else null),
747750
Priority => LSP.Server_Jobs.Low);
748751
end if;

0 commit comments

Comments
 (0)