# Browse tags printing folder

**URL:** <https://forum.inductiveautomation.com/t/browse-tags-printing-folder/60498>\
**Category:** Ignition\
**Tags:** ignition78, scripting, vision\
**Created:** [June 8, 2022, 3:39pm UTC](https://forum.inductiveautomation.com/t/browse-tags-printing-folder/60498 "2022-06-08T15:39:45Z")\
**Posts on this page:** 1\
**Showing post:** 19

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [June 9, 2022, 4:03pm UTC](https://forum.inductiveautomation.com/t/browse-tags-printing-folder/60498/19 "2022-06-09T16:03:50Z")

</div>

> [@andrews](#):
>
> @lrose No logging in the script. Nothing in the console logs which i believe is the same as the wrapper log.

The console log is not the same as the wrapper log.

> [@Event Configuration Print Out to debug](https://forum.inductiveautomation.com/t/event-configuration-print-out-to-debug/60091/5):
>
> It’s complicated slight_smile Starting from most local to least… In the script console, print will log directly to the output buffer on the right hand side. system.util.getLogger() will log to the named ‘Output Console’ Designer window. Bonus: A script invoked from here using system.util.invokeAsync will print to the regular output console, not the buffer on the right hand side. Anywhere else in the designer (except Perspective), print and system.util.getLogger will log to the ‘Out…

Here is a small example of using a logger.

> [@Troubleshooting tag event script suggestions?](https://forum.inductiveautomation.com/t/troubleshooting-tag-event-script-suggestions/26560/2):
>
> If the tag diagnostics on the tags are not showing any error, then, your best bet is to implement a logger with a try…except structure. Something like: import java.lang.Exception logger = system.util.getLogger("yourLoggerName") try: #script to attempt except: java.lang.Exception, e: logger.warn("An error occurred" , e) except Exception, e: logger.warnf("An error occurred: %s",e)@pturmel has a PythonAsJavaException class in his [later.py](https://www.automation-pros.com/ignition/later.py) which will allow for more detail in th…

This:

```auto
if tag.dataType == Int4:

```

Doesn't do what you think it does. `Int4` is a type, `tag.dataType` ~~returns a string value~~ returns a `com.inductiveautomation.ignition.common.sqltags.model.types.DataType`. The two can never be equivalent.

~~ 

```auto
if tag.dataType == 'Int4':
    #do something
elif tag.dataType == 'String':
   #do something else

```

 ~~~~I would also use 0 for the default value for Integers. Also, instead of calling writeAll twice, combine the lists first and then call writeAll~~~~ ``` paths = intPaths + stringPaths values = resetInt + resetStr system.tag.writeAll(paths,values) ```~~

Edit: See @paul-griffith's code below

---

_[View the full topic](https://forum.inductiveautomation.com/t/browse-tags-printing-folder/60498)._
