Can use JSONLogger.new(env: env)
Signed-off-by: Wu Zhende wuzhende666@163.com --- src/lib/json_logger.cr | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/lib/json_logger.cr b/src/lib/json_logger.cr index 2b5ef6a..d136bdd 100644 --- a/src/lib/json_logger.cr +++ b/src/lib/json_logger.cr @@ -6,8 +6,7 @@ require "json" require "any_merge"
class JSONLogger < Logger - def initialize(logdev = STDOUT, formatter = my_formatter) - @env = nil + def initialize(logdev = STDOUT, formatter = my_formatter, @env = nil) @env_info = Hash(String, String | Int32).new super(logdev, formatter: formatter) end