Skip to content

Commit cacbfd8

Browse files
committed
Better error message in LogEvent$initiliaze if logger is not a <Logger>
1 parent f55e68d commit cacbfd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/LogEvent.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ LogEvent <- R6::R6Class(
5555
msg = NA,
5656
...
5757
){
58-
assert(inherits(logger, "Logger"))
58+
assert(inherits(logger, "Logger"), "Logger must be a <Logger> object, not a", class_fmt(logger))
5959

6060
# assign has less overhead than [[ and event creation needs to be as fast
6161
# as possible

0 commit comments

Comments
 (0)