Restarted sessions should correctly log to the log file just like a newly opened window's session does.
Thanks for filing an issue! Please answer the questions below so I can help you.
- iTerm2 version: 3.3.11
- OS version: 10.15.17
- Attach ~/Library/Preferences/com.googlecode.iterm2.plist here (drag-drop from finder into this window) - Done
- Attach a debug log, if possible. Instructions at https://iterm2.com/debuglog
- Attach a screen capture video if it would make the reproduction steps clearer.
- Are you reporting a performance issue, excessive CPU usage, or a hang? Please attach a sample. Instructions at https://gitlab.com/gnachman/iterm2/wikis/HowToSample
- Are you reporting a crash? Please attach the crash log. Instructions at https://gitlab.com/gnachman/iterm2/wikis/crash-logs
- Are you reporting excessive memory usage? Please attach a heap analysis: https://gitlab.com/gnachman/iterm2/wikis/heapshot
PLEASE ATTACH YOUR PLIST FILE FOR BUG REPORTS! Seriously! I'll probably ask you for it if you don’t.
Detailed steps to reproduce the problem:
-
Create a new profile and under the Session/Miscellaneous settings select the automatically log files to location and give a location.
-
Open a new window/terminal using profile created above and observe that a log file is created and logged to (see size is growing a operations are performed in the terminal/session).
-rw-r--r-- 1 owner group 2007 Oct 28 09:40 20201028_093700.hostname.w17t0p0.EAF5C8AD-4DF6-413B-A704-777BC1115160.690.3254305886.log
- End the session by typing exit as can be seen from the log above:
My-MacBook-Pro:Test Logs owner$ cat 20201028_093700.hostname.w17t0p0.EAF5C8AD-4DF6-413B-A704-777BC1115160.690.3254305886.log
Password:
Last login: Tue Oct 27 20:06:59 2020 from 10.1.1.1
root@hostname:/#
root@hostname:/# exit
logout
Connection to hostname closed.
-
Since the terminal window does not close on session exit, right click the mouse and select to Restart the session.
-
Observe that a new log file is created but it never grows in size. One can do many operations in the session/terminal and none of them are logged to the log file (see size is zero/0).
-rw-r--r-- 1 owner group 0 Oct 28 09:40 20201028_093700.hostname.w17t0p0.0545609C-4469-457C-B24B-918928E074C6.690.3254305886.log
What happened:
After a session is closed and re-opened in the same window it no longer logs to a log file.
What should have happened:
Restarted sessions should correctly log to the log file just like a newly opened window's session does.