def print2elog(author='<STR_LIT>', title='<STR_LIT>', text='<STR_LIT>', link=None, file=None, now=None):
<EOL>if now is None:<EOL><INDENT>now  = _dt.datetime.now()<EOL><DEDENT>fulltime = now.strftime('<STR_LIT>')<EOL>if not ((link is None) ^ (file is None)):<EOL><INDENT>link_copied = _copy_file(link, fulltime)<EOL>file_copied = _copy_file(file, fulltime)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>loader = _jj.PackageLoader('<STR_LIT>', '<STR_LIT>')<EOL>env = _jj.Environment(loader=loader, trim_blocks=True)<EOL>template = env.get_template('<STR_LIT>')<EOL>stream = template.stream(author=author, title=title, text=text, link=link_copied, file=file_copied, now=now)<EOL>with _tempfile.TemporaryDirectory() as dirname:<EOL><INDENT>filename = '<STR_LIT>'.format(fulltime)<EOL>filepath = _os.path.join(dirname, filename)<EOL>with open(filepath, '<STR_LIT>') as fid:<EOL><INDENT>stream.dump(fid)<EOL><DEDENT>finalpath = _os.path.join(basedir, filename)<EOL>_shutil.copyfile(filepath, finalpath)<EOL><DEDENT>
Prints to the elog.

Parameters
----------

author : str, optional
    Author of the elog.
title : str, optional
    Title of the elog.
link : str, optional
    Path to a thumbnail.
file : str, optional
    Path to a file.
now : :class:`datetime.datetime`
    Time of the elog.