Skip to content

Commit

Permalink
opt: print warning error message if the yaml route file is invalid. (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
membphis authored and qiujiayu committed Feb 20, 2020
1 parent 5237c7b commit 2669120
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ utils/lj-releng
.idea/
*.iml
dashboard/
\.*

# .travis
!.travis/*.sh
7 changes: 6 additions & 1 deletion lua/apisix/debug.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,13 @@ local function read_debug_yaml()
end

if not found_end_flag then
f:seek("set")
local size = f:seek("end")
f:close()
log.notice("missing valid end flag in file ", debug_yaml_path)

if size > 8 then
log.warn("missing valid end flag in file ", debug_yaml_path)
end
return
end

Expand Down

0 comments on commit 2669120

Please sign in to comment.