Skip to content

Commit

Permalink
Added syntax highlighting to log files
Browse files Browse the repository at this point in the history
  • Loading branch information
geek-at committed Nov 18, 2023
1 parent e7d3754 commit 9a0eb1f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
3 changes: 3 additions & 0 deletions web/css/prism.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions web/js/prism.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions web/templates/index.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/css/pico.min.css">
<link rel="stylesheet" href="/css/fontawesome.min.css">
<link rel="stylesheet" href="/css/prism.css">
<link rel="stylesheet" href="/css/opentrashmail.css">
<title>Open Trashmail</title>
</head>
Expand Down
12 changes: 7 additions & 5 deletions web/templates/logs.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@

<h2>Mailserver log</h2>
<div>
<pre><code><?= file_exists($mailserverlogfile)?tailShell($mailserverlogfile, $lines):'- Mailserver log file not found -' ?></code><pre>
<pre><code class="language-log"><?= file_exists($mailserverlogfile)?tailShell($mailserverlogfile, $lines):'- Mailserver log file not found -' ?></code><pre>
</div>

<h2>Webserver error log</h2>
<div>
<pre><code><?= file_exists($webservererrorlogfile)?tailShell($webservererrorlogfile, $lines):'- Webserver error log file not found -' ?></code><pre>
<pre><code class="language-log"><?= file_exists($webservererrorlogfile)?tailShell($webservererrorlogfile, $lines):'- Webserver error log file not found -' ?></code><pre>
</div>

<h2>Webserver access log</h2>
<div>
<pre><code><?= file_exists($webserveraccesslogfile)?tailShell($webserveraccesslogfile, $lines):'- Webserver access log file not found -' ?></code><pre>
<pre><code class="language-log"><?= file_exists($webserveraccesslogfile)?tailShell($webserveraccesslogfile, $lines):'- Webserver access log file not found -' ?></code><pre>
</div>

<h2>Current config</h2>
<div>
<pre><code><?= file_exists($configfile)?file_get_contents($configfile):'- Config file not found -' ?></code><pre>
</div>
<pre><code class="language-ini"><?= file_exists($configfile)?file_get_contents($configfile):'- Config file not found -' ?></code><pre>
</div>

<script src="/js/prism.js"></script>

0 comments on commit 9a0eb1f

Please sign in to comment.