Supermila Log Analyzer
English · 日本語 · 中文
English
Analyze .log and .txt files directly in Visual Studio Code. Supermila Log Analyzer detects log levels, highlights important events, filters large logs, supports common C# NLog layouts, and presents the results in a visual statistics dashboard.
Features
- Detects Error, Fatal, Warning, Info, Debug, Trace, and other log events
- Highlights errors and warnings in the editor and VS Code Problems panel
- Filters by time of day with hour, minute, and second precision
- Filters by one or more selected log levels
- Opens filtered results in a safe, read-only editor without changing the source file
- Shows how many earlier and later source lines are hidden
- Provides one-click actions to clear time and level filters independently
- Displays total events, errors, warnings, level distribution, and events over time
- Automatically chooses second, minute, or hour intervals for the timeline chart
- Updates analysis automatically when a log file is saved
- Processes all log data locally and sends no telemetry
C# NLog support
The extension recognizes common NLog layouts such as:
${longdate}|${level}|${logger}|${message}
It also supports bracketed levels, level=Info, JSON level fields, NLog four-digit fractional seconds, and multiline .NET exception stack traces. Fatal is grouped under Error, while Trace is grouped under Debug. Structured level fields take priority over message keywords.
Getting started
- Open a
.log or .txt file.
- Select the Log Analyzer icon in the Activity Bar.
- Run Log Analyzer: Analyze Current File if automatic analysis is disabled.
- Select an error or warning to jump to the corresponding source line.
- Use the calendar, filter, and graph actions for time filtering, level filtering, and statistics.
Time and level filtering
Log Analyzer: Set Time Range opens a form with start and end times. Dates are intentionally ignored because each file is treated as one day of log data. An ending time such as 09:00:10 includes the complete second through 09:00:10.999.
Log Analyzer: Filter Levels opens a multi-select list. Only selected levels are displayed. Time and level filters can be combined and cleared independently.
Statistics dashboard
Run Log Analyzer: Show Statistics or select the graph icon. The dashboard displays:
- Total event count
- Error and warning totals
- Level distribution with percentages
- An adaptive events-over-time chart
Active filters are applied automatically, and an open dashboard refreshes whenever the file is analyzed again.
Commands
Log Analyzer: Analyze Current File
Log Analyzer: Clear Results
Log Analyzer: Show Errors Only
Log Analyzer: Show All Important Entries
Log Analyzer: Set Time Range
Log Analyzer: Clear Time Range
Log Analyzer: Filter Levels
Log Analyzer: Clear Level Filter
Log Analyzer: Show Statistics
Settings
logAnalyzer.autoAnalyze: automatically analyze log files when opened or saved
logAnalyzer.maxEntries: maximum number of important entries in the results view
Privacy
All analysis runs locally inside VS Code. Log contents are not uploaded, and the extension sends no telemetry.
日本語
Visual Studio Code 内で .log および .txt ファイルを直接解析できます。Supermila Log Analyzer はログレベルの判定、重要イベントの強調表示、大きなログの絞り込み、一般的な C# NLog 形式の解析、統計ダッシュボードによる可視化に対応しています。
主な機能
- Error、Fatal、Warning、Info、Debug、Trace、その他のログを判定
- Error と Warning をエディターおよび Problems パネルに表示
- 時・分・秒を指定した時間帯フィルター
- 選択したログレベルだけを表示する複数選択フィルター
- 元ファイルを変更しない読み取り専用のフィルター結果
- 前後で非表示になった行数を表示
- 時間フィルターとレベルフィルターを個別に解除
- 総イベント数、Error 数、Warning 数、レベル分布、時間推移をグラフ表示
- ログの時間幅に応じて秒・分・時間単位を自動選択
- ログ保存時の自動再解析
- ログはすべてローカルで処理し、テレメトリを送信しません
C# NLog 対応
次のような一般的な NLog レイアウトを認識します。
${longdate}|${level}|${logger}|${message}
[INFO] のような括弧形式、level=Info、JSON の level フィールド、NLog の小数4桁時刻、複数行の .NET 例外スタックトレースにも対応します。Fatal は Error、Trace は Debug として集計されます。明示的な level フィールドはメッセージ内のキーワードより優先されます。
使用方法
.log または .txt ファイルを開きます。
- Activity Bar の Log Analyzer アイコンを選択します。
- 自動解析が無効な場合は Log Analyzer: Analyze Current File を実行します。
- 解析結果の Error または Warning を選択すると元の行へ移動できます。
- カレンダー、フィルター、グラフの各ボタンから時間、レベル、統計を操作できます。
時間・レベルフィルター
Log Analyzer: Set Time Range で開始時刻と終了時刻を設定します。1ファイルに1日分のログが入っている前提のため、日付は比較しません。終了時刻 09:00:10 は 09:00:10.999 までの1秒全体を含みます。
Log Analyzer: Filter Levels では表示するレベルを複数選択できます。時間フィルターとレベルフィルターは同時に使用でき、それぞれ個別に解除できます。
統計ダッシュボード
Log Analyzer: Show Statistics またはグラフアイコンを選択すると、総イベント数、Error 数、Warning 数、レベル分布、時間ごとのイベント推移を表示します。現在のフィルターが自動的に反映され、再解析時には開いているダッシュボードも更新されます。
コマンド
Log Analyzer: Analyze Current File
Log Analyzer: Clear Results
Log Analyzer: Show Errors Only
Log Analyzer: Show All Important Entries
Log Analyzer: Set Time Range
Log Analyzer: Clear Time Range
Log Analyzer: Filter Levels
Log Analyzer: Clear Level Filter
Log Analyzer: Show Statistics
プライバシー
解析はすべて VS Code 内のローカル環境で実行されます。ログ内容のアップロードやテレメトリ送信は行いません。
中文
直接在 Visual Studio Code 中分析 .log 和 .txt 文件。Supermila Log Analyzer 可以识别日志级别、突出显示重要事件、筛选大型日志、解析常见的 C# NLog 格式,并通过统计面板直观展示结果。
主要功能
- 识别 Error、Fatal、Warning、Info、Debug、Trace 和其他日志
- 在编辑器和 VS Code Problems 面板中显示 Error 与 Warning
- 按小时、分钟和秒设置时间范围
- 多选需要显示的日志级别
- 在只读页面中显示筛选结果,不修改原始日志
- 标明前后分别隐藏了多少行
- 时间筛选和 Level 筛选可以分别解除
- 显示总事件数、Error 数、Warning 数、Level 分布和时间趋势
- 根据日志跨度自动选择秒、分钟或小时作为统计间隔
- 保存日志后自动重新分析
- 所有日志均在本地处理,不发送遥测数据
C# NLog 支持
插件可以识别常见的 NLog Layout:
${longdate}|${level}|${logger}|${message}
同时支持 [INFO]、level=Info、JSON Level 字段、NLog 四位小数时间,以及多行 .NET 异常堆栈。Fatal 会归入 Error,Trace 会归入 Debug。明确的 Level 字段优先于日志消息中的关键词。
使用方法
- 打开
.log 或 .txt 文件。
- 点击 Activity Bar 中的 Log Analyzer 图标。
- 如果关闭了自动分析,运行 Log Analyzer: Analyze Current File。
- 点击分析结果中的 Error 或 Warning,可跳转到对应的原始日志行。
- 使用日历、筛选器和图表按钮设置时间、Level 和统计图。
时间和 Level 筛选
通过 Log Analyzer: Set Time Range 设置开始和结束时间。插件假定每个文件只包含一天的日志,因此忽略日期。结束时间 09:00:10 会包含到 09:00:10.999 为止的完整一秒。
通过 Log Analyzer: Filter Levels 多选需要显示的 Level。时间筛选和 Level 筛选可以组合使用,也可以分别解除。
日志统计图
运行 Log Analyzer: Show Statistics 或点击图表按钮,可以查看总事件数、Error 数、Warning 数、Level 分布和事件时间趋势。当前筛选条件会自动应用;日志重新分析时,已打开的统计面板也会刷新。
命令
Log Analyzer: Analyze Current File
Log Analyzer: Clear Results
Log Analyzer: Show Errors Only
Log Analyzer: Show All Important Entries
Log Analyzer: Set Time Range
Log Analyzer: Clear Time Range
Log Analyzer: Filter Levels
Log Analyzer: Clear Level Filter
Log Analyzer: Show Statistics
隐私
所有分析都在 VS Code 本地完成。插件不会上传日志内容,也不会发送遥测数据。
License
MIT