Home / CSE / Javascript - CS :: Discussion

Discussion :: Javascript - CS

  1. What is the significance of the JavaScript logging library loglevel?

  2. A.

     Lightweight

    B.

     Unreliable

    C.

     Minimal usage

    D.

     Inconvenient

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    loglevel is a lightweight, minimal and convenient JavaScript logging library which provides a reliable and extremely easy-to-use layer over the various console.log() methods that are often available, with none of their downsides. loglevel makes these methods safe to use by gracefully handling the cases where they don’t exist, and also lets you filter the output of these, to only show messages at warn level or above, for example. This level is persisted in cookies (if available, safely handling non-browser environments too). loglevel doesn’t try and go beyond this, instead just sticking to the core fundamentals of logging with no frills.


Be The First To Comment