Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I see that label in most SharePoint JavaScript libraries. I am curious - what's that used for?

Example:

EnsureScriptFunc("clienttemplates.js", "RenderUserFieldWorker", function () {
    ULS2Vv:; // <-- THIS IS THE LABEL IN QUESTION
    var renderCtx = new ContextInfo();
    renderCtx.Templates = {};
...
}
share|improve this question
2  
I had a similar question: structure of sharepoint javascript functions. There is even a similar question and a detailed answer on stackoverflow –  Anatoly Mironov Jul 16 '13 at 19:26
    
@AnatolyMironov +1 for the reference to my stackoverflow answer ;-) –  Paul Lucas Jul 17 '13 at 3:25

1 Answer 1

up vote 4 down vote accepted

It is used to leverage the ULS (Unified Logging Service) capabilities. If you go look in the hive and open any of the *.js files, you'll find a similar declaration at the beginning of the file. Each file uses a slightly different declaration, but they all begin with ULS.

For example, in SP 2010 SP.debug.js this is ULS5vl and is declared:

function ULS5Vl() {
    var o=new Object;
    o.ULSTeamName="Microsoft SharePoint Foundation";
    o.ULSFileName="SP.debug.js";
    return o;
}

The label ULS5vl:; throughout the file at the beginning of each function is used to provide trace information.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.