-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSyntax_-_578-LOGGING.srt
2144 lines (1608 loc) · 42.9 KB
/
Syntax_-_578-LOGGING.srt
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
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1
00:00:01,079 --> 00:00:04,169
Announcer: Monday, Monday Monday open wide dev
2
00:00:04,169 --> 00:00:07,709
fans yet ready to stuff your face with JavaScript
3
00:00:07,709 --> 00:00:11,159
CSS loadmodule BBQ tip yet workflow breakdancing
4
00:00:11,309 --> 00:00:14,729
soft skill web development hasty Yes, the crazy
5
00:00:14,729 --> 00:00:17,999
Yes, the tasty web development traits coming in
6
00:00:17,999 --> 00:00:22,409
hot here is where Sarah CUDA, Bob and Scott El
7
00:00:22,409 --> 00:00:25,139
Toro long toilet ski.
8
00:00:26,640 --> 00:00:30,990
Scott Tolinski: Oh, welcome to syntax on this
9
00:00:31,020 --> 00:00:33,870
Monday hasty treat, we're going to be talking
10
00:00:33,900 --> 00:00:37,950
about logging. Logging is something that well, we
11
00:00:37,980 --> 00:00:41,100
sometimes do just to debug, and many times people
12
00:00:41,100 --> 00:00:43,860
overlook the usefulness of having really good
13
00:00:43,860 --> 00:00:46,710
logging within your application inside of both
14
00:00:46,710 --> 00:00:49,380
production and development environments. So my
15
00:00:49,380 --> 00:00:51,390
name is Scott Tolinksi. I'm a developer from
16
00:00:51,420 --> 00:00:55,530
Denver. And with me, as always, is Wes Bos
17
00:00:55,560 --> 00:01:02,220
Wes Bos: way weigh in. Not too much I have I've
18
00:01:02,220 --> 00:01:04,500
been sort of taking my like logging a little bit
19
00:01:04,500 --> 00:01:08,460
more seriously, in the last couple of months, just
20
00:01:08,460 --> 00:01:11,430
because I had some like Gremlins in my app that I
21
00:01:11,430 --> 00:01:14,520
couldn't figure out like, where it was coming from
22
00:01:14,520 --> 00:01:17,370
and what would even cause this request and
23
00:01:17,370 --> 00:01:19,110
whatnot. And like, I just didn't have enough
24
00:01:19,110 --> 00:01:22,350
insight into like, it wasn't errors, or crashing
25
00:01:22,350 --> 00:01:25,050
or anything, it was just like, couldn't figure it
26
00:01:25,050 --> 00:01:26,940
out, you know. So we'll talk about like, what that
27
00:01:26,940 --> 00:01:29,370
is. So I sort of went through and updated my
28
00:01:29,370 --> 00:01:32,130
logging. I'm still not like, some of the stuff in
29
00:01:32,130 --> 00:01:34,350
this episode where I talked about I'm not using
30
00:01:34,350 --> 00:01:36,810
it. I'm mostly still just a console logger. But
31
00:01:37,950 --> 00:01:41,550
we'll yeah, let's get on into it. Yeah. Let's talk
32
00:01:41,550 --> 00:01:45,240
about our sponsor today, which is Sentry, Sentry
33
00:01:45,240 --> 00:01:49,140
is the air and exception, they do so much more of
34
00:01:49,140 --> 00:01:52,050
that they do performance, they do pro filings, and
35
00:01:52,050 --> 00:01:56,010
now they are getting into session replay, which
36
00:01:56,010 --> 00:02:00,330
will allow you to literally see what the user had
37
00:02:00,330 --> 00:02:03,960
done in your application to to trace through
38
00:02:03,960 --> 00:02:05,850
what's going on. So it's actually kind of funny
39
00:02:05,850 --> 00:02:09,030
that we talk about logging, because a lot of the
40
00:02:09,030 --> 00:02:12,060
stuff that Sentry does makes it so that you don't
41
00:02:12,060 --> 00:02:14,430
necessarily have to piece together logs. And we'll
42
00:02:14,430 --> 00:02:16,800
talk about what the difference is between those
43
00:02:16,800 --> 00:02:20,280
types of things. But check it out at Sentry dot i
44
00:02:20,280 --> 00:02:22,950
o use coupon code tasty treat that is going to get
45
00:02:22,950 --> 00:02:25,020
you two months for free. Thank you Sentry for
46
00:02:25,020 --> 00:02:28,830
sponsoring sick. All right, let's get into it.
47
00:02:28,830 --> 00:02:31,230
What do you want to give us a start up? Like why
48
00:02:31,230 --> 00:02:33,420
and what is logging? Yeah, so
49
00:02:33,420 --> 00:02:34,680
Scott Tolinski: as you know, at its very most
50
00:02:34,680 --> 00:02:38,430
basic, everybody has probably tossed a console log
51
00:02:38,460 --> 00:02:41,580
into their code at some point to output something
52
00:02:41,580 --> 00:02:44,640
either on the client side log or your server side
53
00:02:44,640 --> 00:02:48,960
log. And these can be used primarily, you know, we
54
00:02:48,960 --> 00:02:51,000
often just throw it in for a quick debug or
55
00:02:51,000 --> 00:02:54,240
something like that. But you also probably have
56
00:02:54,240 --> 00:02:58,260
seen logging from other frameworks or other things
57
00:02:58,260 --> 00:03:01,020
that you've used, where you're automatically just
58
00:03:01,020 --> 00:03:03,360
getting some things coming in on your your console
59
00:03:03,360 --> 00:03:05,850
explaining what's happening, maybe at some given
60
00:03:05,850 --> 00:03:08,910
point, maybe it's explaining the requests that are
61
00:03:08,910 --> 00:03:11,790
coming in, maybe it's just saying, oh, you know, a
62
00:03:11,790 --> 00:03:14,220
message came in at this time or whatever. It
63
00:03:14,220 --> 00:03:16,980
depends on what system and what type of logging is
64
00:03:16,980 --> 00:03:19,350
enabled in this types of things. And in many, even
65
00:03:19,350 --> 00:03:21,990
like CMS has have, like baked in logging as well
66
00:03:22,020 --> 00:03:26,040
outside of the JavaScript context. But in at the
67
00:03:26,040 --> 00:03:28,380
end of the day logging is basically giving you
68
00:03:28,380 --> 00:03:33,120
visibility to some action that is happening on
69
00:03:33,120 --> 00:03:36,420
your server or your client, depending on how
70
00:03:36,420 --> 00:03:39,000
you're doing this. But it's very most basic. It's
71
00:03:39,000 --> 00:03:42,330
a console log. It's a I got here. But yeah, it's
72
00:03:42,330 --> 00:03:45,750
more complex. It's a, a get request was hit to
73
00:03:45,750 --> 00:03:49,230
this specific URL at this time. And it took this
74
00:03:49,230 --> 00:03:52,050
amount of seconds to resolve or did not resolve or
75
00:03:52,050 --> 00:03:52,620
whatever.
76
00:03:52,950 --> 00:03:55,650
Wes Bos: Why might you want to log something. Logs
77
00:03:55,650 --> 00:04:00,180
are often helpful as sort of a treasure trail to
78
00:04:00,570 --> 00:04:04,140
figuring out what happened if you need to,
79
00:04:04,380 --> 00:04:06,570
everywhere from just view the developer needing to
80
00:04:06,570 --> 00:04:08,970
figure out okay, well, that shouldn't have
81
00:04:08,970 --> 00:04:12,060
happened. Or I need to figure out why somebody
82
00:04:12,060 --> 00:04:15,660
specifically hit this URL with what data and it
83
00:04:15,660 --> 00:04:18,120
caused them something, you can log out that
84
00:04:18,120 --> 00:04:20,340
information, if you just want to see what
85
00:04:20,340 --> 00:04:23,340
endpoints are being hit with what specific data
86
00:04:23,340 --> 00:04:26,040
you can log that, or something just as simple as
87
00:04:26,040 --> 00:04:28,890
like an email was specifically sent. Well, we'll
88
00:04:28,890 --> 00:04:31,110
go a little bit more into the different types of
89
00:04:31,110 --> 00:04:34,050
logging. So it helps piecing together things helps
90
00:04:34,050 --> 00:04:37,230
us find ability. Worst case, I've certainly not
91
00:04:37,230 --> 00:04:39,660
had to do this before, thankfully, but I've heard
92
00:04:40,020 --> 00:04:44,820
of things crashing databases going down whatever.
93
00:04:44,820 --> 00:04:48,360
And often developers have to they don't have the
94
00:04:48,360 --> 00:04:51,420
data of like maybe 10,000 sales went through, they
95
00:04:51,420 --> 00:04:53,610
can sometimes piece that information back
96
00:04:53,610 --> 00:04:57,300
together, or at least the important bits via logs
97
00:04:57,300 --> 00:04:59,490
because they can parse out their logs and recreate
98
00:04:59,490 --> 00:05:00,900
that data in the database.
99
00:05:01,050 --> 00:05:03,330
Scott Tolinski: Yeah. And also, just to be clear
100
00:05:03,330 --> 00:05:06,480
logging is not just for debugging, but also just
101
00:05:06,480 --> 00:05:09,330
for general information and understanding of
102
00:05:09,330 --> 00:05:13,080
what's going on. Right. So, yeah, you say, how is
103
00:05:13,080 --> 00:05:15,450
this different than error handling? Because
104
00:05:15,930 --> 00:05:19,020
basically, in regards to that same bed, how is
105
00:05:19,020 --> 00:05:21,180
this different than just errors and what's going
106
00:05:21,180 --> 00:05:23,850
on in your application? Sometimes it's a little
107
00:05:23,850 --> 00:05:26,700
bit also, at the same time, more targeted and less
108
00:05:26,700 --> 00:05:30,060
targeted, because you can have less targeted info
109
00:05:30,270 --> 00:05:33,750
being logged, letting you know exactly what's
110
00:05:33,780 --> 00:05:36,570
happening around what are potential errors, but
111
00:05:36,570 --> 00:05:40,350
just what's happening in general. But also, you
112
00:05:40,350 --> 00:05:43,980
can have more targeted to situations where you
113
00:05:43,980 --> 00:05:46,350
think that there is going to be an error or could
114
00:05:46,350 --> 00:05:49,110
be an error to give you more context into what
115
00:05:49,110 --> 00:05:51,270
could be happening in that given instance?
116
00:05:51,360 --> 00:05:53,100
Wes Bos: Yeah, yeah, like I just, I just opened up
117
00:05:53,100 --> 00:05:56,580
my logs right now. And I'm seeing people, it's
118
00:05:56,580 --> 00:05:59,400
kind of interesting, you are seeing people go
119
00:05:59,400 --> 00:06:03,660
through the process of visiting the website,
120
00:06:04,560 --> 00:06:07,170
adding a course buying the course checking out
121
00:06:07,170 --> 00:06:10,110
adding a coupon, getting the email being sent,
122
00:06:10,950 --> 00:06:14,640
then the email being the link in the email being
123
00:06:14,640 --> 00:06:17,970
clicked an account being created. Somebody
124
00:06:17,970 --> 00:06:21,360
starting to view a specific video, and then
125
00:06:21,390 --> 00:06:23,910
progress on that video being you can see all of
126
00:06:23,910 --> 00:06:27,360
that in your console, as it goes through. And I
127
00:06:27,360 --> 00:06:31,590
specifically had an issue where people were going
128
00:06:31,590 --> 00:06:34,620
to have magic links in my email, and people were
129
00:06:34,620 --> 00:06:39,000
going to magic links. And the idea of the magic
130
00:06:39,000 --> 00:06:41,850
Link was always undefined. It was the correct
131
00:06:41,850 --> 00:06:44,010
magic link. And immediately after it was
132
00:06:44,010 --> 00:06:46,380
undefined, and I could not for the life of me
133
00:06:46,380 --> 00:06:49,650
figure out what was triggering this undefined
134
00:06:49,650 --> 00:06:52,230
request, you know, like, it's not an error. It
135
00:06:52,230 --> 00:06:54,600
actually it was causing no issues to anybody
136
00:06:54,600 --> 00:06:58,170
except there was an undefined request in my log,
137
00:06:58,170 --> 00:07:00,090
and I could not figure it out for Life Media.
138
00:07:00,090 --> 00:07:03,360
Finally, finally trace it, trace it down. And you
139
00:07:03,360 --> 00:07:07,530
know, what it was, what it was an image tag to
140
00:07:07,530 --> 00:07:11,010
end, the source of the image was undefined. And it
141
00:07:11,010 --> 00:07:14,130
was trying to just, I guess, when you have an
142
00:07:14,130 --> 00:07:17,760
image tag, it tries to request the current URL as
143
00:07:17,760 --> 00:07:21,390
the source. And that was triggering, because I had
144
00:07:21,600 --> 00:07:25,350
like a catch all path setup for the ID in the URL.
145
00:07:25,380 --> 00:07:27,990
It was, it was catching that one as well. And
146
00:07:27,990 --> 00:07:30,210
literally, the the image pass, so I went into my
147
00:07:30,210 --> 00:07:32,760
template, and I go, Oh, I had like a typo in my
148
00:07:32,760 --> 00:07:35,310
template. And I fixed the image tag and whatnot.
149
00:07:35,310 --> 00:07:38,220
But that was driving me crazy. And it was only
150
00:07:38,220 --> 00:07:43,020
until I added additional logging. To see like,
151
00:07:43,020 --> 00:07:45,930
okay, like, is somebody being malicious here? Is
152
00:07:45,930 --> 00:07:49,230
this coming from the same user? Is it like a
153
00:07:49,260 --> 00:07:51,660
browser extension, something like that, I had a
154
00:07:51,660 --> 00:07:53,400
whole bunch more log in, then I was like, Okay, I
155
00:07:53,400 --> 00:07:54,870
see what's happening here. And then I went through
156
00:07:54,900 --> 00:07:55,560
a template. And
157
00:07:56,879 --> 00:08:00,329
Scott Tolinski: it's funny. This just how much
158
00:08:00,329 --> 00:08:03,959
logs can both pollute and save your bacon
159
00:08:03,959 --> 00:08:05,879
sometimes, you know, sometimes, if there's too
160
00:08:05,879 --> 00:08:08,459
much logging too much noise, you can, you know,
161
00:08:08,729 --> 00:08:12,599
over certain things. But you know, part of what is
162
00:08:12,599 --> 00:08:15,269
good about having logging is that, you can often
163
00:08:15,269 --> 00:08:17,609
go ahead and paw through the logs in a more
164
00:08:17,609 --> 00:08:20,369
structured and organized way. So you know, too
165
00:08:20,369 --> 00:08:23,369
much information isn't necessarily a problem. So
166
00:08:23,399 --> 00:08:27,059
what should you log here? I'm going to tell you
167
00:08:27,059 --> 00:08:30,149
what we log. And then we can maybe talk a little
168
00:08:30,149 --> 00:08:32,879
about what you should log. But you know, I think
169
00:08:33,659 --> 00:08:36,209
personally, what I like to see in a log is I like
170
00:08:36,209 --> 00:08:39,929
to see, you know, what type of what is I'm talking
171
00:08:39,929 --> 00:08:42,809
like server side logging here specifically? Yeah,
172
00:08:42,809 --> 00:08:45,389
one like really important thing about log is the
173
00:08:45,389 --> 00:08:48,269
timecode, in which this thing happened. Because
174
00:08:48,269 --> 00:08:50,279
without having the time in which something
175
00:08:50,279 --> 00:08:53,219
happened, you going back and referencing it is
176
00:08:53,219 --> 00:08:55,199
kind of pointless, right? You'd say at some point,
177
00:08:55,199 --> 00:08:58,259
in some time this, this event happened. But if you
178
00:08:58,259 --> 00:09:01,379
knew when an event happened, specifically, maybe
179
00:09:01,379 --> 00:09:04,709
an error on your site or something happened,
180
00:09:04,709 --> 00:09:06,479
right, and you want to investigate, so you're
181
00:09:06,479 --> 00:09:09,569
piling into the logs, having that time code that
182
00:09:09,569 --> 00:09:11,669
says this happened at this time, really important
183
00:09:11,669 --> 00:09:14,609
to be able to nail down exactly when scope when
184
00:09:14,609 --> 00:09:19,919
that happened. You know, also, I like what type of
185
00:09:19,919 --> 00:09:23,549
request it was a get post put whatever. I like the
186
00:09:23,579 --> 00:09:27,689
path that was requested. I like the total time of
187
00:09:27,689 --> 00:09:30,599
the response. I like those types of things in my
188
00:09:30,599 --> 00:09:33,599
logs. I also like to know what type of log this
189
00:09:33,599 --> 00:09:37,619
is, is this an information log? Is it an error? Is
190
00:09:37,619 --> 00:09:40,709
it and these can things these things can be color
191
00:09:40,709 --> 00:09:44,489
coded accordingly, so that an error log could have
192
00:09:44,489 --> 00:09:46,889
a red error or something so that way when you're
193
00:09:46,889 --> 00:09:49,679
looking at your logs, the errors stand out in the
194
00:09:49,679 --> 00:09:52,169
information once kind of hide back or any of those
195
00:09:52,169 --> 00:09:52,919
types of things.
196
00:09:53,220 --> 00:09:56,550
Wes Bos: Oh, that's a good idea. I so I'm half
197
00:09:56,550 --> 00:09:58,680
excited to do this episode just so I can do a
198
00:09:58,680 --> 00:10:01,110
little bit of improving on mine. cuz maybe we
199
00:10:01,110 --> 00:10:03,360
should talk about that specifically, like, how do
200
00:10:03,360 --> 00:10:06,240
we log right now. So right now what I'm doing is I
201
00:10:06,240 --> 00:10:11,400
just had like different areas of the application.
202
00:10:11,400 --> 00:10:15,630
So whether it is a magic URL it whether it's a
203
00:10:15,630 --> 00:10:17,970
login, whether it's a progress update, whether
204
00:10:17,970 --> 00:10:20,640
it's somebody has invited somebody to their team
205
00:10:20,640 --> 00:10:23,160
account, so they can go in on it, whether somebody
206
00:10:23,160 --> 00:10:25,170
has changed their email, all that type of stuff.
207
00:10:25,170 --> 00:10:28,020
And I just basically have like a, an ID or a name
208
00:10:28,020 --> 00:10:30,240
for each one, like I put it in square brackets,
209
00:10:30,240 --> 00:10:33,510
just magic. And then I put some information along
210
00:10:33,510 --> 00:10:36,510
in there. So things like URL, maybe query
211
00:10:36,510 --> 00:10:39,120
parameters, maybe body parameters, if it's a form,
212
00:10:39,120 --> 00:10:44,280
submit other information about stuff that you
213
00:10:44,280 --> 00:10:47,070
specifically need you unfortunately, at least I
214
00:10:47,070 --> 00:10:49,230
don't think you can't log the entire request
215
00:10:49,230 --> 00:10:52,410
object, because that would be absolutely massive,
216
00:10:52,410 --> 00:10:56,130
and your logs will get pretty large quickly. But I
217
00:10:56,130 --> 00:10:57,960
think, I don't know, do people do that? Do they
218
00:10:57,960 --> 00:10:59,310
log the entire request?
219
00:10:59,460 --> 00:11:01,590
Unknown: I can imagine, that seems like way too
220
00:11:01,590 --> 00:11:04,590
much text for everything. That seems like that
221
00:11:04,590 --> 00:11:08,070
would never work in a large context, right? No,
222
00:11:08,070 --> 00:11:09,690
because you would be like,
223
00:11:09,720 --> 00:11:13,290
Wes Bos: I certainly have had, like log files,
224
00:11:13,290 --> 00:11:15,030
we'll talk about what to do with these log files.
225
00:11:15,030 --> 00:11:17,640
But I've had log files get into the gigs and gigs
226
00:11:17,640 --> 00:11:20,580
I've once very early on, when I was just logging
227
00:11:20,580 --> 00:11:25,020
to log files on my server, I could not figure out
228
00:11:25,020 --> 00:11:28,140
why every couple of weeks, the server would slow
229
00:11:28,140 --> 00:11:31,830
down until I rebooted it. And finally, I realized
230
00:11:31,830 --> 00:11:35,400
is because I was using forever, and forever will
231
00:11:35,430 --> 00:11:37,020
put your logs in a log file. And then when you
232
00:11:37,020 --> 00:11:38,970
restart it, I think it deletes it or something
233
00:11:38,970 --> 00:11:41,010
like that. And I was running out of space on my
234
00:11:41,010 --> 00:11:44,250
server. Yeah. And it was just getting slower and
235
00:11:44,250 --> 00:11:46,290
slower, because there's like not enough space to
236
00:11:46,290 --> 00:11:48,720
run things. And then when I cleared out the logs,
237
00:11:48,720 --> 00:11:50,760
they would go and that's why you have to have sort
238
00:11:50,760 --> 00:11:52,410
of a better approach for this type of stuff.
239
00:11:52,470 --> 00:11:54,480
Scott Tolinski: Yeah, I've certainly gotten the
240
00:11:54,510 --> 00:11:57,960
email that says your server space is limited.
241
00:11:58,500 --> 00:12:00,630
Because you're running out of space. And to only
242
00:12:00,630 --> 00:12:02,820
be like, Wait, how is that possible? Oh, wait, let
243
00:12:02,820 --> 00:12:05,010
me go check that law. Oh, boy. Yeah, big O logs.
244
00:12:05,010 --> 00:12:07,650
And if you're logging every request that way?
245
00:12:08,010 --> 00:12:10,380
Yeah, we often forget, as developers that like
246
00:12:10,800 --> 00:12:14,640
text is bytes. Eight, you're saving a lot of text
247
00:12:14,640 --> 00:12:17,010
or a lot of information. Yeah. And that's, it's
248
00:12:17,010 --> 00:12:21,300
pretty easy to rack up actual storage space of of
249
00:12:21,300 --> 00:12:23,430
things with just text just by writing a lot of
250
00:12:23,430 --> 00:12:23,880
text.