File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## Unreleased
4+
5+ - Fixed a bug when ` Server:grep_log() ` didn't consider the ` reset ` option.
6+
37## 1.2.0
48
59- Fixed a bug when ` server:grep_log() ` failed to find a string logged in
Original file line number Diff line number Diff line change 878878-- @return string|nil
879879function Server :grep_log (pattern , bytes_num , opts )
880880 local options = opts or {}
881- local reset = options .reset or true
881+ local reset = options .reset
882+ if reset == nil then
883+ reset = true
884+ end
882885 local filename = options .filename or self .log_file
883886 local file = fio .open (filename , {' O_RDONLY' , ' O_NONBLOCK' })
884887
Original file line number Diff line number Diff line change @@ -564,6 +564,9 @@ g.test_grep_log = function()
564564 server :connect_net_box ()
565565 t .assert_not (server :grep_log (' test grep_log' ))
566566
567+ -- Test that opts.reset = false works.
568+ t .assert (server :grep_log (' test grep_log' , nil , {reset = false }))
569+
567570 server .net_box :close ()
568571 server .net_box = nil
569572end
You can’t perform that action at this time.
0 commit comments