Skip to content

Commit

Permalink
test/blog.rb give Logger.new a string not a Pathname
Browse files Browse the repository at this point in the history
  • Loading branch information
notEthan committed Feb 2, 2025
1 parent d3d17e1 commit 662bc17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/blog.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class Blog < Sinatra::Base
self.supported_media_types = ['application/json']
set :static, false
disable :protection
logpath = Pathname.new('log/blog_app.log')
FileUtils.mkdir_p(logpath.dirname)
logpath = 'log/blog_app.log'
FileUtils.mkdir_p(File.dirname(logpath))
set :logger, ::Logger.new(logpath)
logger.level = ::Logger::INFO
define_method(:logger) { self.class.logger }
Expand Down

0 comments on commit 662bc17

Please sign in to comment.