'Retrieve log file for the given service\'s pod.
Args:
service: [string] The service\'s log to get
log_dir: [string] The directory name to write the logs into.'

def do_fetch_service_log_file(self, service, log_dir):

    options = self.options
    k8s_namespace = options.deploy_k8s_namespace
    service_pod = self.__get_pod_name(k8s_namespace, service)
    path = os.path.join(log_dir, (service + '.log'))
    write_data_to_secure_path('', path)
    check_run_quick('kubectl    -n    {namespace}    -c    {container}    {context}    logs    {pod}        >>    {path}'.format(namespace=k8s_namespace, container='spin-{service}'.format(service=service), context=('--context    {0}'.format(options.k8s_account_context) if options.k8s_account_context else ''), pod=service_pod, path=path))
