Skip to content

Commit 76bf5fb

Browse files
committed
refactor: replace console.log with console.debug for build info and logout messages
- Updated logging statements in vite.config.mts, BuildVersionCheck.tsx, and MainMenu.tsx to use console.debug instead of console.log for improved log level management. - Added a prefix '[pad.ws]' to debug messages for better context in logs.
1 parent 89b3f50 commit 76bf5fb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/frontend/src/BuildVersionCheck.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function BuildVersionCheck() {
4040
useEffect(() => {
4141
// On first load, store the initial build hash
4242
if (buildInfo?.buildHash && initialBuildHash === null) {
43-
console.log('Initial build hash:', buildInfo.buildHash);
43+
console.debug('[pad.ws] Initial build hash:', buildInfo.buildHash);
4444
setInitialBuildHash(buildInfo.buildHash);
4545
}
4646

@@ -49,7 +49,7 @@ export function BuildVersionCheck() {
4949
buildInfo?.buildHash &&
5050
initialBuildHash !== buildInfo.buildHash) {
5151

52-
console.log('New version detected. Current:', initialBuildHash, 'New:', buildInfo.buildHash);
52+
console.debug('[pad.ws] New version detected. Current:', initialBuildHash, 'New:', buildInfo.buildHash);
5353

5454
// Save the canvas and then refresh
5555
handleVersionUpdate();

src/frontend/src/ui/MainMenu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ export const MainMenuConfig: React.FC<MainMenuConfigProps> = ({
194194
queryClient.invalidateQueries({ queryKey: ['userProfile'] });
195195

196196
// No need to redirect to the logout URL since we're already handling it via iframe
197-
console.log("Logged out successfully");
197+
console.debug("[pad.ws] Logged out successfully");
198198
} catch (error) {
199-
console.error("Logout failed:", error);
199+
console.error("[pad.ws] Logout failed:", error);
200200
}
201201
};
202202

src/frontend/vite.config.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const generateBuildInfoPlugin = (): Plugin => ({
2424
JSON.stringify(buildInfo, null, 2)
2525
);
2626

27-
console.log('Generated build-info.json with hash:', buildInfo.buildHash);
27+
console.debug('[pad.ws] Generated build-info.json with hash:', buildInfo.buildHash);
2828
}
2929
});
3030

0 commit comments

Comments
 (0)