# Script in SFC does not print to console

**URL:** <https://forum.inductiveautomation.com/t/script-in-sfc-does-not-print-to-console/12028>\
**Category:** Ignition\
**Created:** [August 11, 2016, 2:51pm UTC](https://forum.inductiveautomation.com/t/script-in-sfc-does-not-print-to-console/12028 "2016-08-11T14:51:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![walkerboh](https://avatars.discourse-cdn.com/v4/letter/w/a8b319/32.png) [@walkerboh](https://forum.inductiveautomation.com/u/walkerboh)\
**Post date:** [August 11, 2016, 2:51pm UTC](https://forum.inductiveautomation.com/t/script-in-sfc-does-not-print-to-console/12028/1 "2016-08-11T14:51:13Z")

</div>

I have a very basic SFC with 1 action step. The action step reads data from the database, and does some datetime math and then I was trying to print the result of the datetime math to the console. The code essentially boils down to this:

```auto
import datetime
createdDate = datetime.datetime.utcnow()
expirationDate = createdDate + datetime.timedelta(days=15)
print expirationDate
```

For some reason I am not seeing the output of the print statement. I have opened the Output Console and I only see errors from failed runs but none of the results from my print statements. Everything I read said to check the Output Console but is there somewhere else I should be looking? Thanks.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 11, 2016, 4:50pm UTC](https://forum.inductiveautomation.com/t/script-in-sfc-does-not-print-to-console/12028/2 "2016-08-11T16:50:28Z")

</div>

print doesn’t work in gateway scope. You have to use system.util.getLogger() and then use the logger’s .info() method. Or .debug(), .warn(), .trace(), etc.

---

<div class="post-metadata">

**Author:** ![walkerboh](https://avatars.discourse-cdn.com/v4/letter/w/a8b319/32.png) [@walkerboh](https://forum.inductiveautomation.com/u/walkerboh)\
**Post date:** [August 11, 2016, 7:57pm UTC](https://forum.inductiveautomation.com/t/script-in-sfc-does-not-print-to-console/12028/3 "2016-08-11T19:57:19Z")

</div>

Thanks, I hadn’t been able to find that anywhere.
