Timestamp format

146 views
Skip to first unread message

Anders Bergsten

unread,
Nov 2, 2024, 6:15:42 PM11/2/24
to iterm2-discuss
Hi,

Is there any way to change the format of timestamps that iTerm2 prepends to each row when logging sessions to file? I've enabled automatic logging plain text to file of my sessions at Settings -> Profiles -> Session. However in the log files produced the timestamps are formatted like this:

[29.10.2024, 11:48:38,841 AM]

I would like ISO 8601 formated timestamps, i.e. the above would then be:

[2024-10-29T11:48:38.841]

Is it possible to configure the timestamps like that in the current version of iTerm2? I don't find any information about that in the documentation.

If currently not implemented I'd like to raise a request for that feature, if possible.

Kind Regards,
Anders Bergsten

Julian Elischer

unread,
Nov 3, 2024, 11:02:06 PM11/3/24
to iterm2-discuss
What I' have many many times wished for is the ability to set teh timestamps into relative mode, where you can get timestamps relative to either session startup, or some button being pushed or even more useful, relative to seeing some regular expression in the stream.
I often have to document the exact timing of output, for example from a serial console during boot, to see if things have sped up or slowed down after changes.
and being able to say "start timing when you see the initial copyright notice", or ~after a 30 second pause" woudl be so useful when logging  output.

George Nachman

unread,
Nov 4, 2024, 4:38:15 PM11/4/24
to iterm2-...@googlegroups.com
Commit 6c60174577d1f4307a86d4138ae05f15e1c82c55 adds:


--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/iterm2-discuss/896c2cee-2320-4c7a-8cdc-ca7b176716f3n%40googlegroups.com.

Anders Bergsten

unread,
Nov 25, 2024, 6:07:55 PM11/25/24
to iterm2-discuss
Hi,

Thanks a lot.

Today I installed version 3.5.10 which I believe includes this update. But when I search for that setting in Advanced the same way you show in your screenshot, the setting doesn't appear. Why?

Kind Regards,
Anders
Screenshot 2024-11-25 at 8.32.33.png
Screenshot 2024-11-25 at 8.34.42.png

George Nachman

unread,
Nov 25, 2024, 6:11:11 PM11/25/24
to iterm2-...@googlegroups.com
3.5.10 was an emergency bug fix release. The latest code is in the nightly build. If 3.5.10 turns out not to be on fire then I’ll release a new beta soon.

Anders Bergsten

unread,
Nov 26, 2024, 4:14:04 PM11/26/24
to iterm2-discuss
Ok, great. Thanks a lot.

Anders Bergsten

unread,
Apr 17, 2025, 1:35:32 AMApr 17
to iterm2-...@googlegroups.com
Hi again George,

Today I upgraded iTerm2 to version 3.5.13 and restarted the application. Then in the Advanced Settings I changed the logging format to the following which is ISO 8601 compliant.

image.png

But the dates in the log file still appear like this:

% eecho hello
[16.04.2025, 12:55:44,806 PM] hello
[16.04.2025, 12:55:44,806 PM] % 

I also tried the following format (which though isn't ISO 8601 compliant) but the date in the log entries remains the same as above.

image.png

Any idea what's wrong?

Best Regards,
Anders Bergsten




You received this message because you are subscribed to a topic in the Google Groups "iterm2-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/iterm2-discuss/T24LZkjxbhM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to iterm2-discus...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/iterm2-discuss/f44551b2-49fb-4360-898e-9383241a62d6n%40googlegroups.com.

George Nachman

unread,
May 7, 2025, 8:01:49 PMMay 7
to iterm2-...@googlegroups.com
I’m not able to reproduce the issue, but maybe there’s something else going on. Would you please file an issue and include your ~/Library/Preferences/com.googlecode.iterm2.plist file? Also include a detailed description of the steps you followed and a debug log.

Anders Bergsten

unread,
May 8, 2025, 11:08:28 PMMay 8
to iterm2-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages