Base solution for your next web application
Welcome
Spring Sale!
Limited
Time Offer!
XXdays : XXhrs : XXmin : XXsec
Open Closed

Logging client errors #11363


0
uabel created

Is there any way that we can log the client side errors or show them in the popup as well? Here it would be nice if we could see the function incl. exact location and the logged in user. We are using abp 0.7.4

Thanks in advance.


3 Answer(s)
  • 0
    ismcagdas created
    Support Team

    Hi @uabel

    Most of the client side errors are logged with abp.log.log function. abp.log.info and similar functions calls abp.log.log, so you may replace this function to log messages to somewhere else if needed.

    But, note that, still there might be some messages which are not logged by abp.log.log function.

  • 0
    uabel created

    Thank you very much for the answer. Can you then also read out here which call it is? If so, what is the definition for this?

    This is the function, here I try for example to also log the userId: `abp.log.log = function (logObject, logLevel) { if (!window.console || !window.console.log) { return; }

        if (logLevel != undefined && logLevel < abp.log.level) {
            return;
        }
        if (abp.session.userId != null) {
            console.log("UserId: " + abp.session.userId + " " +logObject);
        }
        else
        {
            console.log("UserId: Empty " + logObject);
        }
        
    };`
    
  • 0
    ismcagdas created
    Support Team