How to use the log feature
Logs can only be created from the server side, like an API route. Do notinitiate logs from the client side, integrate logging into server side code. To create a log, call the `createLog` function with the following parameters: * `db`: A drizzle database instance or transaction. * `eventType`: A string representing the type of event being logged. * `headers` (optional): Request headers to extract the IP address and user agent from. * `message` (optional): A string description. * `metadata` (optional): A record with string keys that will be saved as JSON. * `userId` (optional): The database ID of a user you want to associate with the log.