Set up a logger hierarchy
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
You can set up a logger hierarchy within a logging.config file using dotted strings. The Logger framework interprets
a string like Company.Order as being the parent of
Company.Order.Sales, Company.Order.Customer, etc. This enables you to set up a logger hierarchy
with logging configurations that apply to groups of ABL classes.
Company.Order.SalesCompany.Order.CustomerCompany.Internal.EmployeeCompany.Internal.Finance
When you instantiate the Logger, you typically pass the fully qualified
class name in the LoggerBuilder (for example, LoggerBuilder:GetLogger('Company.Order.Sales')).
In the logging.config file, instead of
specifying a logging configuration with a matching name for each of these classes, you
could specify logging configurations named Company.Order and Company.Internal. The
Logger framework determines a parent-child relationship and uses the Company.Order logging configuration for the Sales and Customer classes
and Company.Internal for the Employee and Finance classes.