\begin{quote}
{\itshape Don\textquotesingle{}t debug with logs alone -\/ check out \href{https://httptoolkit.tech/javascript}{\texttt{ HTTP Toolkit}}\+: beautiful, powerful \& open-\/source tools for building, testing \& debugging HTTP(\+S)} \end{quote}
Minimal lightweight simple logging for Java\+Script. loglevel replaces console.\+log() and friends with level-\/based logging and filtering, with none of console\textquotesingle{}s downsides.

This is a barebones reliable everyday logging library. It does not do fancy things, it does not let you reconfigure appenders or add complex log filtering rules or boil tea (more\textquotesingle{}s the pity), but it does have the all core functionality that you actually use\+:\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16278}{}\doxysection{Features}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16278}
\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16279}{}\doxysubsection{Simple}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16279}

\begin{DoxyItemize}
\item Log things at a given level (trace/debug/info/warn/error) to the console object (as seen in all modern browsers \& node.\+js)
\item Filter logging by level (all the above or \textquotesingle{}silent\textquotesingle{}), so you can disable all but error logging in production, and then run log.\+set\+Level(\char`\"{}trace\char`\"{}) in your console to turn it all back on for a furious debugging session
\item Single file, no dependencies, weighs in at 1.\+1\+KB minified and gzipped
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16280}{}\doxysubsection{Effective}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16280}

\begin{DoxyItemize}
\item Log methods gracefully fall back to simpler console logging methods if more specific ones aren\textquotesingle{}t available\+: so calls to log.\+debug() go to console.\+debug() if possible, or console.\+log() if not
\item Logging calls still succeed even if there\textquotesingle{}s no console object at all, so your site doesn\textquotesingle{}t break when people visit with old browsers that don\textquotesingle{}t support the console object (here\textquotesingle{}s looking at you IE) and similar
\item This then comes together giving a consistent reliable API that works in every Java\+Script environment with a console available, and never breaks anything anywhere else
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16281}{}\doxysubsection{Convenient}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16281}

\begin{DoxyItemize}
\item Log output keeps line numbers\+: most JS logging frameworks call console.\+log methods through wrapper functions, clobbering your stacktrace and making the extra info many browsers provide useless. We\textquotesingle{}ll have none of that thanks.
\item It works with all the standard Java\+Script loading systems out of the box (Common\+JS, AMD, or just as a global)
\item Logging is filtered to \char`\"{}warn\char`\"{} level by default, to keep your live site clean in normal usage (or you can trivially re-\/enable everything with an initial log.\+enable\+All() call)
\item Magically handles situations where console logging is not initially available (IE8/9), and automatically enables logging as soon as it does become available (when developer console is opened)
\item Type\+Script type definitions included, so no need for extra {\ttfamily @types} packages
\item Extensible, to add other log redirection, filtering, or formatting functionality, while keeping all the above (except you will clobber your stacktrace, see Plugins below)
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16282}{}\doxysection{Downloading loglevel}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16282}
If you\textquotesingle{}re using NPM, you can just run {\ttfamily npm install loglevel}.

Alternatively, loglevel is also available via \href{https://github.com/bower/bower}{\texttt{ Bower}} ({\ttfamily bower install loglevel}), as a \href{http://www.webjars.org/}{\texttt{ Webjar}}, or an \href{https://atmospherejs.com/spacejamio/loglevel}{\texttt{ Atmosphere package}} (for Meteor)

Alternatively if you just want to grab the file yourself, you can download either the current stable \href{https://raw.github.com/pimterry/loglevel/master/dist/loglevel.min.js}{\texttt{ production version}} or the \href{https://raw.github.com/pimterry/loglevel/master/dist/loglevel.js}{\texttt{ development version}} directly, or reference it remotely on unpkg at \href{https://unpkg.com/loglevel/dist/loglevel.min.js}{\texttt{ {\ttfamily https\+://unpkg.\+com/loglevel/dist/loglevel.\+min.\+js}}} (this will redirect to a latest version, use the resulting redirected URL if you want to pin that version).

Finally, if you want to tweak loglevel to your own needs or you immediately need the cutting-\/edge version, clone this repo and see \href{\#developing--contributing}{\texttt{ Developing \& Contributing}} below for build instructions.\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16283}{}\doxysection{Setting it up}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16283}
loglevel supports AMD (e.\+g. Require\+JS), Common\+JS (e.\+g. Node.\+js) and direct usage (e.\+g. loading globally with a $<$script$>$ tag) loading methods. You should be able to do nearly anything, and then skip to the next section anyway and have it work. Just in case though, here\textquotesingle{}s some specific examples that definitely do the right thing\+:\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16284}{}\doxysubsection{Commons\+JS (e.\+g. Node)}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16284}

\begin{DoxyCode}{0}
\DoxyCodeLine{var log = require('loglevel');}
\DoxyCodeLine{log.warn("{}unreasonably simple"{}); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16285}{}\doxysubsection{AMD (e.\+g. Require\+JS)}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16285}

\begin{DoxyCode}{0}
\DoxyCodeLine{define(['loglevel'], function(log) \{}
\DoxyCodeLine{   log.warn("{}dangerously convenient"{});}
\DoxyCodeLine{\}); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16286}{}\doxysubsection{Directly in your web page\+:}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16286}

\begin{DoxyCode}{0}
\DoxyCodeLine{<script src="{}loglevel.min.js"{}></script>}
\DoxyCodeLine{<script>}
\DoxyCodeLine{log.warn("{}too easy"{});}
\DoxyCodeLine{</script> }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16287}{}\doxysubsection{As an ES6 module\+:}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16287}
loglevel is written as a UMD module, with a single object exported. Unfortunately ES6 module loaders \& transpilers don\textquotesingle{}t all handle this the same way. Some will treat the object as the default export, while others use it as the root exported object. In addition, loglevel includes {\ttfamily default} property on the root object, designed to help handle this differences. Nonetheless, there\textquotesingle{}s two possible syntaxes that might work for you\+:

For most tools, using the default import is the most convenient and flexible option\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{import log from 'loglevel';}
\DoxyCodeLine{log.warn("{}module-\/tastic"{}); }

\end{DoxyCode}


For some tools though, it might better to wildcard import the whole object\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{import * as log from 'loglevel';}
\DoxyCodeLine{log.warn("{}module-\/tastic"{}); }

\end{DoxyCode}


There\textquotesingle{}s no major difference, unless you\textquotesingle{}re using Type\+Script \& building a loglevel plugin (in that case, see \href{https://github.com/pimterry/loglevel/issues/149}{\texttt{ https\+://github.\+com/pimterry/loglevel/issues/149}}). In general though, just use whichever suits your environment, and everything should work out fine.\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16288}{}\doxysubsection{With no\+Conflict()\+:}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16288}
If you\textquotesingle{}re using another Java\+Script library that exposes a \textquotesingle{}log\textquotesingle{} global, you can run into conflicts with loglevel. Similarly to j\+Query, you can solve this by putting loglevel into no-\/conflict mode immediately after it is loaded onto the page. This resets to \textquotesingle{}log\textquotesingle{} global to its value before loglevel was loaded (typically {\ttfamily undefined}), and returns the loglevel object, which you can then bind to another name yourself.

For example\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{<script src="{}loglevel.min.js"{}></script>}
\DoxyCodeLine{<script>}
\DoxyCodeLine{var logging = log.noConflict();}
\DoxyCodeLine{}
\DoxyCodeLine{logging.warn("{}still pretty easy"{});}
\DoxyCodeLine{</script> }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16289}{}\doxysubsection{Type\+Script\+:}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16289}
loglevel includes its own type definitions, assuming you\textquotesingle{}re using a modern module environment (e.\+g. Node.\+JS, webpack, etc), you should be able to use the ES6 syntax above, and everything will work immediately. If not, file a bug!

If you really want to use Log\+Level as a global however, but from Type\+Script, you\textquotesingle{}ll need to declare it as such first. To do that\+:


\begin{DoxyItemize}
\item Create a {\ttfamily loglevel.\+d.\+ts} file
\item Ensure that file is included in your build (e.\+g. add it to {\ttfamily include} in your tsconfig, pass it on the command line, or use {\ttfamily ///$<$reference path=\char`\"{}./loglevel.\+d.\+ts\char`\"{} /$>$})
\item In that file, add\+: 
\begin{DoxyCode}{0}
\DoxyCodeLine{import * as log from 'loglevel';}
\DoxyCodeLine{export as namespace log;}
\DoxyCodeLine{export = log;}

\end{DoxyCode}

\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16290}{}\doxysection{Documentation}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16290}
The loglevel API is extremely minimal. All methods are available on the root loglevel object, which it\textquotesingle{}s suggested you name \textquotesingle{}log\textquotesingle{} (this is the default if you import it in globally, and is what\textquotesingle{}s set up in the above examples). The API consists of\+:


\begin{DoxyItemize}
\item 5 actual logging methods, ordered and available as\+:
\begin{DoxyItemize}
\item {\ttfamily log.\+trace(msg)}
\item {\ttfamily log.\+debug(msg)}
\item {\ttfamily log.\+info(msg)}
\item {\ttfamily log.\+warn(msg)}
\item {\ttfamily log.\+error(msg)}
\end{DoxyItemize}

{\ttfamily log.\+log(msg)} is also available, as an alias for {\ttfamily log.\+debug(msg)}, to improve compatibility with {\ttfamily console}, and make migration easier.

Exact output formatting of these will depend on the console available in the current context of your application. For example, many environments will include a full stack trace with all trace() calls, and icons or similar to highlight other calls.

These methods should never fail in any environment, even if no console object is currently available, and should always fall back to an available log method even if the specific method called (e.\+g. warn) isn\textquotesingle{}t available.

Be aware that all this means that these method won\textquotesingle{}t necessarily always produce exactly the output you expect in every environment; loglevel only guarantees that these methods will never explode on you, and that it will call the most relevant method it can find, with your argument. For example, {\ttfamily log.\+trace(msg)} in Firefox before version 64 prints the stacktrace by itself, and doesn\textquotesingle{}t include your message (see \href{https://github.com/pimterry/loglevel/issues/84}{\texttt{ \#84}}).
\item A {\ttfamily log.\+set\+Level(level, \mbox{[}persist\mbox{]})} method.

This disables all logging below the given level, so that after a log.\+set\+Level(\char`\"{}warn\char`\"{}) call log.\+warn(\char`\"{}something\char`\"{}) or log.\+error(\char`\"{}something\char`\"{}) will output messages, but log.\+info(\char`\"{}something\char`\"{}) will not.

This can take either a log level name or \textquotesingle{}silent\textquotesingle{} (which disables everything) in one of a few forms\+:
\begin{DoxyItemize}
\item As a log level from the internal levels list, e.\+g. log.\+levels.\+SILENT ← {\itshape for type safety}
\item As a string, like \textquotesingle{}error\textquotesingle{} (case-\/insensitive) ← {\itshape for a reasonable practical balance}
\item As a numeric index from 0 (trace) to 5 (silent) ← {\itshape deliciously terse, and more easily programmable (...although, why?)}
\end{DoxyItemize}

Where possible the log level will be persisted. Local\+Storage will be used if available, falling back to cookies if not. If neither is available in the current environment (i.\+e. in Node), or if you pass {\ttfamily false} as the optional \textquotesingle{}persist\textquotesingle{} second argument, persistence will be skipped.

If log.\+set\+Level() is called when a console object is not available (in IE 8 or 9 before the developer tools have been opened, for example) logging will remain silent until the console becomes available, and then begin logging at the requested level.
\item A {\ttfamily log.\+set\+Default\+Level(level)} method.

This sets the current log level only if one has not been persisted and can’t be loaded. This is useful when initializing scripts; if a developer or user has previously called {\ttfamily set\+Level()}, this won’t alter their settings. For example, your application might set the log level to {\ttfamily error} in a production environment, but when debugging an issue, you might call {\ttfamily set\+Level(\char`\"{}trace\char`\"{})} on the console to see all the logs. If that {\ttfamily error} setting was set using {\ttfamily set\+Default\+Level()}, it will still stay as {\ttfamily trace} on subsequent page loads and refreshes instead of resetting to {\ttfamily error}.

The {\ttfamily level} argument takes is the same values that you might pass to {\ttfamily set\+Level()}. Levels set using {\ttfamily set\+Default\+Level()} never persist to subsequent page loads.
\item {\ttfamily log.\+enable\+All()} and {\ttfamily log.\+disable\+All()} methods.

These enable or disable all log messages, and are equivalent to log.\+set\+Level(\char`\"{}trace\char`\"{}) and log.\+set\+Level(\char`\"{}silent\char`\"{}) respectively.
\item A {\ttfamily log.\+get\+Level()} method.

Returns the current logging level, as a number from 0 (trace) to 5 (silent)

It\textquotesingle{}s very unlikely you\textquotesingle{}ll need to use this for normal application logging; it\textquotesingle{}s provided partly to help plugin development, and partly to let you optimize logging code as below, where debug data is only generated if the level is set such that it\textquotesingle{}ll actually be logged. This probably doesn\textquotesingle{}t affect you, unless you\textquotesingle{}ve run profiling on your code and you have hard numbers telling you that your log data generation is a real performance problem.
\end{DoxyItemize}


\begin{DoxyCode}{0}
\DoxyCodeLine{if (log.getLevel() <= log.levels.DEBUG) \{}
\DoxyCodeLine{  var logData = runExpensiveDataGeneration();}
\DoxyCodeLine{  log.debug(logData);}
\DoxyCodeLine{\}}

\end{DoxyCode}


This notably isn\textquotesingle{}t the right solution to avoid the cost of string concatenation in your logging. Firstly, it\textquotesingle{}s very unlikely that string concatenation in your logging is really an important performance problem. Even if you do genuinely have hard metrics showing that it is though, the better solution that wrapping your log statements in this is to use multiple arguments, as below. The underlying console API will automatically concatenate these for you if logging is enabled, and if it isn\textquotesingle{}t then all log methods are no-\/ops, and no concatenation will be done at all.


\begin{DoxyCode}{0}
\DoxyCodeLine{// Prints 'My concatenated log message'}
\DoxyCodeLine{log.debug("{}My "{}, "{}concatenated "{}, "{}log message"{});}

\end{DoxyCode}



\begin{DoxyItemize}
\item A {\ttfamily log.\+get\+Logger(logger\+Name)} method.

This gets you a new logger object that works exactly like the root {\ttfamily log} object, but can have its level and logging methods set independently. All loggers must have a name (which is a non-\/empty string, or a \href{https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol}{\texttt{ Symbol}}). Calling {\ttfamily get\+Logger()} multiple times with the same name will return an identical logger object.

In large applications, it can be incredibly useful to turn logging on and off for particular modules as you are working with them. Using the {\ttfamily get\+Logger()} method lets you create a separate logger for each part of your application with its own logging level.

Likewise, for small, independent modules, using a named logger instead of the default root logger allows developers using your module to selectively turn on deep, trace-\/level logging when trying to debug problems, while logging only errors or silencing logging altogether under normal circumstances.

Example usage $\ast$(using Common\+JS modules, but you could do the same with any module system)\+:$\ast$
\end{DoxyItemize}


\begin{DoxyCode}{0}
\DoxyCodeLine{// In module-\/one.js:}
\DoxyCodeLine{var log = require("{}loglevel"{}).getLogger("{}module-\/one"{});}
\DoxyCodeLine{function doSomethingAmazing() \{}
\DoxyCodeLine{  log.debug("{}Amazing message from module one."{});}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{// In module-\/two.js:}
\DoxyCodeLine{var log = require("{}loglevel"{}).getLogger("{}module-\/two"{});}
\DoxyCodeLine{function doSomethingSpecial() \{}
\DoxyCodeLine{  log.debug("{}Special message from module two."{});}
\DoxyCodeLine{\}}
\DoxyCodeLine{}
\DoxyCodeLine{// In your main application module:}
\DoxyCodeLine{var log = require("{}loglevel"{});}
\DoxyCodeLine{var moduleOne = require("{}module-\/one"{});}
\DoxyCodeLine{var moduleTwo = require("{}module-\/two"{});}
\DoxyCodeLine{log.getLogger("{}module-\/two"{}).setLevel("{}TRACE"{});}
\DoxyCodeLine{}
\DoxyCodeLine{moduleOne.doSomethingAmazing();}
\DoxyCodeLine{moduleTwo.doSomethingSpecial();}
\DoxyCodeLine{// logs "{}Special message from module two."{}}
\DoxyCodeLine{// (but nothing from module one.)}

\end{DoxyCode}


Loggers returned by {\ttfamily get\+Logger()} support all the same properties and methods as the default root logger, excepting {\ttfamily no\+Conflict()} and the {\ttfamily get\+Logger()} method itself.

Like the root logger, other loggers can have their logging level saved. If a logger’s level has not been saved, it will inherit the root logger’s level when it is first created. If the root logger’s level changes later, the new level will not affect other loggers that have already been created. Loggers with Symbol names (rather than string names) will be always considered as unique instances, and will never have their logging level saved or restored.

Likewise, loggers will inherit the root logger’s {\ttfamily method\+Factory}. After creation, each logger can have its {\ttfamily method\+Factory} independently set. See the {\itshape plugins} section below for more about {\ttfamily method\+Factory}.


\begin{DoxyItemize}
\item A {\ttfamily log.\+get\+Loggers()} method.

This will return you the dictionary of all loggers created with {\ttfamily get\+Logger}, keyed off of their names.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16291}{}\doxysection{Plugins}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16291}
\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16292}{}\doxysubsection{Existing plugins\+:}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16292}
\href{https://github.com/kutuluk/loglevel-plugin-prefix}{\texttt{ loglevel-\/plugin-\/prefix}} -\/ plugin for loglevel message prefixing.

\href{https://github.com/kutuluk/loglevel-plugin-remote}{\texttt{ loglevel-\/plugin-\/remote}} -\/ plugin for sending loglevel messages to a remote log server.

Server\+Send -\/ \href{https://github.com/artemyarulin/loglevel-serverSend}{\texttt{ https\+://github.\+com/artemyarulin/loglevel-\/server\+Send}} -\/ Forward your log messages to a remote server.

DEBUG -\/ \href{https://github.com/vectrlabs/loglevel-debug}{\texttt{ https\+://github.\+com/vectrlabs/loglevel-\/debug}} -\/ Control logging from a DEBUG environmental variable (similar to the classic \href{https://github.com/visionmedia/debug}{\texttt{ Debug}} module)\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16293}{}\doxysubsection{Writing plugins\+:}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16293}
Loglevel provides a simple reliable minimal base for console logging that works everywhere. This means it doesn\textquotesingle{}t include lots of fancy functionality that might be useful in some cases, such as log formatting and redirection (e.\+g. also sending log messages to a server over AJAX)

Including that would increase the size and complexity of the library, but more importantly would remove stacktrace information. Currently log methods are either disabled, or enabled with directly bound versions of the console.\+log methods (where possible). This means your browser shows the log message as coming from your code at the call to {\ttfamily log.\+info(\char`\"{}message!\char`\"{})} not from within loglevel, since it really calls the bound console method directly, without indirection. The indirection required to dynamically format, further filter, or redirect log messages would stop this.

There\textquotesingle{}s clearly enough enthusiasm for this even at that cost though that loglevel now includes a plugin API. To use it, redefine log.\+method\+Factory(method\+Name, log\+Level, logger\+Name) with a function of your own. This will be called for each enabled method each time the level is set (including initially), and should return a function to be used for the given log method, at the given level, for a logger with the given name. If you\textquotesingle{}d like to retain all the reliability and features of loglevel, it\textquotesingle{}s recommended that this wraps the initially provided value of {\ttfamily log.\+method\+Factory}

For example, a plugin to prefix all log messages with \char`\"{}\+Newsflash\+: \char`\"{} would look like\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{var originalFactory = log.methodFactory;}
\DoxyCodeLine{log.methodFactory = function (methodName, logLevel, loggerName) \{}
\DoxyCodeLine{    var rawMethod = originalFactory(methodName, logLevel, loggerName);}
\DoxyCodeLine{}
\DoxyCodeLine{    return function (message) \{}
\DoxyCodeLine{        rawMethod("{}Newsflash: "{} + message);}
\DoxyCodeLine{    \};}
\DoxyCodeLine{\};}
\DoxyCodeLine{log.setLevel(log.getLevel()); // Be sure to call setLevel method in order to apply plugin }

\end{DoxyCode}


$\ast$(The above supports only a single log.\+warn(\char`\"{}\char`\"{}) argument for clarity, but it\textquotesingle{}s easy to extend to a \href{http://jsbin.com/xehoye/edit?html,console}{\texttt{ fuller variadic version}})$\ast$

If you develop and release a plugin, please get in contact! I\textquotesingle{}d be happy to reference it here for future users. Some consistency is helpful; naming your plugin \textquotesingle{}loglevel-\/\+PLUGINNAME\textquotesingle{} (e.\+g. loglevel-\/newsflash) is preferred, as is giving it the \textquotesingle{}loglevel-\/plugin\textquotesingle{} keyword in your package.\+json\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16294}{}\doxysection{Developing \& Contributing}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16294}
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality.

Builds can be run with npm\+: run {\ttfamily npm run dist} to build a distributable version of the project (in /dist), or {\ttfamily npm test} to just run the tests and linting. During development you can run {\ttfamily npm run watch} and it will monitor source files, and rerun the tests and linting as appropriate when they\textquotesingle{}re changed.

{\itshape Also, please don\textquotesingle{}t manually edit files in the \char`\"{}dist\char`\"{} subdirectory as they are generated via Grunt. You\textquotesingle{}ll find source code in the \char`\"{}lib\char`\"{} subdirectory!}\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16295}{}\doxysubsubsection{Release process}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16295}
To do a release of loglevel\+:


\begin{DoxyItemize}
\item Update the version number in package.\+json and bower.\+json
\item Run {\ttfamily npm run dist} to build a distributable version in dist/
\item Update the release history in this file (below)
\item Commit the built code, tagging it with the version number and a brief message about the release
\item Push to Github
\item Run {\ttfamily npm publish .} to publish to NPM
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16296}{}\doxysection{Release History}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16296}
v0.\+1.\+0 -\/ First working release with apparent compatibility with everything tested

v0.\+2.\+0 -\/ Updated release with various tweaks and polish and real proper documentation attached

v0.\+3.\+0 -\/ Some bugfixes (\#12, \#14), cookie-\/based log level persistence, doc tweaks, support for Bower and Jam\+JS

v0.\+3.\+1 -\/ Fixed incorrect text in release build banner, various other minor tweaks

v0.\+4.\+0 -\/ Use Local\+Storage for level persistence if available, compatibility improvements for IE, improved error messages, multi-\/environment tests

v0.\+5.\+0 -\/ Fix for Modernizr+\+IE8 issues, improved set\+Level error handling, support for auto-\/activation of desired logging when console eventually turns up in IE8

v0.\+6.\+0 -\/ Handle logging in Safari private browsing mode (\#33), fix TRACE level persistence bug (\#35), plus various minor tweaks

v1.\+0.\+0 -\/ Official stable release! Fixed a bug with local\+Storage in Android webviews, improved Common\+JS detection, and added no\+Conflict().

v1.\+1.\+0 -\/ Added support for including loglevel with preprocessing and .apply() (\#50), and fixed QUnit dep version which made tests potentially unstable.

v1.\+2.\+0 -\/ New plugin API! Plus various bits of refactoring and tidy up, nicely simplifying things and trimming the size down.

v1.\+3.\+0 -\/ Make persistence optional in set\+Level, plus lots of documentation updates and other small tweaks

v1.\+3.\+1 -\/ With the new optional persistence, stop unnecessarily persisting the initially set default level (warn)

v1.\+4.\+0 -\/ Add get\+Level(), set\+Default\+Level() and get\+Logger() functionality for more fine-\/grained log level control

v1.\+4.\+1 -\/ Reorder UMD (\#92) to improve bundling tool compatibility

v1.\+5.\+0 -\/ Fix log.\+debug (\#111) after V8 changes deprecating console.\+debug, check for {\ttfamily window} upfront (\#104), and add {\ttfamily .log} alias for {\ttfamily .debug} (\#64)

v1.\+5.\+1 -\/ Fix bug (\#112) in level-\/persistence cookie fallback, which failed if it wasn\textquotesingle{}t the first cookie present

v1.\+6.\+0 -\/ Add a name property to loggers and add log.\+get\+Loggers() (\#114), and recommend unpkg as CDN instead of CDNJS.

v1.\+6.\+1 -\/ Various small documentation \& test updates

v1.\+6.\+2 -\/ Include Type\+Script type definitions in the package itself

v1.\+6.\+3 -\/ Avoid Type\+Script type conflicts with other global {\ttfamily log} types (e.\+g. {\ttfamily core-\/js})

v1.\+6.\+4 -\/ Ensure package.\+json\textquotesingle{}s \textquotesingle{}main\textquotesingle{} is a fully qualified path, to fix webpack issues

v1.\+6.\+5 -\/ Ensure the provided message is included when calling trace() in IE11

v1.\+6.\+6 -\/ Fix bugs in v1.\+6.\+5, which caused issues in node.\+js \& IE $<$ 9

v1.\+6.\+7 -\/ Fix a bug in environments with {\ttfamily window} defined but no {\ttfamily window.\+navigator}

v1.\+6.\+8 -\/ Update Type\+Script type definitions to include {\ttfamily log.\+log()}.

v1.\+7.\+0 -\/ Add support for Symbol-\/named loggers, and a {\ttfamily .default} property to help with ES6 module usage.\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16297}{}\doxysection{$<$tt$>$loglevel$<$/tt$>$ for enterprise}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16297}
Available as part of the Tidelift Subscription.

The maintainers of {\ttfamily loglevel} and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. \href{https://tidelift.com/subscription/pkg/npm-loglevel?utm_source=npm-loglevel&utm_medium=referral&utm_campaign=enterprise&utm_term=repo}{\texttt{ Learn more.}}\hypertarget{md_sfcode_node_modules_loglevel_README_autotoc_md16298}{}\doxysection{License}\label{md_sfcode_node_modules_loglevel_README_autotoc_md16298}
Copyright (c) 2013 Tim Perry Licensed under the MIT license. 