-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
113: Add inferable logger path r=charleskawczynski a=charleskawczynski Add and pass custom logger. This helps reduce the noise when running JET. Ironically, it results in more JET failures, but this is likely due to JET being able to analyze past the logging failures. Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
- Loading branch information
Showing
12 changed files
with
181 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#= | ||
Custom logging was added so type-unstable logging | ||
functions in the Logging infrastructure is elided. | ||
=# | ||
import Logging | ||
|
||
struct StandardLogger end | ||
struct ByPassLogger end | ||
|
||
macro cdebug(logger, expr) | ||
return quote | ||
if !($(esc(logger)) isa ByPassLogger) | ||
@debug $(esc(expr)) | ||
end | ||
end | ||
end | ||
|
||
macro cwarn(logger, expr) | ||
return quote | ||
if !($(esc(logger)) isa ByPassLogger) | ||
@warn $(esc(expr)) | ||
end | ||
end | ||
end | ||
|
||
macro cerror(logger, expr) | ||
return quote | ||
if !($(esc(logger)) isa ByPassLogger) | ||
@error $(esc(expr)) | ||
end | ||
end | ||
end | ||
|
||
macro cinfo(logger, expr) | ||
return quote | ||
if !($(esc(logger)) isa ByPassLogger) | ||
@info $(esc(expr)) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.