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

213
Vistas
Save log from chrom console by JavaScript

I am writing a monitoring addon for the website.

Is it possible to get logs and errors from the chrome console by JavaScript?

I tried to override the console log and other functions but it only recorded logs generated by my own code.

I would like to catch logs and errors output by 3rd party lib as well. for example, if I am writing a website using jQuery I would like to collect all logs and errors output by jquery as well.

thanks

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

0

How about trying this? You can modify the global console.log

const overridedConsole = (function(originConsole){
    return {
        log: function(text){
            originConsole.log(text);
            // maybe save?
        },
        info: function (text) {
            originConsole.info(text);
            // maybe save?
        },
        warn: function (text) {
            originConsole.warn(text);
            // maybe save?
        },
        error: function (text) {
            originConsole.error(text);
            // maybe save?
        }
    };
}(window.console));

//Then redefine the old console
window.console = overridedConsole;
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