# Use Print in function that uses specifiers

**URL:** <https://forums.unrealengine.com/t/use-print-in-function-that-uses-specifiers/1013005>\
**Category:** Verse\
**Tags:** unreal-editor-for-fortnite, fortnite-creative, question, fortnite\
**Created:** [April 15, 2023, 11:44am UTC](https://forums.unrealengine.com/t/use-print-in-function-that-uses-specifiers/1013005 "2023-04-15T11:44:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FinestCreative](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/finestcreative/32/1034971_2.png) [@FinestCreative](https://forums.unrealengine.com/u/FinestCreative)\
**Post date:** [April 15, 2023, 11:44am UTC](https://forums.unrealengine.com/t/use-print-in-function-that-uses-specifiers/1013005/1 "2023-04-15T11:44:08Z")

</div>

In nearly all my functions I use Print to print errors. But when I use the effect specifier that my function needs I can no longer use Print because Print has the no\_rollback effect. Any idea how I can use the specifiers and also log/print errors

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/9/4/d9442d712c021ba0f1177d6fef210e65b5e207d5.png)

---

<div class="post-metadata">

**Author:** ![Incredulous\_Hulk](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/incredulous_hulk/32/924210_2.png) [@Incredulous\_Hulk](https://forums.unrealengine.com/u/Incredulous_Hulk)\
**Post date:** [April 17, 2023, 4:18pm UTC](https://forums.unrealengine.com/t/use-print-in-function-that-uses-specifiers/1013005/2 "2023-04-17T16:18:11Z")

</div>

When working with more restricted specifiers you’ll have to switch from using `Print` to using the `log` object APIs. Here is an example of setting them up and using them.

```auto
# The name of this class (ie. my_log_channel ) will automatically prepend your messages in the log. Ex: "my_log_channel: MyMessage"
my_log_channel := class(log_channel){}

my_device := class(creative_device):
    # Create an instance of the `log` object.
    Logger:log = log{ Channel := my_log_channel }

    MyMethod()<transacts>:void =
        # Printing to the log will work in <transacts> and <varies> contexts
        Logger.Print("Something happened")

```

---

<div class="post-metadata">

**Author:** ![FinestCreative](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/finestcreative/32/1034971_2.png) [@FinestCreative](https://forums.unrealengine.com/u/FinestCreative)\
**Post date:** [April 17, 2023, 4:26pm UTC](https://forums.unrealengine.com/t/use-print-in-function-that-uses-specifiers/1013005/3 "2023-04-17T16:26:39Z")

</div>

Yo thanks!
