Skip to content

Commit

Permalink
Parse generic errors from logs
Browse files Browse the repository at this point in the history
  • Loading branch information
essenciary committed Oct 25, 2023
1 parent d313557 commit edc86d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GenieDevTools"
uuid = "4e5d9629-6565-4102-a9ff-45c707eb060e"
authors = ["essenciary <[email protected]> and contributors"]
version = "2.6.0"
version = "2.7.0"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
9 changes: 9 additions & 0 deletions src/GenieDevTools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ function parselog(line::AbstractString) :: Union{AbstractString,Nothing}
return "log:critical:parse_error $(m.captures[2])"
end

# catch generic error
r = r"""┌ Error: (.*)
(.*)
(.*)"""
m = match(r, line)
if ! isnothing(m) && length(m.captures) >= 3
return "log:critical:application $(m.captures[1])"
end

return
end

Expand Down

2 comments on commit edc86d2

@essenciary
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/94098

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v2.7.0 -m "<description of version>" edc86d2c28f2b836aa4c404e5d2a6253283207f0
git push origin v2.7.0

Please sign in to comment.