Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make custom log macros work #52359

Merged
merged 3 commits into from
Dec 2, 2023
Merged

Conversation

IanButterworth
Copy link
Member

Taken from #52196 so the fix part can be backported to 1.10

Without this

julia> using Logging

julia> CustomLog = LogLevel(-500)
LogLevel(-500)

julia> macro customlog(exs...) Base.CoreLogging.logmsg_code((Base.CoreLogging.@_sourceinfo)..., esc(CustomLog), exs...) end
@customlog (macro with 1 method)

julia> @customlog "hello"
ERROR: UndefVarError: `_min_enabled_level` not defined
Stacktrace:
 [1] top-level scope
   @ logging.jl:373

@IanButterworth IanButterworth added logging The logging framework backport 1.10 Change should be backported to the 1.10 release labels Nov 30, 2023
base/logging.jl Outdated Show resolved Hide resolved
@DilumAluthge DilumAluthge added the bugfix This change fixes an existing bug label Dec 1, 2023
@IanButterworth IanButterworth merged commit 641f717 into JuliaLang:master Dec 2, 2023
7 checks passed
@IanButterworth IanButterworth deleted the ib/log_fix branch December 2, 2023 14:36
@KristofferC KristofferC mentioned this pull request Dec 12, 2023
17 tasks
KristofferC pushed a commit that referenced this pull request Dec 12, 2023
(cherry picked from commit 641f717)
KristofferC added a commit that referenced this pull request Dec 17, 2023
Backported PRs:
- [x] #51234 <!-- Fix getfield codegen for tuple inputs and unknown
symbol fields. -->
- [x] #52170 <!-- fix invalidations related to `ismutable` -->
- [x] #52342 <!-- Add single-term multiplication for `AbstractQ` on
v1.10 and above -->
- [x] #52333 <!-- bugfix for dot of Hermitian{noncommutative} -->
- [x] #52407 <!-- channels: fix memory ordering violation in iterate -->
- [x] #52405 <!-- Bump LLVM to 15.0.7+10 to fix GC issue -->
- [x] #52441 <!-- Remove `Pkg` dependency from `SuiteSparse_jll` -->
- [x] #52367 <!-- docs: add notes about scratchspaces in depot -->
- [x] #52456 <!-- Make `jl_write_coverage_data` dllexported again -->
- [x] #52294 <!-- GC scheduler refinements -->
- [x] #52359 <!-- make custom log macros work -->
- [x] #52548
@KristofferC KristofferC removed the backport 1.10 Change should be backported to the 1.10 release label Dec 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug logging The logging framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants