🛡️ Improve logging format for feature flag and protected route navigation

This commit is contained in:
2026-01-29 02:07:03 +00:00
parent fcfc4215e0
commit 7b5b80d1d1
2 changed files with 51 additions and 2 deletions

View File

@@ -25,7 +25,9 @@ export function setupAuthGuards(router) {
if (to.meta.featureFlag) {
const flagEnabled = isEnabled.value(to.meta.featureFlag);
if (!flagEnabled) {
console.warn(`[Router] Feature flag "${to.meta.featureFlag}" is disabled`);
console.warn(
`[Router] Feature flag "${to.meta.featureFlag}" is disabled`
);
next({ name: 'Home', replace: true });
return;
}
@@ -53,7 +55,9 @@ export function setupAuthGuards(router) {
console.log(`[Auth] Navigated to protected route: ${to.path}`);
}
if (to.meta.featureFlag) {
console.log(`[FeatureFlag] Navigated to flagged route: ${to.path} (flag: ${to.meta.featureFlag})`);
console.log(
`[FeatureFlag] Navigated to flagged route: ${to.path} (flag: ${to.meta.featureFlag})`
);
}
});
}