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.

Elder & Estate

Protecting your legacy, one plan at a time.

Elder and Estate is an online service providing legal forms and information. Elder and Estate is not a law firm and cannot provide legal advice. Elder and Estate is not a substitute for an attorney or law firm. Communications between you and Elder and Estate are protected by our Privacy Policy, not by attorney-client privilege. 2025 Elder and Estate, Inc.

Estate Planning - Create an Online Will and Trust | Elder and Estate