Skip to content

Commit 16db25d

Browse files
committed
Use separate log files for different clients. Closes #112.
A nvim instance will typically spawn more than one python client, i e one legacy provider and one rplugin host. This allows to read the log file of both.
1 parent fc7bee8 commit 16db25d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

neovim/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ def start_host(session=None):
4545

4646
logger = logging.getLogger(__name__)
4747
if 'NVIM_PYTHON_LOG_FILE' in os.environ:
48-
logfile = os.environ['NVIM_PYTHON_LOG_FILE'].strip()
48+
logfile = (os.environ['NVIM_PYTHON_LOG_FILE'].strip() +
49+
'_' + str(os.getpid()))
4950
handler = logging.FileHandler(logfile, 'w')
5051
handler.formatter = logging.Formatter(
5152
'%(asctime)s [%(levelname)s @ '

0 commit comments

Comments
 (0)