Library for flexible logging