# Log() does not print anything in emulator

**URL:** <https://forum.flow.com/t/log-does-not-print-anything-in-emulator/2244>\
**Category:** Flow CLI\
**Created:** [July 29, 2021, 3:32am UTC](https://forum.flow.com/t/log-does-not-print-anything-in-emulator/2244 "2021-07-29T03:32:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/amin/32/521_2.png) [@Amin](https://forum.flow.com/u/Amin)\
**Post date:** [July 29, 2021, 3:32am UTC](https://forum.flow.com/t/log-does-not-print-anything-in-emulator/2244/1 "2021-07-29T03:32:35Z")

</div>

I was trying to test out moving tokens between accounts, very ad-hoc and basic stuff on emulator network to get the hang of the language. When it came time to check for my account’s Vault Balance, I wrote a short script that prints the balance attribute of the Vault but it would not print anything to the console.

So I wrote the following script to test if log prints anything at all:

> pub fun main() {  
> log(“Hello World”)  
> }

and then I type the following command into the CLI

> flow scripts execute ./scripts/test.cdc

and this is the output:

> Version warning: a new version of Flow CLI is available (v0.27.0).  
> Read the installation guide for upgrade instructions: [Install Instructions | Flow Developer Portal](https://docs.onflow.org/flow-cli/install)

> Result: ()

Why is nothing being typed on the console? Is it normal to expect nothing to print on emulator? If I can’t get log to work, how can I check if my contracts and transactions worked properly?

Thanks and I apologize for the bad formatting, I’m not very good at this.  
`

---

<div class="post-metadata">

**Author:** ![Amin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/amin/32/521_2.png) [@Amin](https://forum.flow.com/u/Amin)\
**Post date:** [July 29, 2021, 4:50pm UTC](https://forum.flow.com/t/log-does-not-print-anything-in-emulator/2244/2 "2021-07-29T16:50:55Z")

</div>

Update: Ok I realized that I can’t print to the Terminal in VScode so I just edited the function like this:

```
pub fun main(): UFix64 {
    ***Do stuff here***
    return VaultReference.balance

```

and my account’s balance is returned to the terminal.

---

<div class="post-metadata">

**Author:** ![flowjosh](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.flow.com/flowjosh/32/362_2.png) [@flowjosh](https://forum.flow.com/u/flowjosh)\
**Post date:** [July 30, 2021, 4:16pm UTC](https://forum.flow.com/t/log-does-not-print-anything-in-emulator/2244/3 "2021-07-30T16:16:54Z")

</div>

When using the CLI, try using the -v flag. That might show the logs

---

<div class="post-metadata">

**Author:** ![7iebx](https://avatars.discourse-cdn.com/v4/letter/7/df788c/32.png) [@7iebx](https://forum.flow.com/u/7iebx)\
**Post date:** [November 26, 2021, 12:43am UTC](https://forum.flow.com/t/log-does-not-print-anything-in-emulator/2244/4 "2021-11-26T00:43:17Z")

</div>

flowjosh’s answer is correct, run the emulator with: flow emulator -v  
After you send your transaction, go back to the terminal window where you ran the emulator. Your logged messages will be there among all the other stuff it logs.
