Logger
Darto provides a built-in logger that can be used to log messages to the console. To use the log helper to access methods, info, warn, debug, access, and error.
Default Logger
Active logger by default to see the logs. like this:
[17:22:30.275] (INFO): Server listening at 0.0.0.0:8080void main() {
final app = Darto(logger: true);
app.listen(3000);
}Custom Logger
final app = Darto();
app.log.info("Hello World");[17:22:30.275] (INFO): Hello WorldRequest and Response
The log helper can be used to log request and response information.
app.get('/', (Request req, Response res) {
req.log.debug("Request received");
res.send("Hello World");
}[17:22:30.275] (DEBUG): Request receivedLast updated on