Timestamp Sort
A Sublime Text 4 plugin to sort log messages based on their timestamps.
Details
Installs
- Total 16
- Win 7
- Mac 6
- Linux 3
| Apr 4 | Apr 3 | Apr 2 | Apr 1 | Mar 31 | Mar 30 | Mar 29 | Mar 28 | Mar 27 | Mar 26 | Mar 25 | Mar 24 | Mar 23 | Mar 22 | Mar 21 | Mar 20 | Mar 19 | Mar 18 | Mar 17 | Mar 16 | Mar 15 | Mar 14 | Mar 13 | Mar 12 | Mar 11 | Mar 10 | Mar 9 | Mar 8 | Mar 7 | Mar 6 | Mar 5 | Mar 4 | Mar 3 | Mar 2 | Mar 1 | Feb 28 | Feb 27 | Feb 26 | Feb 25 | Feb 24 | Feb 23 | Feb 22 | Feb 21 | Feb 20 | Feb 19 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 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 |
| Mac | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 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 | 1 | 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