You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

404 lines
20 KiB

  1. <!DOCTYPE html>
  2. <!--[if IE]><![endif]-->
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>Class StandardLogger
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class StandardLogger
  11. ">
  12. <meta name="generator" content="docfx 2.42.4.0">
  13. <link rel="shortcut icon" href="../favicon.ico">
  14. <link rel="stylesheet" href="../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../styles/docfx.css">
  16. <link rel="stylesheet" href="../styles/main.css">
  17. <link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
  18. <meta property="docfx:navrel" content="../toc.html">
  19. <meta property="docfx:tocrel" content="toc.html">
  20. </head> <body data-spy="scroll" data-target="#affix" data-offset="120">
  21. <div id="wrapper">
  22. <header>
  23. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  24. <div class="container">
  25. <div class="navbar-header">
  26. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  27. <span class="sr-only">Toggle navigation</span>
  28. <span class="icon-bar"></span>
  29. <span class="icon-bar"></span>
  30. <span class="icon-bar"></span>
  31. </button>
  32. <a class="navbar-brand" href="../index.html">
  33. <img id="logo" class="svg" src="../logo.svg" alt="">
  34. </a>
  35. </div>
  36. <div class="collapse navbar-collapse" id="navbar">
  37. <form class="navbar-form navbar-right" role="search" id="search">
  38. <div class="form-group">
  39. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  40. </div>
  41. </form>
  42. </div>
  43. </div>
  44. </nav>
  45. <div class="subnav navbar navbar-default">
  46. <div class="container hide-when-search" id="breadcrumb">
  47. <ul class="breadcrumb">
  48. <li></li>
  49. </ul>
  50. </div>
  51. </div>
  52. </header>
  53. <div role="main" class="container body-content hide-when-search">
  54. <div class="sidenav hide-when-search">
  55. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  56. <div class="sidetoggle collapse" id="sidetoggle">
  57. <div id="sidetoc"></div>
  58. </div>
  59. </div>
  60. <div class="article row grid-right">
  61. <div class="col-md-10">
  62. <article class="content wrap" id="_content" data-uid="IPA.Logging.StandardLogger">
  63. <h1 id="IPA_Logging_StandardLogger" data-uid="IPA.Logging.StandardLogger" class="text-break">Class StandardLogger
  64. </h1>
  65. <div class="markdown level0 summary"><p>The default (and standard) <a class="xref" href="IPA.Logging.Logger.html">Logger</a> implementation.</p>
  66. </div>
  67. <div class="markdown level0 conceptual"></div>
  68. <div class="inheritance">
  69. <h5>Inheritance</h5>
  70. <div class="level0"><span class="xref">System.Object</span></div>
  71. <div class="level1"><a class="xref" href="IPA.Logging.Logger.html">Logger</a></div>
  72. <div class="level2"><span class="xref">StandardLogger</span></div>
  73. </div>
  74. <div class="inheritedMembers">
  75. <h5>Inherited Members</h5>
  76. <div>
  77. <a class="xref" href="IPA.Logging.Logger.html#IPA_Logging_Logger_LogFormat">Logger.LogFormat</a>
  78. </div>
  79. <div>
  80. <a class="xref" href="IPA.Logging.Logger.html#IPA_Logging_Logger_Log_IPA_Logging_Logger_Level_System_Exception_">Logger.Log(Logger.Level, Exception)</a>
  81. </div>
  82. <div>
  83. <a class="xref" href="IPA.Logging.Logger.html#IPA_Logging_Logger_Debug_System_Exception_">Logger.Debug(Exception)</a>
  84. </div>
  85. <div>
  86. <a class="xref" href="IPA.Logging.Logger.html#IPA_Logging_Logger_Info_System_String_">Logger.Info(String)</a>
  87. </div>
  88. <div>
  89. <a class="xref" href="IPA.Logging.Logger.html#IPA_Logging_Logger_Info_System_Exception_">Logger.Info(Exception)</a>
  90. </div>
  91. <div>
  92. <a class="xref" href="IPA.Logging.Logger.html#IPA_Logging_Logger_Notice_System_String_">Logger.Notice(String)</a>
  93. </div>
  94. <div>
  95. <a class="xref" href="IPA.Logging.Logger.html#IPA_Logging_Logger_Notice_System_Exception_">Logger.Notice(Exception)</a>
  96. </div>
  97. <div>
  98. <a class="xref" href="IPA.Logging.Logger.html#IPA_Logging_Logger_Warn_System_String_">Logger.Warn(String)</a>
  99. </div>
  100. <div>
  101. <a class="xref" href="IPA.Logging.Logger.html#IPA_Logging_Logger_Warn_System_Exception_">Logger.Warn(Exception)</a>
  102. </div>
  103. <div>
  104. <a class="xref" href="IPA.Logging.Logger.html#IPA_Logging_Logger_Error_System_String_">Logger.Error(String)</a>
  105. </div>
  106. <div>
  107. <a class="xref" href="IPA.Logging.Logger.html#IPA_Logging_Logger_Error_System_Exception_">Logger.Error(Exception)</a>
  108. </div>
  109. <div>
  110. <a class="xref" href="IPA.Logging.Logger.html#IPA_Logging_Logger_Critical_System_String_">Logger.Critical(String)</a>
  111. </div>
  112. <div>
  113. <a class="xref" href="IPA.Logging.Logger.html#IPA_Logging_Logger_Critical_System_Exception_">Logger.Critical(Exception)</a>
  114. </div>
  115. <div>
  116. <span class="xref">System.Object.ToString()</span>
  117. </div>
  118. <div>
  119. <span class="xref">System.Object.Equals(System.Object)</span>
  120. </div>
  121. <div>
  122. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  123. </div>
  124. <div>
  125. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  126. </div>
  127. <div>
  128. <span class="xref">System.Object.GetHashCode()</span>
  129. </div>
  130. <div>
  131. <span class="xref">System.Object.GetType()</span>
  132. </div>
  133. <div>
  134. <span class="xref">System.Object.MemberwiseClone()</span>
  135. </div>
  136. </div>
  137. <h6><strong>Namespace</strong>: <a class="xref" href="IPA.Logging.html">IPA.Logging</a></h6>
  138. <h6><strong>Assembly</strong>: IPA.Loader.dll</h6>
  139. <h5 id="IPA_Logging_StandardLogger_syntax">Syntax</h5>
  140. <div class="codewrapper">
  141. <pre><code class="lang-csharp hljs">public class StandardLogger : Logger</code></pre>
  142. </div>
  143. <h5 id="IPA_Logging_StandardLogger_remarks"><strong>Remarks</strong></h5>
  144. <div class="markdown level0 remarks"><p><a class="xref" href="IPA.Logging.StandardLogger.html">StandardLogger</a> uses a multi-threaded approach to logging. All actual I/O is done on another thread,
  145. where all messaged are guaranteed to be logged in the order they appeared. It is up to the printers to format them.</p>
  146. <p>This logger supports child loggers. Use <a class="xref" href="IPA.Logging.LoggerExtensions.html#IPA_Logging_LoggerExtensions_GetChildLogger_IPA_Logging_Logger_System_String_">GetChildLogger(Logger, String)</a> to safely get a child.
  147. The modification of printers on a parent are reflected down the chain.</p>
  148. </div>
  149. <h3 id="properties">Properties
  150. </h3>
  151. <span class="small pull-right mobile-hide">
  152. <span class="divider">|</span>
  153. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/apiSpec/new?filename=IPA_Logging_StandardLogger_ConsoleWriter.md&amp;value=---%0Auid%3A%20IPA.Logging.StandardLogger.ConsoleWriter%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  154. </span>
  155. <span class="small pull-right mobile-hide">
  156. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/master/IPA.Loader/Logging/StandardLogger.cs/#L83">View Source</a>
  157. </span>
  158. <a id="IPA_Logging_StandardLogger_ConsoleWriter_" data-uid="IPA.Logging.StandardLogger.ConsoleWriter*"></a>
  159. <h4 id="IPA_Logging_StandardLogger_ConsoleWriter" data-uid="IPA.Logging.StandardLogger.ConsoleWriter">ConsoleWriter</h4>
  160. <div class="markdown level1 summary"><p>The <span class="xref">System.IO.TextWriter</span> for writing directly to the console window, or stdout if no window open.</p>
  161. </div>
  162. <div class="markdown level1 conceptual"></div>
  163. <h5 class="decalaration">Declaration</h5>
  164. <div class="codewrapper">
  165. <pre><code class="lang-csharp hljs">public static TextWriter ConsoleWriter { get; }</code></pre>
  166. </div>
  167. <h5 class="propertyValue">Property Value</h5>
  168. <table class="table table-bordered table-striped table-condensed">
  169. <thead>
  170. <tr>
  171. <th>Type</th>
  172. <th>Description</th>
  173. </tr>
  174. </thead>
  175. <tbody>
  176. <tr>
  177. <td><span class="xref">System.IO.TextWriter</span></td>
  178. <td><p>a <span class="xref">System.IO.TextWriter</span> for the current primary text output</p>
  179. </td>
  180. </tr>
  181. </tbody>
  182. </table>
  183. <span class="small pull-right mobile-hide">
  184. <span class="divider">|</span>
  185. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/apiSpec/new?filename=IPA_Logging_StandardLogger_PrintFilter.md&amp;value=---%0Auid%3A%20IPA.Logging.StandardLogger.PrintFilter%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  186. </span>
  187. <span class="small pull-right mobile-hide">
  188. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/master/IPA.Loader/Logging/StandardLogger.cs/#L101">View Source</a>
  189. </span>
  190. <a id="IPA_Logging_StandardLogger_PrintFilter_" data-uid="IPA.Logging.StandardLogger.PrintFilter*"></a>
  191. <h4 id="IPA_Logging_StandardLogger_PrintFilter" data-uid="IPA.Logging.StandardLogger.PrintFilter">PrintFilter</h4>
  192. <div class="markdown level1 summary"><p>All levels defined by this filter will be sent to loggers. All others will be ignored.</p>
  193. </div>
  194. <div class="markdown level1 conceptual"></div>
  195. <h5 class="decalaration">Declaration</h5>
  196. <div class="codewrapper">
  197. <pre><code class="lang-csharp hljs">public static Logger.LogLevel PrintFilter { get; set; }</code></pre>
  198. </div>
  199. <h5 class="propertyValue">Property Value</h5>
  200. <table class="table table-bordered table-striped table-condensed">
  201. <thead>
  202. <tr>
  203. <th>Type</th>
  204. <th>Description</th>
  205. </tr>
  206. </thead>
  207. <tbody>
  208. <tr>
  209. <td><a class="xref" href="IPA.Logging.Logger.LogLevel.html">Logger.LogLevel</a></td>
  210. <td><p>the global filter level</p>
  211. </td>
  212. </tr>
  213. </tbody>
  214. </table>
  215. <h3 id="methods">Methods
  216. </h3>
  217. <span class="small pull-right mobile-hide">
  218. <span class="divider">|</span>
  219. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/apiSpec/new?filename=IPA_Logging_StandardLogger_AddPrinter_IPA_Logging_LogPrinter_.md&amp;value=---%0Auid%3A%20IPA.Logging.StandardLogger.AddPrinter(IPA.Logging.LogPrinter)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  220. </span>
  221. <span class="small pull-right mobile-hide">
  222. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/master/IPA.Loader/Logging/StandardLogger.cs/#L175">View Source</a>
  223. </span>
  224. <a id="IPA_Logging_StandardLogger_AddPrinter_" data-uid="IPA.Logging.StandardLogger.AddPrinter*"></a>
  225. <h4 id="IPA_Logging_StandardLogger_AddPrinter_IPA_Logging_LogPrinter_" data-uid="IPA.Logging.StandardLogger.AddPrinter(IPA.Logging.LogPrinter)">AddPrinter(LogPrinter)</h4>
  226. <div class="markdown level1 summary"><p>Adds a log printer to the logger.</p>
  227. </div>
  228. <div class="markdown level1 conceptual"></div>
  229. <h5 class="decalaration">Declaration</h5>
  230. <div class="codewrapper">
  231. <pre><code class="lang-csharp hljs">public void AddPrinter(LogPrinter printer)</code></pre>
  232. </div>
  233. <h5 class="parameters">Parameters</h5>
  234. <table class="table table-bordered table-striped table-condensed">
  235. <thead>
  236. <tr>
  237. <th>Type</th>
  238. <th>Name</th>
  239. <th>Description</th>
  240. </tr>
  241. </thead>
  242. <tbody>
  243. <tr>
  244. <td><a class="xref" href="IPA.Logging.LogPrinter.html">LogPrinter</a></td>
  245. <td><span class="parametername">printer</span></td>
  246. <td><p>the printer to add</p>
  247. </td>
  248. </tr>
  249. </tbody>
  250. </table>
  251. <span class="small pull-right mobile-hide">
  252. <span class="divider">|</span>
  253. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/apiSpec/new?filename=IPA_Logging_StandardLogger_Debug_System_String_.md&amp;value=---%0Auid%3A%20IPA.Logging.StandardLogger.Debug(System.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  254. </span>
  255. <span class="small pull-right mobile-hide">
  256. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/master/IPA.Loader/Logging/StandardLogger.cs/#L206">View Source</a>
  257. </span>
  258. <a id="IPA_Logging_StandardLogger_Debug_" data-uid="IPA.Logging.StandardLogger.Debug*"></a>
  259. <h4 id="IPA_Logging_StandardLogger_Debug_System_String_" data-uid="IPA.Logging.StandardLogger.Debug(System.String)">Debug(String)</h4>
  260. <div class="markdown level1 summary"><p>An override to <a class="xref" href="IPA.Logging.Logger.html#IPA_Logging_Logger_Debug_System_String_">Debug(String)</a> which shows the method that called it.</p>
  261. </div>
  262. <div class="markdown level1 conceptual"></div>
  263. <h5 class="decalaration">Declaration</h5>
  264. <div class="codewrapper">
  265. <pre><code class="lang-csharp hljs">public override void Debug(string message)</code></pre>
  266. </div>
  267. <h5 class="parameters">Parameters</h5>
  268. <table class="table table-bordered table-striped table-condensed">
  269. <thead>
  270. <tr>
  271. <th>Type</th>
  272. <th>Name</th>
  273. <th>Description</th>
  274. </tr>
  275. </thead>
  276. <tbody>
  277. <tr>
  278. <td><span class="xref">System.String</span></td>
  279. <td><span class="parametername">message</span></td>
  280. <td><p>the message to log</p>
  281. </td>
  282. </tr>
  283. </tbody>
  284. </table>
  285. <h5 class="overrides">Overrides</h5>
  286. <div><a class="xref" href="IPA.Logging.Logger.html#IPA_Logging_Logger_Debug_System_String_">Logger.Debug(String)</a></div>
  287. <h5 id="IPA_Logging_StandardLogger_Debug_System_String__seealso">See Also</h5>
  288. <div class="seealso">
  289. <div><a class="xref" href="IPA.Logging.Logger.html#IPA_Logging_Logger_Log_IPA_Logging_Logger_Level_System_String_">Log</a>(<a class="xref" href="IPA.Logging.Logger.Level.html">Logger.Level</a>, <span class="xref">System.String</span>)</div>
  290. </div>
  291. <span class="small pull-right mobile-hide">
  292. <span class="divider">|</span>
  293. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/apiSpec/new?filename=IPA_Logging_StandardLogger_Log_IPA_Logging_Logger_Level_System_String_.md&amp;value=---%0Auid%3A%20IPA.Logging.StandardLogger.Log(IPA.Logging.Logger.Level%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  294. </span>
  295. <span class="small pull-right mobile-hide">
  296. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/master/IPA.Loader/Logging/StandardLogger.cs/#L185">View Source</a>
  297. </span>
  298. <a id="IPA_Logging_StandardLogger_Log_" data-uid="IPA.Logging.StandardLogger.Log*"></a>
  299. <h4 id="IPA_Logging_StandardLogger_Log_IPA_Logging_Logger_Level_System_String_" data-uid="IPA.Logging.StandardLogger.Log(IPA.Logging.Logger.Level,System.String)">Log(Logger.Level, String)</h4>
  300. <div class="markdown level1 summary"><p>Logs a specific message at a given level.</p>
  301. </div>
  302. <div class="markdown level1 conceptual"></div>
  303. <h5 class="decalaration">Declaration</h5>
  304. <div class="codewrapper">
  305. <pre><code class="lang-csharp hljs">public override void Log(Logger.Level level, string message)</code></pre>
  306. </div>
  307. <h5 class="parameters">Parameters</h5>
  308. <table class="table table-bordered table-striped table-condensed">
  309. <thead>
  310. <tr>
  311. <th>Type</th>
  312. <th>Name</th>
  313. <th>Description</th>
  314. </tr>
  315. </thead>
  316. <tbody>
  317. <tr>
  318. <td><a class="xref" href="IPA.Logging.Logger.Level.html">Logger.Level</a></td>
  319. <td><span class="parametername">level</span></td>
  320. <td><p>the message level</p>
  321. </td>
  322. </tr>
  323. <tr>
  324. <td><span class="xref">System.String</span></td>
  325. <td><span class="parametername">message</span></td>
  326. <td><p>the message to log</p>
  327. </td>
  328. </tr>
  329. </tbody>
  330. </table>
  331. <h5 class="overrides">Overrides</h5>
  332. <div><a class="xref" href="IPA.Logging.Logger.html#IPA_Logging_Logger_Log_IPA_Logging_Logger_Level_System_String_">Logger.Log(Logger.Level, String)</a></div>
  333. <h3 id="extensionmethods">Extension Methods</h3>
  334. <div>
  335. <a class="xref" href="IPA.Logging.LoggerExtensions.html#IPA_Logging_LoggerExtensions_GetChildLogger_IPA_Logging_Logger_System_String_">LoggerExtensions.GetChildLogger(Logger, String)</a>
  336. </div>
  337. <div>
  338. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_SetPrivateField_System_Object_System_String_System_Object_">ReflectionUtil.SetPrivateField(Object, String, Object)</a>
  339. </div>
  340. <div>
  341. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_GetPrivateField__1_System_Object_System_String_">ReflectionUtil.GetPrivateField&lt;T&gt;(Object, String)</a>
  342. </div>
  343. <div>
  344. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_SetPrivateProperty_System_Object_System_String_System_Object_">ReflectionUtil.SetPrivateProperty(Object, String, Object)</a>
  345. </div>
  346. <div>
  347. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_InvokePrivateMethod_System_Object_System_String_System_Object___">ReflectionUtil.InvokePrivateMethod(Object, String, Object[])</a>
  348. </div>
  349. <div>
  350. <a class="xref" href="IPA.Utilities.ReflectionUtil.html#IPA_Utilities_ReflectionUtil_InvokePrivateMethod__1_System_Object_System_String_System_Object___">ReflectionUtil.InvokePrivateMethod&lt;T&gt;(Object, String, Object[])</a>
  351. </div>
  352. </article>
  353. </div>
  354. <div class="hidden-sm col-md-2" role="complementary">
  355. <div class="sideaffix">
  356. <div class="contribution">
  357. <ul class="nav">
  358. <li>
  359. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/new/master/apiSpec/new?filename=IPA_Logging_StandardLogger.md&amp;value=---%0Auid%3A%20IPA.Logging.StandardLogger%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
  360. </li>
  361. <li>
  362. <a href="https://github.com/beat-saber-modding-group/BeatSaber-IPA-Reloaded/blob/master/IPA.Loader/Logging/StandardLogger.cs/#L23" class="contribution-link">View Source</a>
  363. </li>
  364. </ul>
  365. </div>
  366. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  367. <!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
  368. </nav>
  369. </div>
  370. </div>
  371. </div>
  372. </div>
  373. <footer>
  374. <div class="grad-bottom"></div>
  375. <div class="footer">
  376. <div class="container">
  377. <span class="pull-right">
  378. <a href="#top">Back to top</a>
  379. </span>
  380. <span>Generated by <strong>DocFX</strong></span>
  381. </div>
  382. </div>
  383. </footer>
  384. </div>
  385. <script type="text/javascript" src="../styles/docfx.vendor.js"></script>
  386. <script type="text/javascript" src="../styles/docfx.js"></script>
  387. <script type="text/javascript" src="../styles/main.js"></script>
  388. </body>
  389. </html>