File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -243,13 +243,6 @@ export function createConsolaReporter(options: ConsolaReporterOptions = {}): Con
243243 attributes [ 'consola.level' ] = level ;
244244 }
245245
246- // Extra keys on logObj (beyond reserved) indicate direct `reporter.log({ type, message, ...rest })`
247- if ( hasExtraLogObjKeys && args && args . length >= 1 && typeof args [ 0 ] === 'string' ) {
248- // Use first 'string' arg as message
249- _INTERNAL_captureLog ( { level : logSeverityLevel , message : args [ 0 ] , attributes } ) ;
250- return ;
251- }
252-
253246 _INTERNAL_captureLog ( {
254247 level : logSeverityLevel ,
255248 message,
Original file line number Diff line number Diff line change @@ -315,7 +315,7 @@ describe('createConsolaReporter', () => {
315315 sentryReporter . log ( {
316316 type : 'log' ,
317317 level : 2 ,
318- args : [ 'obj-message' ] ,
318+ args : [ 'Hello' , 'world' , { some : ' obj' } ] ,
319319 userId : 123 ,
320320 action : 'login' ,
321321 time : '2026-02-24T10:24:04.477Z' ,
@@ -326,7 +326,7 @@ describe('createConsolaReporter', () => {
326326 const call = vi . mocked ( _INTERNAL_captureLog ) . mock . calls [ 0 ] ! [ 0 ] ;
327327
328328 // Message from args
329- expect ( call . message ) . toBe ( 'obj-message ' ) ;
329+ expect ( call . message ) . toBe ( 'Hello world {"some":" obj"} ' ) ;
330330 expect ( call . attributes ) . toMatchObject ( {
331331 'consola.type' : 'log' ,
332332 'consola.level' : 2 ,
You can’t perform that action at this time.
0 commit comments