# No Logging available in ComponentSettings?

**URL:** <https://forum.opentap.io/t/no-logging-available-in-componentsettings/203>\
**Category:** Technical\
**Created:** [January 16, 2021, 11:14am UTC](https://forum.opentap.io/t/no-logging-available-in-componentsettings/203 "2021-01-16T11:14:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tim.Cyr](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@Tim.Cyr](https://forum.opentap.io/u/Tim.Cyr)\
**Post date:** [January 16, 2021, 11:14am UTC](https://forum.opentap.io/t/no-logging-available-in-componentsettings/203/1 "2021-01-16T11:14:09Z")

</div>

There is a default log object in the standard Dut/TestStep/and Instrument classes, but there does not seem to be one in the ComponentSettings class. How should I configure the TraceSource?

---

<div class="post-metadata">

**Author:** ![brennen\_direnzo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opentap.io/brennen_direnzo/32/6_2.png) [@brennen\_direnzo](https://forum.opentap.io/u/brennen_direnzo)\
**Post date:** [January 16, 2021, 3:25pm UTC](https://forum.opentap.io/t/no-logging-available-in-componentsettings/203/2 "2021-01-16T15:25:23Z")

</div>

You can create a new TraceSource object that attaches to your ComponentSettings

> <https://gitlab.com/OpenTAP/opentap/-/blob/master/sdk/Examples/PluginDevelopment/TestSteps/Step%20Execution/LogMessages.cs#L27>

---

<div class="post-metadata">

**Author:** ![Tim.Cyr](https://avatars.discourse-cdn.com/v4/letter/t/3d9bf3/32.png) [@Tim.Cyr](https://forum.opentap.io/u/Tim.Cyr)\
**Post date:** [January 19, 2021, 4:20pm UTC](https://forum.opentap.io/t/no-logging-available-in-componentsettings/203/3 "2021-01-19T16:20:36Z")

</div>

Thanks for the example link. I know that this can identify the source object that originated the log message, but will it still be written to the same file with all of the other logs?

---

<div class="post-metadata">

**Author:** ![brennen\_direnzo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opentap.io/brennen_direnzo/32/6_2.png) [@brennen\_direnzo](https://forum.opentap.io/u/brennen_direnzo)\
**Post date:** [January 19, 2021, 4:42pm UTC](https://forum.opentap.io/t/no-logging-available-in-componentsettings/203/4 "2021-01-19T16:42:13Z")

</div>

They will all be written to the same Log file, the Source sets the 3rd column (TestPlan, TestStep, PackageManager, etc).

---

<div class="post-metadata">

**Author:** ![david-wsd](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opentap.io/david-wsd/32/204_2.png) [@david-wsd](https://forum.opentap.io/u/david-wsd)\
**Post date:** [November 23, 2021, 1:22am UTC](https://forum.opentap.io/t/no-logging-available-in-componentsettings/203/5 "2021-11-23T01:22:27Z")

</div>

This post was perfect, as just now I needed to add a trace source. Thanks @Tim.Cyr and @brennen_direnzo!
