# getApplicationLog

Get the application log for a given transaction.

## **Input Arguments**

<table><thead><tr><th width="260">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>txid: string</code></td><td>The id of the transaction you would like to get the application logs for</td></tr><tr><td><code>network?: string</code></td><td>Network to submit this request to. If omitted, will default to network the wallet is currently set to. If omitted, will default the network which the wallet is set to</td></tr></tbody></table>

## **Success Response**

The wallet will return the direct response from the RPC node.

## **Error Response**

<table><thead><tr><th width="272">Parameter</th><th>Description</th></tr></thead><tbody><tr><td><code>type: string</code></td><td>The type of error which has occured</td></tr><tr><td><code>description: string</code></td><td>A description of the error which has occured</td></tr><tr><td><code>data: string</code></td><td>Any raw data associated with the error</td></tr></tbody></table>

## Example

### Request

```js
neoline.getApplicationLog({
  txid: '7e049fd7c253dabf38e4156df30c78b30d49f307196aa89b99a47d2330789bf2',
  network: 'TestNet'
})
.then(result => {
  console.log('Application log of transaction execution: ' + JSON.stringify(result));
})
.catch((error) => {
    const {type, description, data} = error;
  switch(type) {
    case 'NO_PROVIDER':
        console.log('No provider available.');
        break;
    case 'RPC_ERROR':
        console.log('There was an error when broadcasting this transaction to the network.');
        break;
    default:
        // Not an expected error object.  Just write the error to the console.
        console.error(error);
        break;
  }
});
```

### Response

```js
{
  txid: "0x7e049fd7c253dabf38e4156df30c78b30d49f307196aa89b99a47d2330789bf2",
  executions: [
    {
      trigger: "Application",
      contract: "0x72985e7f2cea98b89af54d8607bc6400814c4b45",
      vmstate: "HALT, BREAK",
      gas_consumed: "5.292",
      stack: [],
      notifications: [
        {
          contract: "0x849d095d07950b9e56d0c895ec48ec5100cfdff1",
          state: {
            type: "Array",
            value: [
              {
                type: "ByteArray",
                value: "7472616e73666572"
              },
              {
                type: "ByteArray",
                value: "296ac124021a71c449a9bad320c16429b08ad6ee"
              },
              {
                type: "ByteArray",
                value: "7869ef9732cdf6f6d54adaa5cae3b55a9396bceb"
              },
              {
                type: "ByteArray",
                value: "00e1f505"
              }
            ]
          }
        },
        {
          contract: "0x849d095d07950b9e56d0c895ec48ec5100cfdff1",
          state: {
            type: "Array",
            value: [
              {
                type: "ByteArray",
                value: "7472616e73666572"
              },
              {
                type: "ByteArray",
                value: "296ac124021a71c449a9bad320c16429b08ad6ee"
              },
              {
                type: "ByteArray",
                value: "b1fdddf658ce5ff9f83e66ede2f333ecfcc0463e"
              },
              {
                type: "ByteArray",
                value: "00e1f505"
              }
            ]
          }
        }
      ]
    }
  ]
}
```
