Skip to content

Commit

Permalink
update logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Grunet authored May 25, 2024
1 parent 7227684 commit d9f07e6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,17 @@ class DenoProvider implements Provider {
| undefined;

async initialize?(_context?: EvaluationContext | undefined): Promise<void> {
try {
const kvJson = await this.#kv.get([FEATURE_FLAGS_KEY]);
const kvJson = await this.#kv.get([FEATURE_FLAGS_KEY]);

try {
this.#saveFlagDefinitions(kvJson.value);
this.#watchFlagDefinitions();
} catch (error) {
// No-op in case something went wrong (e.g. the flags definition file not being parseable)
// FlagdCore should default to returning default values if this happens
console.error(error);
console.log("Old flag definitions:", this.#flagDefinitions);
console.log("New flag definitions:", kvJson.value);
}
}

Expand Down

0 comments on commit d9f07e6

Please sign in to comment.