Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

165
Vistas
console.log displays a strange … triple dot as one character character

I am using xmlbuilder2 and noticed something strange when I console.log the output. The following code will produce a reasonably large xml string but when logged it will remove a large part of the xml from the middle, replacing it with what looks like three dots ... but is actually one character … and repeat that character at the end.

The stranger thing is that when I use VSC's Debug Console to print the output I get the perfectly constructed xml.

const output = doc.end({ prettyPrint: true });
console.log(output);

Example:

<TXLife><MoreTags>5Y10-XA…<FormName><MoreTags></TXLife>…

Any thoughts on why this happens?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Use:

process.stdout.write(output + '\n');

instead.

console.log truncates data that is too long (I'm not sure what the max length of data can be before it truncates.

This happens because console.log uses util.inspect which produces output intended for debugging.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda