Added visible option in getlogs function