<!DOCTYPE html>

<head>
	<title>[% title %] - Logs</title>

	<meta name="viewport" content="width=device-width" />
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

	<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>📚</text></svg>">
	<link rel="stylesheet" type="text/css" href="/css/lrr.css?[% version%]" />

	<link rel="stylesheet" type="text/css" href="./css/vendor/fontawesome-all.min.css" />
	<link rel="stylesheet" type="text/css" href="/css/vendor/ReactToastify.min.css" />
	[% csshead %]

	<script src="./js/vendor/jquery.min.js" type="text/JAVASCRIPT"></script>
	<script src="/js/vendor/preact.umd.js" type="text/JAVASCRIPT"></script>
	<script src="/js/vendor/hooks.umd.js" type="text/JAVASCRIPT"></script>
	<script src="/js/vendor/compat.umd.js" type="text/JAVASCRIPT"></script>
	<script>window.React=window.preactCompat;window.react=window.preactCompat;</script>
	<script src="/js/vendor/clsx.min.js" type="text/JAVASCRIPT"></script>
	<script src="/js/vendor/react-toastify.umd.js" type="text/JAVASCRIPT"></script>

	<script src="./js/common.js?[% version%]" type="text/JAVASCRIPT"></script>
	<script src="./js/logs.js?[% version%]" type="text/JAVASCRIPT"></script>
</head>

<body>

	<div class='ido' style='text-align:center'>
		<h2 class='ih' style='text-align:center'>Application Logs</h2>

		<br>
		You can check LANraragi logs here for debugging purposes.<br>
		By default, this view only shows the last 100 lines of each logfile, newest lines last. <br><br>
		<ul>
			<li>General Logs pertain to the main application. </li>
			<li>Shinobu Logs correspond to the Background Worker.</li>
			<li>Plugin Logs are reserved for metadata plugins only. </li>
			<li>Mojolicious logs won't tell much unless you're running Debug Mode. </li>
			<li>Redis logs won't be available from here if you're running from source! </li>
		</ul>
		<br><br>

		<h1 class='ih' style='float:left; margin-left: 5%;'>Currently Viewing: <span id="indicator">general</span></h1>

		<div style="margin-right: 5%;float: right;">

			<a id="refresh" href="#" title="Refresh">
				<i style="padding-right: 10px;" class="fa fa-sync-alt fa-2x"></i>
			</a>

			Lines: <input type="number" min="0" value="100" id="loglines" style="width: 60px;">

		</div>

		<table class="itg" style="width: 100%; margin-top: 32px;">
			<tbody>

				<tr class="gtr1">
					<td>
						<pre id="log-container" class="log-panel"></pre>
					</td>
				</tr>

			</tbody>
		</table>

		<br><br>
		<span id='buttonstagging'>
			<input id="show-general" type='button' value='View LANraragi Logs' class='stdbtn'>

			<input id="show-shinobu" type='button' value='View Shinobu Logs' class='stdbtn'>

			<input id="show-plugins" type='button' value='View Plugin Logs' class='stdbtn'>

			<input id="show-mojo" type='button' value='View Mojolicious Logs' class='stdbtn'>

			<input id="show-redis" type='button' value='View Redis Logs' class='stdbtn'>

			<br><br>
			<input id='return' class='stdbtn' type='button' value='Return to Library' />

		</span>

	</div>

	[% INCLUDE footer %]
</body>

</html>