# Scheduled task logs to many times

**URL:** <https://forum.litium.com/t/scheduled-task-logs-to-many-times/1505>\
**Category:** Questions\
**Tags:** litium-7\
**Created:** [May 28, 2020, 1:02pm UTC](https://forum.litium.com/t/scheduled-task-logs-to-many-times/1505 "2020-05-28T13:02:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gonzalo](https://avatars.discourse-cdn.com/v4/letter/g/4bbf92/32.png) [@Gonzalo](https://forum.litium.com/u/Gonzalo)\
**Post date:** [May 28, 2020, 1:02pm UTC](https://forum.litium.com/t/scheduled-task-logs-to-many-times/1505/1 "2020-05-28T13:02:16Z")

</div>

When using ITask, it logs in eventLog “Task started” and “Task finished succeeded.” Because of our implementation it runs this task every 5 min, therefore it logs the message above every 5 min. Is there a way to remove this message, so it only logs error and not info.  
Or log info in a separated file? if so, how is it done?

Thanks in advanced.  
Litium version: Litium 7.2

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [May 28, 2020, 1:25pm UTC](https://forum.litium.com/t/scheduled-task-logs-to-many-times/1505/2 "2020-05-28T13:25:34Z")

</div>

You can create rules in nlog.config to filter log messages for different levels into different targets. For the start/completed message for the `ITask` you can also decorate your implementation with the `Litium.Foundation.Tasks.INoLogging` interface.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [June 25, 2020, 1:26pm UTC](https://forum.litium.com/t/scheduled-task-logs-to-many-times/1505/3 "2020-06-25T13:26:34Z")

</div>

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