Skip to content

Add an option to hide the console logs from deno_kv_store #41

Description

@zeachco

From beta-0.3.0 deno/x

slightly annoying console.log("RRRR", RRRR); and other log points for the consumer

proposition (or complete removal)

// fresh.config.ts
export default defineConfig({
  plugins: [
    getDenoKvSessionPlugin("/", {
      logLevel: 'log',
      client: store,
      cookieOptions: { secure: true },
    }),
  ],
});

Other values could be

export interface DenoKvFreshSessionOptions extends FreshSessionBaseOptions {
  client: Deno.Kv;
  logLevel: "log" | "debug" | "warning" | "off" ;
  keyPrefix?: string;
  baseKeyPath?: string[];
}

Default set to "log" to avoid a major bump but I would recommend a default to "off" or "warning" in general

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions