Create before action and method set_period for logs controller.