fix: Use dynamic log file name based on product name#885
Merged
dexhorthy merged 1 commit intohumanlayer:mainfrom Jan 7, 2026
Merged
fix: Use dynamic log file name based on product name#885dexhorthy merged 1 commit intohumanlayer:mainfrom
dexhorthy merged 1 commit intohumanlayer:mainfrom
Conversation
Fixes incorrect log file path display in Settings for CodeLayer PRO and other build variants. Previously hardcoded to "codelayer.log", now dynamically uses the product name (e.g., "CodeLayer-Pro.log", "CodeLayer-Nightly.log"). - Add get_log_file_name() Tauri command to retrieve product-specific filename - Update SettingsDialog to use dynamic log filename - Update documentation with correct paths for all variants Fixes humanlayer#884
Contributor
There was a problem hiding this comment.
Important
Looks good to me! 👍
Reviewed everything up to eab8a6b in 49 seconds. Click for details.
- Reviewed
73lines of code in3files - Skipped
0files when reviewing. - Skipped posting
4draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. humanlayer-wui/CLAUDE.md:8
- Draft comment:
Documentation updated to include product-specific log file names. Ensure that the documented product names (e.g., 'CodeLayer-Pro') exactly match the productName used in production builds. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
2. humanlayer-wui/src-tauri/src/lib.rs:315
- Draft comment:
The new Tauri command 'get_log_file_name' correctly returns a dynamic log filename based on the build mode. Verify that the 'config.product_name' field is reliably populated in production. - Reason this comment was not posted:
Confidence changes required:0%<= threshold50%None
3. humanlayer-wui/src/components/SettingsDialog.tsx:69
- Draft comment:
The updated 'loadLogPath' function now dynamically retrieves the log file name. Consider refactoring to avoid duplicating the call to 'invoke("get_log_file_name")' in both try and catch blocks. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
4. humanlayer-wui/src/components/SettingsDialog.tsx:71
- Draft comment:
For better readability, consider using template literals when constructing the log path instead of string concatenation. - Reason this comment was not posted:
Confidence changes required:33%<= threshold50%None
Workflow ID: wflow_fmuNhwjThpzG11xG
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
Contributor
Author
|
In hind-sight I wonder if having a unique name for the log file is needed. It seems like the build type is part of the directory path so simply having "codelayer.log" consistently for the file name should be enough? Unless there's a use case I'm not aware of for having a unique file name as well 🤷 |
Contributor
|
@jeanduplessis its not 100% thought out, probably a consequence of moving fast 🙂 in either case will get this in once the build passes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem(s) was I solving?
Fixes incorrect log file path display in Settings for CodeLayer PRO and other build variants. Previously hardcoded to "codelayer.log", now dynamically uses the product name (e.g., "CodeLayer-Pro.log", "CodeLayer-Nightly.log").
Fixes #884
What user-facing changes did I ship?
No new user-facing changes.
How I implemented it
Changes Made
Added new Rust command (
humanlayer-wui/src-tauri/src/lib.rs:315-328):get_log_file_name()command that dynamically returns the correct log file name based on the Tauri product namecodelayer.log{ProductName}.log(e.g.,CodeLayer-Pro.log,CodeLayer-Nightly.log, orCodeLayer.log)Updated TypeScript code (
humanlayer-wui/src/components/SettingsDialog.tsx:69-85):loadLogPath()function to call the newget_log_file_namecommandUpdated documentation (
humanlayer-wui/CLAUDE.md:5-14):How It Works
The fix leverages the fact that Tauri automatically uses the
productNamefrom the config as the log file name whenfile_name: Noneis set in the log plugin configuration. The new code:{ProductName}.logCodeLayer.logCodeLayer-Nightly.logCodeLayer-Pro.logHow to verify it
Note
I'm not sure how to build a PRO version of CodeLayer locally to verify the fix. I did do a dev build locally to ensure that everything still worked.
Testing
~/Library/Logs/dev.humanlayer.wui.pro/codelayer.logmake check testpassesI did get a failure on the daemon lint checks, but assume this was already present?
Description for the changelog
A picture of a cute animal (not mandatory but encouraged)
My dog Milo having his morning coffee.

Important
Dynamic log file naming based on product name implemented in Rust and TypeScript, with documentation updates.
get_log_file_name()command inlib.rsdynamically returns log file name based on Tauri product name.codelayer.log; in production, returns{ProductName}.log.loadLogPath()inSettingsDialog.tsxupdated to useget_log_file_name()for dynamic log path construction.CLAUDE.mdto document log paths for Standard, Nightly, and PRO builds.This description was created by
for eab8a6b. You can customize this summary. It will automatically update as commits are pushed.