scoping for retreiving logs