Added getting log queries to DAO and repository