added support for configurable logging frequency