logging in daemon mode