Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: log API version for run_api() #4

Open
psolymos opened this issue Sep 28, 2022 · 0 comments
Open

feat: log API version for run_api() #4

psolymos opened this issue Sep 28, 2022 · 0 comments

Comments

@psolymos
Copy link
Contributor

Log the API package version when Plumber is started, e.g.:

run_api <- function() {
  ver <- read.dcf(
    file = system.file("DESCRIPTION", package = "test"),
    fields = "Version"
  )
  mariobox::mario_log(
    method = paste("Starting", "test"),
    name = ver
  )
  mariobox::new_api(
    yaml_file = system.file(
      "mariobox.yml",
      package = "test"
    )
  )$run()
}

This gives:

run_api()
── [2022-09-27 21:46:55] Starting test - 0.0.0.9000 ───────────────────────────────────────────────────────────────────────────────
Running plumber API at http://127.0.0.1:15172
Running swagger Docs at http://127.0.0.1:15172/__docs__/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant