logger logic