====== Gradle Logging ====== * [[http://www.gradle.org/docs/current/userguide/logging.html|Gradle Logging]] * 기본 로그 레벨 - ERROR Error messages - QUIET Important information messages - WARNING Warning messages - LIFECYCLE Progress information messages - INFO Information messages - DEBUG Debug messages * 명령행 지정 * 기본 : LIFECYCLE * ''-q'' or ''%%--%%quiet'' : QUIET * ''-i'' or ''%%--%%info'' : INFO * ''-d'' or ''%%--%%debug'' : DEBUG ===== 빌드 스크립트에서 로그 남기기 ===== ''logger'' 객체가 존재하므로 바로 사용하면 된다. logger.quiet('An info log message which is always logged.') logger.error('An error log message.') logger.warn('A warning log message.') logger.lifecycle('A lifecycle info log message.') logger.info('An info log message.') logger.debug('A debug log message.') logger.trace('A trace log message.') ===== 외부 툴과 라이브러리 로그 ===== * Gradle은 Ant, Ivy 등의 로그를 Gradle 로깅으로 변환한다. * ''System.out''은 QUIET로 변환된다. * ''System.err''은 ERROR로 변환된다. * 표준 아웃의 로그 레벨 변경 logging.captureStandardOutput LogLevel.INFO println 'A message which is logged at INFO level'