---
# System prepended metadata

title: 'log(output, [''dry-run'', ''info'''

---

### Output Object
```json
{
  "data": {
    // ...
  },
  "error": [], // default: []
  "exitCode": 0, // default: 0
  "tags": [
    "error",
    "network"
  ]
}
```

### Usage
```js
import render from '@vltpkg/render'
import log from '@vltpkg/logger'

const data = { ... }
log(render.output(data))
log(render.error('...'))

```

### Examples

**Dont**

```js
if (!config.silent) {
    log()
}
```

**Do**

```js
import PackageStream, PackageList, PackageError from '@vltpkg/renderTypes'

new PackageStream(packages)

if (packages.length) {
  await new PackageList({ ... })  
} else {
  await new PackageError({ ... })
}
```

```js
log({
    data: {
        "statusCode": 400,
        "duration": 100
    },
    tags: [
        "network"
    ]
})
```

### Display

```js

```