# Summary

Class: | WireMock.Logging.WireMockConsoleLogger
Assembly: | WireMock.Net
File(s): | C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Logging\WireMockConsoleLogger.cs
Covered lines: | 0
Uncovered lines: | 24
Coverable lines: | 24
Total lines: | 59
Line coverage: | 0%
Branch coverage: | 0%

# Metrics

Method | Cyclomatic complexity | NPath complexity | Sequence coverage | Branch coverage
--- | --- | --- | --- | ---
Debug(...) | 0 | 0 | 0 | 0
Info(...) | 0 | 0 | 0 | 0
Warn(...) | 0 | 0 | 0 | 0
Error(...) | 0 | 0 | 0 | 0
DebugRequestResponse(...) | 0 | 0 | 0 | 0
Format(...) | 0 | 0 | 0 | 0
.ctor() | 0 | 0 | 0 | 0

# File(s)

## C:\Users\azureuser\Documents\Github\WireMock.Net\src\WireMock.Net\Logging\WireMockConsoleLogger.cs

| # | Line |  | Line coverage
--- | --- | --- | --- | ---
|  | `1` |  | `using System;`
|  | `2` |  | `using Newtonsoft.Json;`
|  | `3` |  | `using WireMock.Admin.Requests;`
|  | `4` |  | ``
|  | `5` |  | `namespace WireMock.Logging`
|  | `6` |  | `{`
|  | `7` |  | `/// <summary>`
|  | `8` |  | `/// WireMockConsoleLogger which logs to Console`
|  | `9` |  | `/// </summary>`
|  | `10` |  | `/// <seealso cref="IWireMockLogger" />`
|  | `11` |  | `public class WireMockConsoleLogger : IWireMockLogger`
|  | `12` |  | `{`
|  | `13` |  | `/// <summary>`
|  | `14` |  | `/// Initializes a new instance of the <see cref="WireMockConsoleLogger"/> class.`
|  | `15` |  | `/// </summary>`
| 0 | `16` |  | `public WireMockConsoleLogger()`
| 0 | `17` |  | `{`
| 0 | `18` |  | `Console.OutputEncoding = System.Text.Encoding.UTF8;`
| 0 | `19` |  | `}`
|  | `20` |  | ``
|  | `21` |  | `/// <see cref="IWireMockLogger.Debug"/>`
|  | `22` |  | `public void Debug(string formatString, params object[] args)`
| 0 | `23` |  | `{`
| 0 | `24` |  | `Console.WriteLine(Format("Debug", formatString, args));`
| 0 | `25` |  | `}`
|  | `26` |  | ``
|  | `27` |  | `/// <see cref="IWireMockLogger.Info"/>`
|  | `28` |  | `public void Info(string formatString, params object[] args)`
| 0 | `29` |  | `{`
| 0 | `30` |  | `Console.WriteLine(Format("Info", formatString, args));`
| 0 | `31` |  | `}`
|  | `32` |  | ``
|  | `33` |  | `/// <see cref="IWireMockLogger.Warn"/>`
|  | `34` |  | `public void Warn(string formatString, params object[] args)`
| 0 | `35` |  | `{`
| 0 | `36` |  | `Console.WriteLine(Format("Warn", formatString, args));`
| 0 | `37` |  | `}`
|  | `38` |  | ``
|  | `39` |  | `/// <see cref="IWireMockLogger.Error"/>`
|  | `40` |  | `public void Error(string formatString, params object[] args)`
| 0 | `41` |  | `{`
| 0 | `42` |  | `Console.WriteLine(Format("Error", formatString, args));`
| 0 | `43` |  | `}`
|  | `44` |  | ``
|  | `45` |  | `/// <see cref="IWireMockLogger.DebugRequestResponse"/>`
|  | `46` |  | `public void DebugRequestResponse(LogEntryModel logEntryModel, bool isAdminRequest)`
| 0 | `47` |  | `{`
| 0 | `48` |  | `string message = JsonConvert.SerializeObject(logEntryModel, Formatting.Indented);`
| 0 | `49` |  | `Console.WriteLine(Format("DebugRequestResponse", "Admin[{0}] {1}", isAdminRequest, message));`
| 0 | `50` |  | `}`
|  | `51` |  | ``
|  | `52` |  | `private static string Format(string level, string formatString, params object[] args)`
| 0 | `53` |  | `{`
| 0 | `54` |  | `var message = args.Length > 0 ? string.Format(formatString, args) : formatString;`
|  | `55` |  | ``
| 0 | `56` |  | `return $"{DateTime.UtcNow} [{level}] : {message}";`
| 0 | `57` |  | `}`
|  | `58` |  | `}`
|  | `59` |  | `}`

# Methods/Properties

.ctor()
Debug(System.String,System.Object[])
Info(System.String,System.Object[])
Warn(System.String,System.Object[])
Error(System.String,System.Object[])
DebugRequestResponse(WireMock.Admin.Requests.LogEntryModel,System.Boolean)
Format(System.String,System.String,System.Object[])