active-logic / activelogic-cs

Behavior Trees and Case Logic for C#7
GNU Affero General Public License v3.0
106 stars 7 forks source link

Automate logging #62

Closed eelstork closed 2 years ago

eelstork commented 3 years ago

Currently AL provides logging and visual history via the logging API. This requires manually annotating client source.

Manual annotations have advantages. Relevant information may be included, such as measurements, time related and motivating emitted statuses; because of that, even if an automation is provided, some features from the current logging API would carry over.

Additionally, automation requires IL instrumenting.

Overall this is a relatively expensive feature to build into AL. Have relevant experience (via ProLog) but no plans to introduce this unless demand is sufficient and/or sponsorships cover the cost.

In the medium term (1-3 years), logging via IL instrumenting might help lean the AL library itself, however the features backing the logging API would eventually get repurposed (because recording allows agents to recall prior actions, a feature that is useful beyond debugging) so the significant overhead/complexity of the logging API (meaning internally) is probably not going away.

eelstork commented 2 years ago

I think that this could be implemented through Roslyn services, or if not, an aspect library. Currently no timeline for implementing this in core AL; automated logging is being made available through BTL, see https://github.com/active-logic/elk