sqlitelogs
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data β all from the browser, and deployed in milliseconds.
main.tsx
https://stevekrouse--3f01471827f94131bd0f08d3c85e25fc.web.val.run
A simple, powerful logging system for Val Town that stores logs in SQLite and provides both a web interface and API for viewing and searching logs.
- π Log any data type with automatic formatting
- π Search logs with full-text search
- π Clean, dark-themed web interface
- π± Responsive design that works on mobile and desktop
- π Pagination and sorting options
- π API access for programmatic log retrieval
- Remix this project to your account
- Import the
logfunction from the logger module and use it to log any data:
import { log } from "https://esm.town/v/YOUR_USERNAME_HERE/sqlitelogs/logger.tsx";
// Log simple messages
await log("User signed up");
// Log multiple values
await log("User", userId, "performed action", actionType);
// Log objects and complex data
await log("Request data:", requestObject);
await log("Error occurred:", errorObject);
- View logs via the HTTP val
The logger uses SQLite for storage with a table structure that includes:
id: Unique identifier for each log entryline: The formatted log messagets: Timestamp when the log was created
