Skip to Content
자바 개발자를 위한 데브옵스 툴
book

자바 개발자를 위한 데브옵스 툴

by 스티븐 친, 멜리사 맥케이, 익스헬 루이츠, 바루크 사도구르스키, 정병열
April 2023
Beginner to intermediate
396 pages
8h 23m
Korean
Hanbit Media, Inc.
Content preview from 자바 개발자를 위한 데브옵스 툴
315
8
장
개발자와 배포
8.4.2 8.4.2
로깅로깅
로깅은 개발자가 자바 애플리케이션 수준에서 예외 사항을 기록할 때 사용하는 툴이다. 로그는
메트릭의 보완재로 활용할 수 있으며 부가 콘텍스트 정보를 담고 있어 활용 가치가 높다. 로그
기록 형식은 일반 텍스트,
JSON
및
XML
, 바이너리 등 크게 세가지로 나뉜다.
자바 언어는 내장 로그 라이브러리가 있다. 그러나
SLF4J
Simple
Logging
Facade
for
Java
38
, 아파치
Log4j
2
39
등의 로깅 프레임워크를 사용하면 더 편리하게 로그를 다룰 수 있다. 다음은 로그를
기록하고 처리할 때 참고할 만한 권장 사항들이다.
●
로깅은 보수적으로 접근해야 한다. 전체 시스템 중 로깅 범위를 한정하고 특정 기능의 세부 정보만 기록
한다.
●
자신뿐만 아니라 향후 동료들이 문제를 해결할 때 참고하도록 로그 메시지에 의미 있는 정보를 기록
한다.
●
로그 수준
level
을 정확하게 구별한다. 세분화된 정보에서 직관을 얻기 위한
TRACE
, 문제 해결에 필요한
정보가 담긴
DEBUG
, 일반적인 정보를 나타내는
INFO
, 조치할 지점을 가리키는
WARN
과
ERROR
등을 상황에 맞게 선택한다.
●
적합한 로그 수준이 활성화됐는지 확인하고 가드
guard
구문이나 또는 람다 표현식으로 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

쿠버네티스를 활용한 클라우드 네이티브 데브옵스

쿠버네티스를 활용한 클라우드 네이티브 데브옵스

최경현, 저스틴 도밍거스, 존 어런들
클라우드 네이티브 애플리케이션 디자인 패턴

클라우드 네이티브 애플리케이션 디자인 패턴

카순 인드라시리, 스리스칸다라자 수호티얀
클라우드 엔지니어를 위한 97가지 조언

클라우드 엔지니어를 위한 97가지 조언

Emily Freeman, Nathen Harvey, 정기훈(Jung Ki Hun)

Publisher Resources

ISBN: 9791169210935