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
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
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
Hi,
Yes, this is the correct function https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.Web.Resources/Abp/Framework/scripts/abp.js#L362.
Your implementation seems fine.