activate individual queries logging as additional function parameter (Thanks @thezoggy)