@@ -3,24 +3,6 @@ import { DEBUG_BUILD } from '../debug-build';
3
3
import type { ConsoleLevel } from '../types-hoist/instrument' ;
4
4
import { GLOBAL_OBJ } from './worldwide' ;
5
5
6
- /**
7
- * A Sentry Logger instance.
8
- *
9
- * @deprecated Use {@link debug} instead with the {@link SentryDebugLogger} type.
10
- */
11
- export interface Logger {
12
- disable ( ) : void ;
13
- enable ( ) : void ;
14
- isEnabled ( ) : boolean ;
15
- log ( ...args : Parameters < typeof console . log > ) : void ;
16
- info ( ...args : Parameters < typeof console . info > ) : void ;
17
- warn ( ...args : Parameters < typeof console . warn > ) : void ;
18
- error ( ...args : Parameters < typeof console . error > ) : void ;
19
- debug ( ...args : Parameters < typeof console . debug > ) : void ;
20
- assert ( ...args : Parameters < typeof console . assert > ) : void ;
21
- trace ( ...args : Parameters < typeof console . trace > ) : void ;
22
- }
23
-
24
6
export interface SentryDebugLogger {
25
7
disable ( ) : void ;
26
8
enable ( ) : void ;
@@ -115,18 +97,6 @@ function error(...args: Parameters<typeof console.error>): void {
115
97
_maybeLog ( 'error' , ...args ) ;
116
98
}
117
99
118
- function _debug ( ...args : Parameters < typeof console . debug > ) : void {
119
- _maybeLog ( 'debug' , ...args ) ;
120
- }
121
-
122
- function assert ( ...args : Parameters < typeof console . assert > ) : void {
123
- _maybeLog ( 'assert' , ...args ) ;
124
- }
125
-
126
- function trace ( ...args : Parameters < typeof console . trace > ) : void {
127
- _maybeLog ( 'trace' , ...args ) ;
128
- }
129
-
130
100
function _maybeLog ( level : ConsoleLevel , ...args : Parameters < ( typeof console ) [ typeof level ] > ) : void {
131
101
if ( ! DEBUG_BUILD ) {
132
102
return ;
@@ -147,36 +117,6 @@ function _getLoggerSettings(): { enabled: boolean } {
147
117
return getGlobalSingleton ( 'loggerSettings' , ( ) => ( { enabled : false } ) ) ;
148
118
}
149
119
150
- /**
151
- * This is a logger singleton which either logs things or no-ops if logging is not enabled.
152
- * The logger is a singleton on the carrier, to ensure that a consistent logger is used throughout the SDK.
153
- *
154
- * @deprecated Use {@link debug} instead.
155
- */
156
- export const logger = {
157
- /** Enable logging. */
158
- enable,
159
- /** Disable logging. */
160
- disable,
161
- /** Check if logging is enabled. */
162
- isEnabled,
163
- /** Log a message. */
164
- log,
165
- /** Log level info */
166
- info,
167
- /** Log a warning. */
168
- warn,
169
- /** Log an error. */
170
- error,
171
- /** Log a debug message. */
172
- debug : _debug ,
173
- /** Log an assertion. */
174
- assert,
175
- /** Log a trace. */
176
- trace,
177
- // eslint-disable-next-line deprecation/deprecation
178
- } satisfies Logger ;
179
-
180
120
/**
181
121
* This is a logger singleton which either logs things or no-ops if logging is not enabled.
182
122
*/
0 commit comments