You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Display entity and location with Block_Logger traces as additional info
The source location and the enclosing entity are always displayed by
GNATCOLL.Traces.Block_Logger, as part of the message:
```
[PKG] Entering Foo:pkg.adb:5
```
Obtaining the same piece of information with a GNATCOLL.Traces.Trace_Handle
can be achieved with the DEBUG.ENTITY_ENCLOSING and DEBUG.LOCATION
in a .gnatdebug configuration file:
```
[PKG] ... (loc: main.adb:12)(entity:Main.Foo)
```
To avoid duplication, this information was not displayed for
Block_Logger traces, but an empty field was still present:
```
[PKG] Entering Main.Foo:main.adb:10 (loc:)(entity:)
```
To keep the logs consistent, the location and entity enclosing information
so are also displayed in the (loc:) and (entity:) fields if the
debug configuration variables ENCLOSING_ENTITY and LOCATION are set.
0 commit comments