강의

멘토링

로드맵

BEST
Programming

/

Web Development

Log Management Required for Developers

From log recording to collection and utilization, it covers the whole cycle.

(4.9) 62 reviews

1,017 learners

  • foo
3시간 만에 완강할 수 있는 강의 ⏰
이론 실습 모두
로그
log
Elasticsearch
logback
Logstash
Kibana
Spring Boot

Reviews from Early Learners

What you will learn!

  • Tips on what to log in applications.

  • Log Collection and Utilization Using ELK Stack

Are you still connecting to your server via SSH to view logs?

The method of logging directly into the server and checking the log file has several limitations. First, if you operate multiple servers, you have to access each server individually, which takes a lot of time and makes management complicated. Second, it is difficult to monitor logs in real time, making it difficult to respond quickly when a problem occurs. In addition, since log search and analysis are done manually, important information may be missed or it may take time to find errors. This method is especially inefficient in large-scale distributed systems, and can have a negative impact on the stability of the service and the user experience. Therefore, it is necessary to introduce a more systematic and automated log management method.

Log management is an important tool that goes beyond simply recording errors, but also understands the heartbeat of an application and predicts problems in advance. Especially in modern complex distributed systems, log management can determine the stability of services and user experience. In practice, the ability to quickly identify and resolve problems amidst a large amount of data and traffic is essential.

In this lecture, "Log Management for Developers," we will cover various strategies and tips that can be applied immediately in practice, from what logs to leave to how to utilize logs. You will systematically learn the entire process of log management from beginning to end, and experience firsthand how logs can be utilized in service operation.

First, we will cover the basic knowledge of logs. In this lecture, you will understand the basic concept and importance of logs, learn what information should be logged, how to use logs in exception handling, and learn the meaning and utilization of various log levels. Through this, you will recognize the importance of logs in the development process and learn how to leave logs effectively.

Secondly, we will cover Logback configuration. We will explain the basic concepts of Logback and its connection with Slf4j, and learn how to write an actual Logback configuration file through practice. You can learn the configuration techniques required in practice, such as separating logs into multiple files using various Appenders, managing logs by day, and compressing log files. You will also learn how to implement flexible log management by applying different Logback settings for each development environment.

Next, we will introduce the importance of log collection and how to use Elasticsearch and Logstash, which are tools for this. We will practice installing Elasticsearch and Logstash using Docker and forwarding logs to Elasticsearch through LogstashAppender. We will learn how to efficiently collect and manage logs in a distributed environment and also learn how to effectively check the logs collected in Elasticsearch.

Finally, we will cover log visualization and utilization methods. You will learn how to visualize log data using Kibana and monitor logs in real time through a dashboard. You will learn how to add service and host information to log data to improve the readability of logs and how to build a system that can respond quickly when errors occur through alarm settings. You will also learn how to receive alarms through Slack in conjunction with Jenkins to build a log monitoring environment that can be used immediately in practice.

This course provides essential content for developers and engineers who want to systematically learn from the basics of log management to advanced settings. It will be of great help to anyone who wants to improve the stability of the system through effective log management and develop the ability to respond quickly when problems occur.


Example Logback configuration file

< configuration > < property name = "LOG_FILE" value = "application.log" /> < appender name = "LOGSTASH" class = "net.logstash.logback.appender.LogstashTcpSocketAppender" > < destination > localhost:5044 destination > < encoder class = "net.logstash.logback.encoder.LogstashEncoder" /> appender > < appender name = "CONSOLE" class = "ch.qos.logback.core.ConsoleAppender" > < encoder > < pattern > %d{yyyy-MM-dd HH:mm:ss} %-5level [%thread] %logger{36} - %msg%n pattern > encoder > appender > < appender name = "FILE" class = "ch.qos.logback.core.rolling.RollingFileAppender" > < file > ${LOG_FILE} file > < rollingPolicy class = "ch.qos.logback.core.rolling.TimeBasedRollingPolicy" > < fileNamePattern > application.%d{yyyy-MM-dd_HH-mm}.log.gz fileNamePattern > < maxHistory > 5 maxHistory > rollingPolicy > < encoder > < pattern > %d{yyyy-MM-dd HH:mm:ss} %-5level [%thread] %logger{36} - %msg%n pattern > encoder > appender > < root level = "trace" > < appender-ref ref = "CONSOLE" /> < appender-ref ref = "FILE" /> < appender-ref ref = "LOGSTASH" /> root > configuration >


Log visualization example



Learn about these things

Understanding Log Basics

Learn what information to log, the role of logs in exception handling, and the meaning and utilization of various log levels to lay the foundation for effective log writing.

Logback

We systematically cover everything from basic settings to utilization of Logback. Through linkage with Slf4j, you will learn how to efficiently manage logs, and how to separate logs into multiple files or manage them on a daily basis by utilizing various Appenders.

ELK Stack

Learn how to collect and analyze logs using the ELK stack consisting of Elasticsearch, Logstash, and Kibana. Learn how to install using Docker, forward logs to Elasticsearch via LogstashAppender, and visualize and monitor log data in real time using Kibana.

Things to note before taking the class

Practice environment

  • Operating System and Version (OS): Windows 10

  • Tools used: Intellij Community 2023.2, Google Chrome

Learning Materials

Player Knowledge and Notes

  • This lecture is based on Java and Spring Boot applications. However, since the main content of the lecture is focused on explaining the concept of logs rather than the code level, you will be able to take the lecture without any problems even if you practice with other languages and frameworks, except for the 'Logback Settings' section.

  • We will not be uploading it to the server and conducting the practice, but will be conducting the practice only in the local development environment. Although the practice will be conducted locally, we will guide you on how to change the settings when uploading it to the actual server, so you can set it up in a similar way when uploading it to the server.

  • If you have any questions while taking the course, please leave a question. I will update it if there is anything that needs to be updated.

Recommended for
these people

Who is this course right for?

  • Someone who wants to know what logs to record in an application.

  • A person tired of SSHing into servers every time to check logs.

Need to know before starting?

  • Spring Boot application development experience

Hello
This is

5,457

Learners

252

Reviews

116

Answers

4.9

Rating

9

Courses

안녕하세요.

멘토링을 하면서 주니어 개발자들이 어려워 하는 개념들에 대해 어떻게 하면 쉽게 전달할 수 있을지에 대해서 많은 고민을 하고 있는 푸(Foo)라고 합니다.

잘 부탁 드리겠습니다.


이력

  • 2019. 08 ~ 현재 : 카카오 자바 백엔드 개발자

  • 2021. 08 ~ 현재 : programmers 백엔드 데브코스 멘토

  • 2021. 12 ~ 현재 : F-Lab 자바 백엔드 멘토

 

  • 이것이 취업을 위한 백엔드 개발이다 with 자바(링크)

 

기타 이력 및 타 플랫폼 강의들은 아래 GitHub 링크에서 확인할 수 있습니다.

GitHub - https://github.com/lleellee0

Curriculum

All

17 lectures ∙ (3hr 27min)

Published: 
Last updated: 

Reviews

All

62 reviews

4.9

62 reviews

  • Sang Do Park님의 프로필 이미지
    Sang Do Park

    Reviews 17

    Average Rating 4.8

    5

    100% enrolled

    3시간 정도로 머리 식히기 딱 좋은 시간이라 주말에 교양을 듣는 기분으로 보려고 수강을 시작했습니다. ^^ 주니어 시절에 log4j, logback, slf4j 구분도 힘들고 어려워 설정하며 고생했던 기억이 떠올라 많은 개발자가 보면 좋겠다는 생각에 구매해서 봤습니다. 시행착오를 많이 겪을 만한 내용을 이렇게 잘 정리해서 활용하고 모니터링 단계까지 스토리 방식으로 설명해주니 각각을 설명하는 다른 강의보다 몰입도가 높았습니다. 마치 사수의 경험을 배우는 주니어의 입장으로 본다 생각하고 중간 중간 나오는 개발 팁을 보다보니 3시간이 훌쩍 지나가더군요 .. 개발을 시작하신 분 ~ 모두 보세요 두 번 보세요 ^^ 로그는 가끔 여러분의 생명줄을 지켜줍니다. ( 가끔 끊기도 하지만 ... )

    • 이준형(Foo)
      Instructor

      Sang Do Park님 정성스런 수강평 감사합니다! 강의 소개글보다 훨씬 강의 강점을 잘 어필해주신 것 같네요 ㅎㅎㅎㅎ 강의 잘 들어주셔서 정말 감사합니다!! 적어주신 내용들도 다른분들께 많이 도움이 될 것 같습니다~

  • 요니님의 프로필 이미지
    요니

    Reviews 12

    Average Rating 5.0

    Edited

    5

    100% enrolled

    강의 너무 잘 들었습니다! logback, @Sl4jf에 대해 잘 모르고 쓰고있었는데 이제라도 개념에대해 알게되었습니다! 그러나 해당 강의의 경우 단순 원리나 지식에서 끝나지 않고 로그를 가공해보고, CS 대응등을 목적으로 로그를 다뤄본 경험이 있다면 정말 공감하면서 들을 수 있는 포인트가 많았습니다 그래서 굉장히 고개를 끄덕이면서 강의를 들었던거 같습니다 아무쪼록 너무 큰 도움이 되었고, 더 다양한 주제에 대해 강의를 찍어주셨으면 하는 바램입니다 ㅎㅎ (혹은 여러 기술이 집약된 , 특정 도메인 전체에 대한 강의라면 더 좋을것 같습니다)

    • 이준형(Foo)
      Instructor

      요니님 강의 잘 들어주셔서 감사합니다! 강의 들으면서 좋아던 점들 이야기해주셔서 좋네요. :) 말씀하신 다양한 강의는 최근 오픈한 강의 ( https://inf.run/XHEvJ )도 해당될 것 같고, 다른 주제들로도 강의 만들어보겠습니다! 감사합니다~!

  • smh1205님의 프로필 이미지
    smh1205

    Reviews 2

    Average Rating 5.0

    5

    100% enrolled

    로그 관리를 더 적극적으로 할 수 있을 것 같습니다.

    • 올막곧낼막님의 프로필 이미지
      올막곧낼막

      Reviews 22

      Average Rating 3.8

      3

      35% enrolled

      • 떨스티님의 프로필 이미지
        떨스티

        Reviews 3

        Average Rating 4.7

        5

        41% enrolled

        • 이준형(Foo)
          Instructor

          떨스티님 수강평 남겨주셔서 감사합니다!!

      $23.10

      foo's other courses

      Check out other courses by the instructor!

      Similar courses

      Explore other courses in the same field!