tests/testthat/test-verbosity.R

context("verbosity")

test_that("The verbosity() constructor creates equivalent log levels", {
  expect_equal(verbosity(-19), FATAL)
  expect_equal(verbosity(-1), FATAL)
  expect_equal(verbosity(1), FATAL)
  expect_equal(verbosity(2), ERROR)
  expect_equal(verbosity(3), WARN)
  expect_equal(verbosity(4), INFO)
  expect_equal(verbosity(5), DEBUG)
  expect_equal(verbosity(6), DEBUG)
  expect_equal(verbosity(60), DEBUG)
})

Try the log4r package in your browser

Any scripts or data that you put into this service are public.

log4r documentation built on Nov. 28, 2022, 5:24 p.m.