Suggestion #5 – Utilize diagnostics.asmx web service for the client
It turns out that SharePoint has a /_vti_bin/diagnostics.asmx web
service. It has only one method which performs log writing to the ULS
with “SharePoint Foundation -> Unified Logging Service” category and
web service could be the only way to perform logging which could be
accessible by developers or administrators. Other options are quite
hard to implement.
SharePoint has lots of Java Script libraries, and it also has
functions such as ULSOnError(msg, url, line) and ULSSendException(ex).
One does not simple call these functions, so you just need to include
additional call ULS.enable with “true” value. Otherwise, you will not
get anything at all.
ULS.enable = true;
ULSOnError("Hello trace", document.location.href, 0);