-
EFK(ElasticSearch, fluentd, kibana), fluent-logger, springbootWEB/BACK 2025. 1. 15. 16:24반응형
그중에 fluentd를 윈도우에서 테스트 진행
goal : springboot2.7버전의 로그를 fluentd에서 확인
1. fluentd (플루언트 디) install
https://docs.fluentd.org/installation/install-by-msi
여기서 다운로드하고, fluentd.conf파일을 관리자권한으로 열어서 아래와같이 수정
<source> @type forward port 24224 bind 0.0.0.0 </source> <match **> @type stdout <format> @type json </format> </match>
2. springboot프로젝트의 pom.xml에 추가
<!-- https://mvnrepository.com/artifact/org.fluentd/fluent-logger --> <dependency> <groupId>org.fluentd</groupId> <artifactId>fluent-logger</artifactId> <version>0.3.4</version> </dependency>
3. application.properties에 추가
fluentd.host=localhost fluentd.port=24224
4. 관리자 권한으로 실행 후 fluentd 입력
4. 테스트
플젝에서 이와같이 작성
private static final FluentLogger loggerf = FluentLogger.getLogger("fluentd"); loggerf.log("test", "message", "Hello Fluentd");
console에서 확인
반응형'WEB > BACK' 카테고리의 다른 글
EFK (Elasticsearch, Fluentd, Kibana) (1) 2025.01.13 java calendar 날짜 계산(만료일 계산) (0) 2025.01.13 aws marketplace 연동 , aws credential 자격증명 설정,entitlements (0) 2024.11.29 query DSL 적용방법정리 & 자동 빌드 (0) 2024.11.29 프로젝트에 등록된 모든 oauth-clients 확인 API (0) 2024.11.29