chore(react-helpers): make log level customisable (#3474)
This commit is contained in:
parent
933878acf5
commit
75cb48a4b9
@ -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) => {
|
||||
|
@ -21,7 +21,7 @@ type ConsoleMethod = {
|
||||
}[keyof Console] &
|
||||
string;
|
||||
|
||||
interface LoggerConf {
|
||||
export interface LoggerConf {
|
||||
application?: string;
|
||||
tags?: string[];
|
||||
logLevel?: LogLevelsType;
|
||||
|
Loading…
Reference in New Issue
Block a user