log file added

This commit is contained in:
Swapnil9693
2026-02-17 15:25:57 +05:30
parent b8c289294d
commit 684e41e5c3
7 changed files with 228 additions and 32 deletions

24
templates/view_logs.html Normal file
View File

@@ -0,0 +1,24 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<style>
body {
background: black;
color: #00ff00;
font-family: monospace;
}
.log-box {
white-space: pre-wrap;
height: 90vh;
overflow-y: scroll;
}
</style>
</head>
<body>
<h2>Application Logs</h2>
<div class="log-box">{% for line in logs %} {{ line }} {% endfor %}</div>
</body>
</html>

View File

@@ -0,0 +1,90 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>View Logs - Authorization</title>
<style>
body {
margin: 0;
font-family: Arial, Helvetica, sans-serif;
background: linear-gradient(135deg, #0d47a1, #1976d2);
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
background: #ffffff;
padding: 40px;
width: 350px;
border-radius: 12px;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
text-align: center;
}
h2 {
margin-bottom: 25px;
color: #0d47a1;
}
input[type="password"] {
width: 100%;
padding: 12px;
margin-bottom: 20px;
border-radius: 6px;
border: 1px solid #ccc;
font-size: 14px;
outline: none;
transition: border 0.3s;
}
input[type="password"]:focus {
border: 1px solid #1976d2;
}
button {
width: 100%;
padding: 12px;
background-color: #1976d2;
color: white;
border: none;
border-radius: 6px;
font-size: 15px;
cursor: pointer;
transition: background 0.3s ease;
}
button:hover {
background-color: #0d47a1;
}
.flash-message {
margin-top: 15px;
font-size: 14px;
color: red;
}
</style>
</head>
<body>
<div class="container">
<h2>Enter Secret to View Logs</h2>
<form method="POST">
<input type="password" name="secret" placeholder="Enter Secret Password" required>
<button type="submit">Open Logs</button>
</form>
{% with messages = get_flashed_messages(with_categories=true) %}
{% for category, message in messages %}
<div class="flash-message">{{ message }}</div>
{% endfor %}
{% endwith %}
</div>
</body>
</html>