# How to make the Trainer log custom quantities?

**URL:** <https://discuss.huggingface.co/t/how-to-make-the-trainer-log-custom-quantities/41616>\
**Category:** 🤗Transformers\
**Created:** [May 31, 2023, 12:05pm UTC](https://discuss.huggingface.co/t/how-to-make-the-trainer-log-custom-quantities/41616 "2023-05-31T12:05:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![StackSmasher](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@StackSmasher](https://discuss.huggingface.co/u/StackSmasher)\
**Post date:** [May 31, 2023, 12:05pm UTC](https://discuss.huggingface.co/t/how-to-make-the-trainer-log-custom-quantities/41616/1 "2023-05-31T12:05:46Z")

</div>

Currently, the trainer seems to only record “loss”. Can we add more things that the trainer can log every `logging_steps` ? For example, I want to add gradient norm and few components of the custom loss I am using. How can I achieve this ?

Thanks in advanced
