def __init__(self, logdir, max_queue=<NUM_LIT:10>, flush_secs=<NUM_LIT>, filename_suffix=None, verbose=True):
self._logdir = logdir<EOL>if not os.path.exists(self._logdir):<EOL><INDENT>os.makedirs(self._logdir)<EOL><DEDENT>self._event_queue = six.moves.queue.Queue(max_queue)<EOL>self._ev_writer = EventsWriter(os.path.join(self._logdir, "<STR_LIT>"), verbose=verbose)<EOL>self._flush_secs = flush_secs<EOL>self._sentinel_event = _get_sentinel_event()<EOL>if filename_suffix is not None:<EOL><INDENT>self._ev_writer.init_with_suffix(filename_suffix)<EOL><DEDENT>self._closed = False<EOL>self._worker = _EventLoggerThread(self._event_queue, self._ev_writer,<EOL>self._flush_secs, self._sentinel_event)<EOL>self._worker.start()<EOL>
Creates a `EventFileWriter` and an event file to write to.
        On construction the summary writer creates a new event file in `logdir`.
        This event file will contain `Event` protocol buffers, which are written to
        disk via the add_event method.
        The other arguments to the constructor control the asynchronous writes to
        the event file: