Skip to content

Commit

Permalink
Fix default level check
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasforeman committed Nov 26, 2024
1 parent 6087819 commit 5abe6db
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/init.luau
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ Logr._defaultLevel = "None"

local tNew = t.tuple(t.string, t.optional(t.string))
function Logr.new(name: string, level: string?)
level = level or Logr._defaultLevel
assert(tNew(name, level))

level = level or self._defaultLevel
assert(IsValidLogLevelName(level :: string))

local self = setmetatable({}, Logr)
Expand Down

0 comments on commit 5abe6db

Please sign in to comment.