{"id":30954831,"url":"https://github.com/neverbot/sublimerlog","last_synced_at":"2026-06-19T18:31:06.684Z","repository":{"id":313084903,"uuid":"1049860400","full_name":"neverbot/SublimerLog","owner":"neverbot","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-09T20:43:09.000Z","size":34,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-09T23:53:02.722Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neverbot.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-03T15:45:13.000Z","updated_at":"2025-09-09T20:43:12.000Z","dependencies_parsed_at":"2025-09-09T23:53:05.135Z","dependency_job_id":null,"html_url":"https://github.com/neverbot/SublimerLog","commit_stats":null,"previous_names":["neverbot/sublimer-log","neverbot/sublimerlog"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/neverbot/SublimerLog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neverbot%2FSublimerLog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neverbot%2FSublimerLog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neverbot%2FSublimerLog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neverbot%2FSublimerLog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neverbot","download_url":"https://codeload.github.com/neverbot/SublimerLog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neverbot%2FSublimerLog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34544403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-11T11:54:39.208Z","updated_at":"2026-06-19T18:31:06.655Z","avatar_url":"https://github.com/neverbot.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sublimer Log\n\nSublimer Log captures everything printed to the Sublime Text console (print() calls and error tracebacks) and writes it to an external file while still printing to the original console stream. Because Sublime Text does not guarantee plugin load order, Sublimer Log can force a reload of other plugins after it initializes so import-time errors and exceptions from those targets are captured and persisted to disk. This makes it easy to start Sublime Text, reproduce a bug, and have a persistent, machine-readable record of console output — useful for iterating on plugins and for AI-assisted development workflows that need access to console logs on the filesystem.\n\n## Why this is useful\n\n- Ensures import-time errors and runtime tracebacks from target plugins are recorded in a log file you control.\n- Helps automated workflows and AI agents inspect console output after launching Sublime Text.\n- Saves a copy of previous logs (.bak) on startup (configurable) so you can compare or preserve earlier runs.\n\n## Typical workflow\n\n1. Install Sublimer Log in your `Packages/` directory so it loads early.\n2. Configure `SublimerlLog.sublime-settings` and set `plugins_to_reload` to the package/module you want monitored.\n3. On startup Sublimer Log will enable file logging and, if requested, force-reload the specified plugins so any import-time errors get written to the configured log file.\n\n## Project structure\n\nBelow is a compact ASCII view of the repository layout (important files only):\n\n```\nSublimerLog/\n├── SublimerLog.py                — plugin entrypoint; initializes listener, logging and console capture\n├── listeners/\n│   ├── __init__.py               — package exports for event listeners\n│   └── event_listener.py         — `SublimerLogListener` with `on_*` event handlers (new, load, save, close)\n├── commands/\n│   ├── __init__.py               — package exports for command classes\n│   └── plugin_commands.py        — Sublime command classes (sublimer_log_show_info, sublimer_log_open_preferences)\n├── console/\n│   ├── __init__.py               — package exports for console helpers\n│   ├── capture.py                — `ConsoleCapture`: setup/cleanup and writing console output to file\n│   └── logger.py                 — `log()` and `log_system_info()` helpers\n├── reloader/\n│   └── reloader.py               — plugin reloader module for forcing plugin reloads after initialization\n├── Default.sublime-keymap        — bundled key bindings\n├── Default.sublime-commands      — command palette entries\n├── Main.sublime-menu             — main menu entries\n├── SublimerlLog.sublime-settings — default/user-editable settings\n└── readme.md                     — project documentation (this file)\n```\n\n(Only top-level and core files shown.)\n\n## Features\n\n- Initializes early and logs plugin startup info.\n- Captures console output to a configurable file while still printing to the original streams.\n- Logs basic file events: new, load, pre/post save, close.\n- Provides commands to inspect plugin/system info and open the plugin settings.\n\n## Installation\n\nCopy the repository folder into your Sublime Text `Packages` directory and restart Sublime Text. The plugin is self-contained and does not require external dependencies.\n\nPaths:\n- macOS: `~/Library/Application Support/Sublime Text/Packages/`\n- Windows: `%APPDATA%\\\\Sublime Text\\\\Packages\\\\`\n- Linux: `~/.config/sublime-text/Packages/`\n\n## Usage\n\n### Key bindings (bundled)\n\n- `Ctrl+Shift+L` — Show plugin/system information (`sublimer_log_show_info`).\n- `Ctrl+Shift+Alt+S` — Open plugin preferences (`sublimer_log_open_preferences`).\n\n### Command Palette\n\nOpen Command Palette (`Cmd+P` / `Ctrl+Shift+P`) and run:\n\n- `Sublimer Log: Show Info`\n- `Sublimer Log: Open Preferences`\n\n### Settings\n\nEdit `SublimerlLog.sublime-settings` to configure behavior. Current keys used by the code:\n\n- `show_console_on_startup` (bool) — open the console automatically on plugin load.\n- `enable_file_logging` (bool) — enable writing console output to a file.\n- `log_file_path` (string) — path to the file used for logging (supports `~`).\n- `print_timestamps` (bool) — whether the `log()` helper prefixes timestamps.\n- `rewrite_log_file_path` (bool) — if true (default) Sublimer Log will copy the existing log file to the same filename ending in `.bak` (removing an existing `.bak` first) and start with a fresh log file on startup.\n- `plugins_to_reload` (list) — list of package/module names that Sublimer Log will attempt to reload after it initializes. Use this to force the target plugin to be reloaded under the file-logging context so any import-time errors get written to the log file.\n\nExample:\n\n```json\n{\n    \"show_console_on_startup\": false,\n    \"enable_file_logging\": true,\n    \"log_file_path\": \"~/.sublimer-log.txt\",\n    \"print_timestamps\": true,\n    \"rewrite_log_file_path\": true,\n    \"plugins_to_reload\": [\"MyPackage\", \"another_pkg.module\"]\n}\n```\n\n## Troubleshooting\n\n- If console logging is duplicating lines, ensure only one copy of the plugin is installed and `enable_file_logging` is `true` in settings. The capture class writes to both the original stream and the configured file; duplicates in file and console are expected behavior.\n- If commands do not run, verify the bundled keymap and command names match the class-to-command mapping. Command names are `sublimer_log_show_info` and `sublimer_log_open_preferences`.\n\n## Compatibility\n\n- Designed for Sublime Text 4. Uses Python 3.8 compatible syntax and the Sublime plugin API.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneverbot%2Fsublimerlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneverbot%2Fsublimerlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneverbot%2Fsublimerlog/lists"}