> ## Documentation Index
> Fetch the complete documentation index at: https://docs.overlayed.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# User Feedback

> Consume user bug reports and suggestions with automatic log collection

To facilitate user-driven feedback or automatic feedback, you can use the `submitFeedback` method.

Feedback can then be viewed in the [Overlayed Dashboard](https://overlay.dev/feedback/bug-reports).

## Bug Reports

```typescript theme={null}
overlay.logger.submitFeedback("bug_report", {
	email: "user@example.com",
	message: "The overlay is not working",
});
```

## Suggestions

```typescript theme={null}
overlay.logger.submitFeedback("suggestion", {
	email: "user@example.com",
	message: "I would like to see a new feature",
});
```

## Feedback Data

You may optionally submit an email, username, and message with the data. You can also submit any additional data you
want to include in the feedback by passing an `extra` object.

```typescript theme={null}
type OverlayedAppLoggingModuleSubmitFeedbackInfo = {
	email?: string | undefined;
	username?: string | undefined;
	message?: string | undefined;
	extra?: Record<string, unknown> | undefined;
};
```

## Additional Files

If you have your own data to include in the feedback, for example the current stored state of a match, you can pass it
as an object with the `additionalFiles` property:

```typescript theme={null}
overlay.logger.submitFeedback(
	"bug_report",
	{
		email: "user@example.com",
		message: "Issue description",
	},
	{
		additionalFiles: {
			"gameState.json": JSON.stringify(myGameState),
		},
	},
);
```

## What Gets Included

When you submit feedback, the following are automatically included:

* Your application's logs (`app.log`)
* Overlayed's internal logs (`main.log`)
* Any additional files you specify
* The feedback information you provide

All logs are automatically zipped and attached to your feedback submission.

## Getting the logs zip

You can get the zip of logs sent via the submitFeedback method by calling the `getLogsZip` method:

```typescript theme={null}
const zip = overlay.logger.getLogsZip();
```

You can then generate a base64 string from the zip to send off to a server:

```typescript theme={null}
const zipBase64 = await zip.generateAsync({ type: "base64" });
```
