def retrieve_log_trace(self, filename=None, dir=None):
if hasattr(self, "<STR_LIT>") and self.applicationLogTrace is not None:<EOL><INDENT>logger.debug("<STR_LIT>" + self.applicationLogTrace)<EOL>if not filename:<EOL><INDENT>filename = _file_name('<STR_LIT>', self.id, '<STR_LIT>')<EOL><DEDENT>return self.rest_client._retrieve_file(self.applicationLogTrace, filename, dir, '<STR_LIT>')<EOL><DEDENT>else:<EOL><INDENT>return None<EOL><DEDENT>
Retrieves the application log and trace files of the job
        and saves them as a compressed tar file.

        An existing file with the same name will be overwritten.

        Args:
            filename (str): name of the created tar file. Defaults to `job_<id>_<timestamp>.tar.gz` where `id` is the job identifier and `timestamp` is the number of seconds since the Unix epoch, for example ``job_355_1511995995.tar.gz``.
            dir (str): a valid directory in which to save the archive. Defaults to the current directory.

        Returns:
            str: the path to the created tar file, or ``None`` if retrieving a job's logs is not supported in the version of IBM Streams to which the job is submitted.

        .. versionadded:: 1.8