-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
345 lines (323 loc) · 12.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>LogHappens</title>
<meta name="viewport" content="width=device-width">
<meta name="description" content="A log parsing tool and notifier, to keep an eye on your log files and view them in a friendly way. ">
<meta name="keywords" content="log,development,viewer,debug">
<link rel="shortcut icon" href="favicon.png" type="image/x-icon">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/materialize.min.css">
<style>
html {
font-family: -apple-system, BlinkMacSystemFont, "Futura", "Ubuntu", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}
body {
background: #222d33;
color: #435672;
display: flex;
min-height: 100vh;
flex-direction: column;
}
h1 {
color: #444;
font-size: 3.56rem;
letter-spacing: -4px;
line-height: 110%;
}
.logo {
margin-bottom: 45px;
}
.logo div {
font-size: 12px;
line-height: 1.5em;
letter-spacing: 1px;
margin-top: -20px;
width: 355px;
max-width: 100%;
text-align: center;
}
h1 img {
vertical-align: bottom;
height: 57px;
}
h2 {
color: #124761;
font-size: 1.64rem;
line-height: 110%;
margin: .82rem 0 .556rem 0;
}
pre {
background: #EEE;
padding-left: 30px;
font-size: 80%;
}
code {
word-break: break-word;
}
.section {
padding: 1.5rem;
}
.section img {
max-width: 100%;
}
.active .section {
background-color: #FFF;
box-shadow: 3px 3px 15px #eeeff2;
margin-bottom: 40px;
}
.counter {
padding-left: 30px;
}
.main {
flex: 1 0 auto;
background: #f7f8fb;
margin: 30px auto 50px;
}
.collection a {
display: inline-block;
width: 40%;
}
.accept_to_chat {
border-radius: 5px;
box-shadow: 2px 2px 2px rgba(0,0,0,0.3);
position: fixed;
right: 10px;
bottom: 55px;
background-color: rgba(9, 82, 156, 0.7);
color: #FFF;
text-align: center;
width: 150px;
max-width: 90%;
padding: 10px;
}
.hidden {
display: none;
}
.page-footer {
background-color: #131517;
}
.footer-copyright {
background-color: #040404 !important;
}
/* Materialize tabs */
.tabs {
background-color: transparent;
text-align: center;
}
.tabs li.tab a {
color: #124761;
font-size: 120%;
text-transform: capitalize;
}
.tabs li.tab a:hover {
color: #039be5;
}
.tabs .tab a:hover, .tabs .tab a.active {
color: #039be5;
}
.tabs .indicator {
background-color: #124761;
}
/* Inputs */
.input-field label {
color: #456;
}
.dropdown-content li>a, .dropdown-content li>span {
color: #039be5;
}
.materialbox {
cursor: pointer;
}
.materialbox.active {
max-width: inherit !important;
}
#materialbox-overlay {
background-color: rgba(0,0,0,0.8);
}
@media only screen and (max-device-width: 800px) {
.container {
width: 93%;
}
.section {
padding: 0.7rem;
}
.collection i {
display: none;
}
.collection a {
display: block;
width: 100%;
}
.accept_to_chat {
display: none;
}
}
</style>>
</head>
<body>
<div class="main container z-depth-5">
<div class="section white header">
<div class="row logo">
<h1>
<a class="grey-text text-darken-4" href='./'>LogHappens</a>
</h1>
<div>a free & easy live log viewer.</div>
</div>
<a id="why-use-loghappens"></a>
<h2>Bug Happens...</h2>
<p>Every developer knows that. The bad thing is that if you want to see what happened, more often than not
you have to crawl between hundred lines log files, written in a format which is all but human friendly.</p>
</div>
<div class="section row">
<div class="col s12">
<ul class="tabs">
<li class="tab"><a href="#loghappens">LogHappens</a></li>
<li class="tab"><a href="#tracking">Tracking errors</a></li>
<li class="tab"><a href="#installation">Installation</a></li>
</ul>
</div>
<br><br><br><br>
<div id="loghappens" class="col s12 m10 offset-m1">
<div class="section">
<a id="why"></a>
<h2>That's why LogHappens exists!</h2>
<p>LogHappens aims to fix exactly this. It's a simple tool, it will not prevent you from writing
bugs, but it will notify you immediately when something has been logged by your web server or your
favorite framework.</p>
</div>
<div class="section">
<a id="different-log-formats"></a>
<h2>Does it handle different log formats?</h2>
<p>Of course it does. Every software has its own bugs, and every software has its own way of
logging things too. This is why I have tried to make it as simple as possible to let you create
your own routine for reading log files, while still providing a few log default parsers that you
can immediately use.</p>
</div>
<div class="section">
<a id="look"></a>
<h2>What does it look like?</h2>
<p>It looks like this, but you can change the appearance by using any of the bootstrap/bootswatch themes!</p>
<img class="materialbox" src="https://user-images.githubusercontent.com/659492/74713643-4439d900-5229-11ea-938d-63ce808ea6fd.png" alt="A screenshot of the LogHappens interface" />
</div>
<div class="section">
<a id="its-free"></a>
<h2>Did I mention it's free?</h2>
<p>Because it is. Free and Open Source. I'm enjoying a lot of Open Source Software, that's why I've decided to give something back.</p>
</div>
</div>
<div id="tracking" class="col s12 m10 offset-m1">
<div class="section">
<a id="different-log-formats"></a>
<h2>How do I add a log file to be tracked?</h2>
<p>Adding a new file to be tracked is fairly simple with LogHappens. Just add a new record in your
config.json file, and set the values according to your preferences. Something like this is
enough.</p>
<pre><code>
"apache": {
"icon": "logos:apache",
"color": "#104B73",
"title": "Apache error",
"file": "/var/log/apache2/error.log",
"parser": "apache24"
}
</code></pre>
</div>
<div class="section">
<a id="different-log-formats"></a>
<h2>Can I track a remote file (I.E. through a URL)?</h2>
<p>If you are not worried for the security issues of having an error log publicly reachable,
then yes. Just set the URL in the configuration path.</p>
<pre><code>
"myExampleSite": {
"icon": "wpf-online",
"color": "#104B73",
"title": "My ExampleSite Errors",
"file": "https://example.com/logs/error.log",
"parser": "cakephp3"
}
</code></pre>
</div>
<div class="section">
<a id="different-log-formats"></a>
<h2>Can I capture the browser's JavaScript errors too?</h2>
<p>Yes sir! Even though it is not a LogHappens specific function you could use something
<a href="https://gist.github.com/ToX82/20134e5006823360f87ee2b54b95b681">like this</a>
to capture client side JavaScript errors</p>
</div>
<div class="section">
<a id="parser"></a>
<h2>How are the log files parsed?</h2>
<p>It's essentially quite simple. Take a look at the files contained in the "parsers" directory
to have a glance on how it works.</p>
<p>If you need to view logs for another framework, those examples could be good
"hello world" templates too :)</p>
</div>
<div class="section">
<a id="different-log-formats"></a>
<h2>Can I share a new parser file?</h2>
<p>Of course! As you can see, there are apache24, CakePHP 3.x and CodeIgniter files in the parsers
folder. If you have created your own routine, please send it to me, I will be more than happy
to add it to the provided parsers!</p>
</div>
</div>
<div id="installation" class="col s12 m10 offset-m1">
<div class="section">
<a id="install"></a>
<h2>Download & Installation</h2>
<p>To install LogHappens, please follow these steps:</p>
<ul class="browser-default">
<li>Get LogHappens (choose your favourite method):
<ul class="browser-default">
<li>Download the <a target="_blank" href="https://github.com/ToX82/logHappens/archive/refs/heads/master.zip">ZIP package</a></li>
<li>Clone it from <a target="_blank" href="https://github.com/ToX82/logHappens">GitHub</a></li>
</ul>
</li>
<li>Place LogHappens in a folder executable by apache or ngnix</li>
<li>Duplicate the file "config.default.json" to "config.json"</li>
<li>Open your new "config.json" and edit as you need. You can add new log files by simply adding new records there.</li>
<li>Open the browser to the destination you have installed LogHappens</li>
<li>Enjoy!</li>
</ul>
</div>
</div>
</div>
</div>
<footer class="page-footer">
<div class="container">
<div class="row">
<div class="col l6 s12">
<h5 class="white-text">logHappens</h5>
<div class="grey-text text-lighten-4">
I hope that you will try and enjoy logHappens as much as I did writing it.
<br>
If so, please consider to make a small donation using the "Sponsor" button in the
<a href='https://github.com/ToX82/logHappens'>logHappens repository</a>, as a token of
your appreciation and to help me keep this up :)
</div>
</div>
<div class="col l4 offset-l2 s12">
<h5 class="white-text">Links</h5>
<ul>
<li><a class="grey-text text-lighten-3" href="https://github.com/ToX82/loghappens">GitHub repository</a></li>
<li><a class="grey-text text-lighten-3" href="https://www.linkedin.com/in/emanueletoscano/en">My Linkedin page</a></li>
</ul>
</div>
</div>
</div>
</footer>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/materialize.min.js"></script>
<script>
$(document).ready(function() {
$('.tabs').tabs();
$('.collapsible').collapsible();
$('.materialbox').materialbox();
$('.tooltipped').tooltip();
$(".tab a").on('click', function() {
window.location.hash = $(this).attr('href');
});
});
</script>
</body>
</html>