chore(react-helpers): make log level customisable (#3474)

This commit is contained in:
Dexter Edwards 2023-04-21 16:29:30 +01:00 committed by GitHub
parent 933878acf5
commit 75cb48a4b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -1,13 +1,11 @@
import { useRef } from 'react';
import { BrowserTracing } from '@sentry/tracing';
import * as Sentry from '@sentry/browser';
import type { LocalLogger } from '@vegaprotocol/utils';
import type { LocalLogger, LoggerConf } from '@vegaprotocol/utils';
import { localLoggerFactory } from '@vegaprotocol/utils';
interface Props {
interface Props extends LoggerConf {
dsn?: string;
application?: string;
tags?: string[];
}
export const useLogger = ({ dsn, ...props }: Props) => {

View File

@ -21,7 +21,7 @@ type ConsoleMethod = {
}[keyof Console] &
string;
interface LoggerConf {
export interface LoggerConf {
application?: string;
tags?: string[];
logLevel?: LogLevelsType;