LogVeil · 日志隐读
中文 | English
中文
在 VS Code 底部面板阅读本地文本或日志。正文显示在中间,周围的模拟日志只是背景,不是文件内容。
安装
发布后,可在 VS Code 的“扩展”中搜索 LogVeil 并安装。
也可以通过 VSIX 安装:在“扩展”视图点击右上角的 …,选择“从 VSIX 安装...”,然后选择下载的 .vsix 文件。
开始阅读
- 打开 VS Code 底部面板,选择 Log。如果找不到,按
Ctrl+Shift+P(macOS 为 Cmd+Shift+P),输入并运行“LogVeil:显示 log”。
- 点击 Log 面板标题栏的打开图标,选择本地文本文件,例如
.txt 或 .log。
- 点击正文左半边或右半边翻页;也可以点击正文后使用键盘左右方向键。
- 点击正文外的区域可隐藏正文,用模拟日志替代。再次点击正文位置或按左右方向键可恢复正文;再次操作才会翻页。
背景日志使用本地时间,打开面板时生成,面板持续打开时约每 5 分钟更新一次。
常用功能
面板标题栏的图标可以:
- 添加书签、查看书签:保存阅读位置,之后可跳转或删除。
- 搜索:输入关键词查找当前文件,点击结果跳转;需要时可加载更多结果。书签和搜索面板可返回原阅读位置。
- 显示设置:调整字号、字体和文件编码。如果出现乱码,可尝试切换 UTF-8 或 GBK / GB18030。
- 加密当前文件:设置密码后,在原文件旁生成一个
.plog 加密副本。要阅读副本,请重新打开该 .plog 文件并输入密码。
Log 面板打开时,也可以运行“LogVeil:隐藏或显示正文”命令切换正文显示。该命令默认没有快捷键,可在 VS Code 的“键盘快捷方式”中搜索命令名称并自行设置。
阅读位置、书签和显示设置保存在本机当前 VS Code 用户配置文件中;重新打开阅读器时会恢复上次的文件和位置。插件不会上传文件或阅读记录。文件发生变化或无法访问时,插件会提示重新打开文件;重新打开后索引才会更新。
加密前请注意
- 加密只生成副本,不会加密或删除原文件。确认副本可以打开后,请自行妥善处理原文件及其备份。
- 请牢记密码:忘记密码后无法恢复加密内容。密码不会保存,但派生密钥会保存在 VS Code 的加密安全存储中;异常退出或文件不再打开时,旧密钥可能仍暂存在那里。
- Windows 本地 VS Code 的同一用户配置文件中,其他已启动插件的窗口可能自动解锁同一文件。全部窗口关闭后,下次打开需要重新输入密码;其他系统或远程环境通常需要各窗口输入密码。
- 文件名、文件长度,以及本机保存的路径、阅读位置和书签不受文件加密保护。阅读时明文仍可能出现在内存、屏幕或系统缓存中。
项目贡献
本项目由维护者提出需求并负责验证和维护,代码主要由 AI 编写。
开发和打包方法见开发文档。项目采用 MIT 许可证。
English
Read local text or logs in the VS Code bottom panel. Your content appears in the center; the surrounding simulated logs are only a background and are not part of your file.
Installation
After release, search for LogVeil in VS Code's Extensions view and install it.
To install a downloaded VSIX instead, open Extensions, click … in the upper-right corner, select Install from VSIX..., and choose the .vsix file.
Start reading
- Open the bottom panel in VS Code and select Log. If you cannot find it, press
Ctrl+Shift+P (Cmd+Shift+P on macOS) and run LogVeil: Show Log.
- Click the open icon in the Log panel title bar and select a local text file, such as a
.txt or .log file.
- Click the left or right half of the text to turn pages. You can also click the text and use the left and right arrow keys.
- Click outside the text to hide it behind simulated logs. Click the text area or press an arrow key to reveal it; the next action turns the page.
The simulated logs use local time. They are generated when the panel opens and updated approximately every five minutes while it remains open.
Common features
Use the icons in the panel title bar to:
- Add and view bookmarks: Save your place, return to it later, or delete a bookmark.
- Search: Find a keyword in the current file and click a result to jump to it. Load more results when needed. The bookmark and search panels can take you back to your original reading position.
- Display settings: Change the font size, font, or file encoding. If text looks garbled, try UTF-8 or GBK / GB18030.
- Encrypt the current file: Set a password to create an encrypted
.plog copy next to the original. To read the copy, open the .plog file and enter the password.
While the Log panel is visible, you can also run LogVeil: Hide or Show Content to toggle the text. There is no default shortcut; search for the command in VS Code's Keyboard Shortcuts to assign one.
Your reading positions, bookmarks, and display settings are stored locally in the current VS Code profile. Reopening the reader restores the last file and position. The extension does not upload files or reading history. If the file changes or becomes unavailable, the extension prompts you to reopen it; its index is refreshed only when you do so.
Before encrypting
- Encryption creates a copy; it does not encrypt or delete the original file. After confirming you can open the copy, handle the original and its backups appropriately.
- Remember your password: encrypted content cannot be recovered without it. The password is not saved, but a derived key is stored in VS Code's encrypted secret storage. An old key may remain there after an unexpected exit or if the file is not reopened.
- On local Windows VS Code, other windows using the same profile where the extension is already running may unlock the same file automatically. Once all windows are closed, the password is required again. On other systems or in remote environments, each window generally requires the password.
- Encryption does not protect the file name or size, or locally stored paths, reading positions, and bookmarks. During reading, plaintext may still appear in memory, on screen, or in system caches.
Project contributions
The maintainer defines the requirements and is responsible for validation and maintenance. The code was primarily written by AI.
See the development guide for development and packaging instructions. This project uses the MIT License.