Skip to content

Commit 1dd607a

Browse files
committed
Some README fixes
- Use parentmodule in module filtering of HTTP.jl - Fix a typo from assignment to conditional
1 parent be2e4cb commit 1dd607a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,8 @@ using LoggingExtras
362362
using HTTP
363363

364364
function not_HTTP_message_filter(log)
365-
log._module != HTTP
365+
# HTTP.jl utilizes internal modules so call parentmodule(...)
366+
parentmodule(log._module) !== HTTP
366367
end
367368

368369
global_logger(EarlyFilteredLogger(not_HTTP_message_filter, global_logger()))
@@ -375,7 +376,8 @@ using LoggingExtras
375376
using HTTP
376377

377378
transformer_logger(global_logger()) do log
378-
if log._module == HTTP && log.level=Logging.Debug
379+
# HTTP.jl utilizes internal modules so call parentmodule(...)
380+
if parentmodule(log._module) === HTTP && log.level === Logging.Debug
379381
# Merge can be used to construct a new NamedTuple
380382
# which effectively is the overwriting of fields of a NamedTuple
381383
return merge(log, (; level=Logging.Info))

0 commit comments

Comments
 (0)