<linkrel="alternate"type="application/rss+xml"href="/SpotifyAPI-NET/news/rss.xml"title="SpotifyAPI-NET Blog RSS Feed">
<linkrel="alternate"type="application/atom+xml"href="/SpotifyAPI-NET/news/atom.xml"title="SpotifyAPI-NET Blog Atom Feed"><titledata-react-helmet="true">Logging | SpotifyAPI-NET</title><metadata-react-helmet="true"property="og:url"content="https://johnnycrazy.github.io/SpotifyAPI-NET/docs/logging"><metadata-react-helmet="true"name="docusaurus_locale"content="en"><metadata-react-helmet="true"name="docusaurus_version"content="current"><metadata-react-helmet="true"name="docusaurus_tag"content="docs-default-current"><metadata-react-helmet="true"property="og:title"content="Logging | SpotifyAPI-NET"><metadata-react-helmet="true"name="description"content="The library provides a way to inject your own, custom HTTP Logger. By default, no logging is performed."><metadata-react-helmet="true"property="og:description"content="The library provides a way to inject your own, custom HTTP Logger. By default, no logging is performed."><linkdata-react-helmet="true"rel="shortcut icon"href="/SpotifyAPI-NET/img/favicon.ico"><linkdata-react-helmet="true"rel="canonical"href="https://johnnycrazy.github.io/SpotifyAPI-NET/docs/logging"><linkdata-react-helmet="true"rel="alternate"href="https://johnnycrazy.github.io/SpotifyAPI-NET/docs/logging"hreflang="en"><linkdata-react-helmet="true"rel="alternate"href="https://johnnycrazy.github.io/SpotifyAPI-NET/docs/logging"hreflang="x-default"><linkrel="stylesheet"href="/SpotifyAPI-NET/assets/css/styles.fa980c59.css">
</span></div><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain">var spotify = new SpotifyClient(config);</span></div></div></div><buttontype="button"aria-label="Copy code to clipboard"class="copyButton_Ue-o">Copy</button></div></div><p>The <code>IHTTPLogger</code> interface can be found <ahref="https://github.com/JohnnyCrazy/SpotifyAPI-NET/blob/master/SpotifyAPI.Web/Http/Interfaces/IHTTPLogger.cs"target="_blank"rel="noopener noreferrer">here</a>.</p><h2><aaria-hidden="true"tabindex="-1"class="anchor enhancedAnchor_2LWZ"id="simpleconsolehttplogger"></a>SimpleConsoleHTTPLogger<aclass="hash-link"href="#simpleconsolehttplogger"title="Direct link to heading">#</a></h2><p>The library ships with a simple console-based logger.</p><divclass="codeBlockContainer_K1bP"><divclass="codeBlockContent_hGly csharp"><divtabindex="0"class="prism-code language-csharp codeBlock_23N8 thin-scrollbar"><divclass="codeBlockLines_39YC"style="color:#bfc7d5;background-color:#292d3e"><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain">var config = SpotifyClientConfig</span></div><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain"> .CreateDefault("YourAccessToken")</span></div><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain"> .WithHTTPLogger(new SimpleConsoleHTTPLogger());</span></div><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain"style="display:inline-block">
</span></div><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain">var spotify = new SpotifyClient(config);</span></div></div></div><buttontype="button"aria-label="Copy code to clipboard"class="copyButton_Ue-o">Copy</button></div></div><p>This logger produces a simple console output for debugging purposes:</p><divclass="codeBlockContainer_K1bP"><divclass="codeBlockContent_hGly text"><divtabindex="0"class="prism-code language-text codeBlock_23N8 thin-scrollbar"><divclass="codeBlockLines_39YC"style="color:#bfc7d5;background-color:#292d3e"><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain">GET tracks/NotAnid []</span></div><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain">--> BadRequest application/json { "error" : { "status" : 400, "message" : "</span></div><divclass="token-line"style="color:#bfc7d5"><spanclass="token plain"style="display:inline-block">