Closed Xosmond closed 5 years ago
The method formatter is causing other libraries to not compile: https://github.com/luckyframework/dexter/blob/master/src/dexter/logger.cr#L53
formatter
# :nodoc: def formatter=(value) : Void {% raise "Use log_formatter= instead" %} end
So even when using ::Logger like:
::Logger
def initialize(@io : IO = STDOUT) @logger = ::Logger.new(@io) @logger.level = ::Logger::DEBUG @logger.progname = "crest" @logger.formatter = default_formatter @filters = [] of Array(String | Regex) end abstract def request(request : Crest::Request) : String abstract def response(response : Crest::Response) : String def default_formatter ::Logger::Formatter.new do |_, datetime, progname, message, io| io << progname io << " | " << datetime.to_s("%F %T") io << " " << message end end
It get's the following error:
in lib/crest/src/crest/logger.cr:19: undefined method 'log_formatter=' for Logger (compile-time type is Logger+) @logger.log_formatter = Dexter::Formatters::JsonLogFormatter
The method
formatter
is causing other libraries to not compile: https://github.com/luckyframework/dexter/blob/master/src/dexter/logger.cr#L53So even when using
::Logger
like:It get's the following error: