# 잘림 없이 전체 로그 세부 정보를 보는 방법

**URL:** <https://meta.discourse.org/t/how-to-see-full-log-detail-not-truncated/173237>\
**Category:** Product Support\
**Created:** [12월 14, 2020, 12:18오후 UTC](https://meta.discourse.org/t/how-to-see-full-log-detail-not-truncated/173237 "2020-12-14T12:18:57Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)\
**Post date:** [12월 15, 2020, 8:56오전 UTC](https://meta.discourse.org/t/how-to-see-full-log-detail-not-truncated/173237/4 "2020-12-15T08:56:46Z")

</div>

> [@Andro](#):
>
> 메일 관련 Discourse 로그를 어디서 찾을 수 있는지 모르겠습니다.

안녕하세요, @Andro

Discourse에서는 Rails Action Mailer가 메일을 Sidekiq 작업으로 예약된 후 전송합니다.

보통 작업 예외(Job exception) 오류는 Rails production 로그에 기록됩니다. 예를 들어 다음과 같습니다.

```plaintext
linux# docker exec -it your-app bash
your-app:/# cd /shared/log/rails

your-app:/shared/log/rails# grep -i SMTP *

production.log-20201215:Job exception: 454 4.7.0 Cannot authenticate due to temporary system problem. Try again later. m7sm3825233oou.11 - gsmtp

production.log-20201215:Job exception: 454 4.7.0 Cannot authenticate due to temporary system problem. Try again later. 63sm3561399otx.2 - gsmtp

production.log-20201215:Job exception: 454 4.7.0 Cannot authenticate due to temporary system problem. Try again later. z63sm4258403otb.20 - gsmtp

production.log-20201215:Job exception: 454 4.7.0 Cannot authenticate due to temporary system problem. Try again later. q18sm3815880ood.35 - gsmtp

production.log-20201215:Job exception: 454 4.7.0 Cannot authenticate due to temporary system problem. Try again later. h2sm4265076otn.15 - gsmtp

production.log-20201215:Job exception: 454 4.7.0 Cannot authenticate due to temporary system problem. Try again later. y84sm4346372oig.36 - gsmtp

production.log-20201215:Job exception: 454 4.7.0 Cannot authenticate due to temporary system problem. Try again later. 8sm4343514oii.45 - gsmtp

production.log-20201215:Job exception: 454 4.7.0 Cannot authenticate due to temporary system problem. Try again later. t18sm722516otc.64 - gsmtp

production.log-20201215:Job exception: 454 4.7.0 Cannot authenticate due to temporary system problem. Try again later. j22sm1840062otp.45 - gsmtp

```

따라서 위와 같이 Rails production 로그에서 몇 가지 단서를 찾을 수 있을 것입니다.

감사합니다. 도움이 되길 바랍니다.

PS: 당신의 사용 사례에는 유용하지 않을 수도 있지만, 확인해 볼 수 있는 또 다른 작은 사항은 Rails 콘솔에서 다음을 실행하는 것입니다:

```plaintext
EmailLog.where(bounced:true).count

```

또는 더 간단하게:

```plaintext
EmailLog.bounced.count

```

또한, 더 많은 로깅이 필요하면 Rails를 설정하여 더 많은 메일러 정보를 기록할 수 있다는 것을 잊고 있었습니다:

> config.action\_mailer에는 사용할 수 있는 설정이 여러 가지 있습니다:

> config.action\_mailer.logger는 Log4r 인터페이스나 기본 Ruby Logger 클래스의 인터페이스에 부합하는 로거를 받아, Action Mailer에서 정보를 기록하는 데 사용됩니다. 로깅을 비활성화하려면 nil로 설정합니다.

Discourse의 기본 설정(OOTB)에서는 이것이 `nil`로 설정되어 있어 로깅이 되지 않습니다:

```plaintext
[5] pry(main)> Rails.application.config.action_mailer.logger
=> nil

```

예를 들어, `3.10 Configuring Action Mailer` 섹션을 참고하세요.

> **[Configuring Rails Applications — Ruby on Rails Guides](https://guides.rubyonrails.org/v4.0.1/configuring.html)**

---

_[View the full topic](https://meta.discourse.org/t/how-to-see-full-log-detail-not-truncated/173237)._
