Skip to content

Ambiorix

Under the hood the ambiorix package uses this package for logging.

The default logger can be combined with any other logger.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
library(ambiorix)

app <- Ambiorix$new()

# create logger with the log package
logger <- log::Logger$new()

app$get("/", function(req, res){
  log$log("Home", "was visited")
  res$send("hello!")
})

app$get("/about", function(req, res){
  log$log("About page", "was just viewed")
  res$send("Me me me")
})

app$start()