# Logging from \`view\`

**URL:** <https://discourse.elm-lang.org/t/logging-from-view/8567>\
**Category:** Show and Tell\
**Created:** [August 11, 2022, 7:01pm UTC](https://discourse.elm-lang.org/t/logging-from-view/8567 "2022-08-11T19:01:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhbrown](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/jhbrown/32/3553_2.png) [@jhbrown](https://discourse.elm-lang.org/u/jhbrown)\
**Post date:** [August 11, 2022, 7:01pm UTC](https://discourse.elm-lang.org/t/logging-from-view/8567/1 "2022-08-11T19:01:07Z")

</div>

Sometimes you (a) only figure out something’s wrong in `view`, and (b) don’t want to use `Debug.log` because it’s in production. Here’s a quick hack to demonstrate how one might log from an Elm view function using a custom element. Hopefully it will be helpful to someone, someday.

> **[GitHub - jhbrown94/experimental-elm-viewlogger](https://github.com/jhbrown94/experimental-elm-viewlogger)**
>
> Contribute to jhbrown94/experimental-elm-viewlogger development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)\
**Post date:** [August 21, 2022, 7:01pm UTC](https://discourse.elm-lang.org/t/logging-from-view/8567/2 "2022-08-21T19:01:21Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
