사용자 도구

사이트 도구


linux:syslog

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
linux:syslog [2021/12/14 16:11]
kwon37xi
linux:syslog [2023/05/09 17:07] (현재)
kwon37xi [shell 에서 syslog 출력]
줄 1: 줄 1:
 ====== Linux syslog ====== ====== Linux syslog ======
   * [[https://system-monitoring.readthedocs.io/en/latest/log.html|로그 (syslog) — System monitoring 0.1 documentation]]   * [[https://system-monitoring.readthedocs.io/en/latest/log.html|로그 (syslog) — System monitoring 0.1 documentation]]
 +  * [[https://man7.org/linux/man-pages/man1/logger.1.html|logger(1) - Linux manual page]]
  
 +===== 기본 옵션 =====
 +  * ''-i'' : logger PID 출력
 +  * ''-t'' / ''%%--tag=문자열%%'' : 기본값은 실행하는 username. 태그를 통해서 로그에 일관된 prefix 를 붙일 수 있다.
 ===== shell 에서 syslog 출력 ===== ===== shell 에서 syslog 출력 =====
   * [[https://man7.org/linux/man-pages/man1/logger.1.html|logger(1) - Linux manual page]]   * [[https://man7.org/linux/man-pages/man1/logger.1.html|logger(1) - Linux manual page]]
줄 8: 줄 12:
  
 <code sh> <code sh>
-logger "메시지"+logger -i -t "[작업명]" "메시지"
  
 # /var/log/syslog 파일을 보면 메시지가 남는다. # /var/log/syslog 파일을 보면 메시지가 남는다.
linux/syslog.1639465904.txt.gz · 마지막으로 수정됨: 2021/12/14 16:11 저자 kwon37xi