File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -250,13 +250,6 @@ export function createConsolaReporter(options: ConsolaReporterOptions = {}): Con
250250 attributes [ 'consola.level' ] = level ;
251251 }
252252
253- // Extra keys on logObj (beyond reserved) indicate direct `reporter.log({ type, message, ...rest })`
254- if ( hasExtraLogObjKeys && args && args . length >= 1 && typeof args [ 0 ] === 'string' ) {
255- // Use first 'string' arg as message
256- _INTERNAL_captureLog ( { level : logSeverityLevel , message : args [ 0 ] , attributes } ) ;
257- return ;
258- }
259-
260253 _INTERNAL_captureLog ( {
261254 level : logSeverityLevel ,
262255 message,
Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ describe('createConsolaReporter', () => {
213213 sentryReporter . log ( {
214214 type : 'log' ,
215215 level : 2 ,
216- args : [ 'obj-message' ] ,
216+ args : [ 'Hello' , 'world' , { some : ' obj' } ] ,
217217 userId : 123 ,
218218 action : 'login' ,
219219 time : '2026-02-24T10:24:04.477Z' ,
@@ -224,7 +224,7 @@ describe('createConsolaReporter', () => {
224224 const call = vi . mocked ( _INTERNAL_captureLog ) . mock . calls [ 0 ] ! [ 0 ] ;
225225
226226 // Message from args
227- expect ( call . message ) . toBe ( 'obj-message ' ) ;
227+ expect ( call . message ) . toBe ( 'Hello world {"some":" obj"} ' ) ;
228228 expect ( call . attributes ) . toMatchObject ( {
229229 'consola.type' : 'log' ,
230230 'consola.level' : 2 ,
You can’t perform that action at this time.
0 commit comments