Skip to content

Commit

Permalink
refactor(frontend): optimize log helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Mar 10, 2024
1 parent 29e5512 commit d572e38
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/frontend/src/helpers/log.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
/* eslint-disable no-console */
const NAME = `[${import.meta.env.VITE_APP_NAME}@${import.meta.env.VITE_APP_VERSION}]`;

const error = console.error.bind(null, NAME);
const info = console.info.bind(null, NAME);
const warn = console.warn.bind(null, NAME);

export const log = {
error: console.error.bind(null, NAME),
info: console.info.bind(null, NAME),
warn: console.warn.bind(null, NAME),
error,
info,
warn,
};

0 comments on commit d572e38

Please sign in to comment.