Slide 1

Slide 1 text

Dr. Javier Gonzalez-Sanchez [email protected] www.javiergs.info o ffi ce: 14 -227 CSC 305 Individual Software Design and Development Lecture 24. Logging to the Cloud

Slide 2

Slide 2 text

Announcements 2 * Final Exam December 6 (a review will be run before) * Final Project Due by December 11

Slide 3

Slide 3 text

Previously

Slide 4

Slide 4 text

Maven File and Directories 4

Slide 5

Slide 5 text

Jsoup | Parser for HTML 5 https://github.com/CSC3100/Tool-Maven

Slide 6

Slide 6 text

JavaParser | Parser for Java Source Code 6 https://github.com/CSC3100/Tool-Maven

Slide 7

Slide 7 text

JFreeChart | Appealing charts 7 https://github.com/CSC3100/Tool-Maven

Slide 8

Slide 8 text

Weka | Machine Learning 8 https://github.com/CSC3100/Tool-Maven

Slide 9

Slide 9 text

Logging

Slide 10

Slide 10 text

Problem 10

Slide 11

Slide 11 text

Problem 11

Slide 12

Slide 12 text

Bad Idea System.out.println 12 Messages

Slide 13

Slide 13 text

We want this 13 message 01 message 02 message 03 message 04 message 05 trace() debug() info () warn () error() Logger 13

Slide 14

Slide 14 text

Logger 14 Use Loggers into your Final Project At least to Console!

Slide 15

Slide 15 text

SLF4J Logback | Add the dependency 15 https://github.com/CSC3100/Tool-Logging

Slide 16

Slide 16 text

SLF4J Logback | Logging 16 https://github.com/CSC3100/Tool-Logging

Slide 17

Slide 17 text

SLF4J Logback | Logging 17 https://github.com/CSC3100/Tool-Logging

Slide 18

Slide 18 text

Maven File and Directories 18

Slide 19

Slide 19 text

ConsoleAppender 19 message 01 message 02 message 03 message 04 message 05 trace() debug() info () warn () error() Logger 19 Appender

Slide 20

Slide 20 text

src/main/resources/logback.xml 20 https://github.com/CSC3100/Tool-Logging

Slide 21

Slide 21 text

SLF4J Logback | Logging 21

Slide 22

Slide 22 text

Next 22 trace() debug() info () warn () error() message 01 message 02 message 03 message 04 message 05 Logger Appender Appender

Slide 23

Slide 23 text

src/main/resources/logback.xml 23 https://github.com/CSC3100/Tool-Logging

Slide 24

Slide 24 text

SLF4J Logback | Logging 24

Slide 25

Slide 25 text

Cloud-Based Log Management

Slide 26

Slide 26 text

Next 26 trace() debug() info () warn () error() message 01 message 02 message 03 message 04 message 05 Logger Appender

Slide 27

Slide 27 text

Cloud-Base Log Management • Cloud-b a sed log m a n a gement refers to the pr a ctice of collecting, storing, a n a lyzing, a nd m a n a ging log d a t a using cloud services. • This a ppro a ch lever a ges cloud computing to h a ndle the v a st a mounts of log d a t a 27

Slide 28

Slide 28 text

betterstack.com/logs 28

Slide 29

Slide 29 text

We need keys 29 String key = "XYZabc123259#$%#$Fcaskjhdux_2342445Calp";

Slide 30

Slide 30 text

betterstack.com/logs 30

Slide 31

Slide 31 text

betterstack.com/logs 31 WE6x9ya1dfMwRTouP9DEBmg

Slide 32

Slide 32 text

HttpAppender Our very own creation Just for fun

Slide 33

Slide 33 text

SLF4J Logback | Add the dependency 33 Just for JSON Support https://github.com/CSC3100/Tool-Logging

Slide 34

Slide 34 text

src/main/resources/logback.xml 34 WE6x9ya1dfMwRTouP9DEB https://github.com/CSC3100/Tool-Logging

Slide 35

Slide 35 text

javiergs.HttpAppender (Part 1/4) 35 https://github.com/CSC3100/Tool-Logging

Slide 36

Slide 36 text

javiergs.HttpAppender (Part 2/4) 36 https://github.com/CSC3100/Tool-Logging

Slide 37

Slide 37 text

javiergs.HttpAppender (Part 3/4) 37 https://github.com/CSC3100/Tool-Logging

Slide 38

Slide 38 text

javiergs.HttpAppender (Part 4/4) 38 https://github.com/CSC3100/Tool-Logging

Slide 39

Slide 39 text

logs.betterstack.com 39

Slide 40

Slide 40 text

Full Solution 40 trace() debug() info () warn () error() message 01 message 02 message 03 message 04 message 05 Logger Appender Appender Appender

Slide 41

Slide 41 text

Questions 41

Slide 42

Slide 42 text

Lab

Slide 43

Slide 43 text

Logger 43 a) Create an account b) Geet my Code from GitHub c) Play and Learn Nothing to submit today. Work on your Final Project Happy Thanksgiving 🍂🎃🦃

Slide 44

Slide 44 text

CSC 305 Individual Software Design and Development Javier Gonzalez-Sanchez, Ph.D. [email protected] Summer 2024 Copyright. These slides can only be used as study material for the class CSC305 at Cal Poly. They cannot be distributed or used for another purpose.