Timestamp Sort
A Sublime Text 4 plugin to sort log messages based on their timestamps.
Details
Installs
- Total 6
- Win 4
- Mac 2
- Linux 0
| Nov 2 | Nov 1 | Oct 31 | Oct 30 | Oct 29 | Oct 28 | Oct 27 | Oct 26 | Oct 25 | Oct 24 | Oct 23 | Oct 22 | Oct 21 | Oct 20 | Oct 19 | Oct 18 | Oct 17 | Oct 16 | Oct 15 | Oct 14 | Oct 13 | Oct 12 | Oct 11 | Oct 10 | Oct 9 | Oct 8 | Oct 7 | Oct 6 | Oct 5 | Oct 4 | Oct 3 | Oct 2 | Oct 1 | Sep 30 | Sep 29 | Sep 28 | Sep 27 | Sep 26 | Sep 25 | Sep 24 | Sep 23 | Sep 22 | Sep 21 | Sep 20 | Sep 19 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
| Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Timestamp Sort (Editor Plugin)
A text editor plugin to sort log messages based on their timestamps.
Supports multiple timestamp formats, including Unix time.
Works under Sublime 4
Features
- Sorts log entries by timestamp.
- Handles multi-line log messages.
- Preserves non-timestamped lines at the end.
- Supports a variety of timestamp formats.
Supported Timestamp Formats
YYYY-MM-DD HH:mm:ss.SSS(e.g.2025-06-06 08:36:46.827)YYYY-MM-DD HH:mm:ss(e.g.2025-06-06 08:36:46)YYYY/MM/DD HH:mm:ss(e.g.2025/06/06 08:36:46)HH:mm:ss(defaults to2000-01-01date)- Unix timestamps in:
- seconds:
1717666606 - milliseconds:
1717666606827
- seconds:
Manual Installation
- Place your plugin
.pyfile in: Packages/User/timestamp_sort.py
To open this folder from Sublime Text:
Preferences > Browse Packages...
- Create or update a Command Palette entry in
Packages/User/Default.sublime-commands:
[
{
"caption": "Sort: By Timestamp",
"command": "timestamp_sort"
}
]
3. (Optional) Add a main menu entry in Packages/User/Main.sublime-menu:
## Usage
Open a file with log entries.
Use the Command Palette (Cmd+Shift+P / Ctrl+Shift+P) and search for:
Sort: By Timestamp
Or use the Tools menu if you added a menu item.
## Notes
- processes the currently open file
- Assumes timestamps are at the beginning of log entry:
**Log entries can have multiple lines but the 1st line of each entry (paragraph) has to start with a timestamp.**
- Lines before any detectable timestamp are moved to the end in their original order.
## License
MIT