Skip to content

Commit

Permalink
move ConsoleLogger into Base
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed May 10, 2024
1 parent 28321e3 commit f24c773
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
10 changes: 6 additions & 4 deletions base/Base.jl
Original file line number Diff line number Diff line change
Expand Up @@ -402,13 +402,13 @@ include("weakkeydict.jl")
include("scopedvalues.jl")
using .ScopedValues

# Logging
include("logging.jl")
using .CoreLogging

# metaprogramming
include("meta.jl")

# Logging
include("logging/logging.jl")
using .CoreLogging

include("env.jl")

# functions defined in Random
Expand Down Expand Up @@ -634,6 +634,8 @@ function __init__()
if get_bool_env("JULIA_USE_FLISP_PARSER", false) === false
JuliaSyntax.enable_in_core!()
end

CoreLogging.global_logger(CoreLogging.ConsoleLogger())
nothing
end

Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions base/logging.jl → base/logging/logging.jl
Original file line number Diff line number Diff line change
Expand Up @@ -700,4 +700,6 @@ end

_global_logstate = LogState(SimpleLogger())

include("logging/ConsoleLogger.jl")

end # CoreLogging
2 changes: 0 additions & 2 deletions base/meta.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ Convenience functions for metaprogramming.
"""
module Meta

using ..CoreLogging

export quot,
isexpr,
isidentifier,
Expand Down
8 changes: 1 addition & 7 deletions stdlib/Logging/src/Logging.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Alias for [`LogLevel(1_000_001)`](@ref LogLevel).
const AboveMaxLevel = Base.CoreLogging.AboveMaxLevel

using Base.CoreLogging:
closed_stream
closed_stream, ConsoleLogger, default_metafmt

export
AbstractLogger,
Expand All @@ -92,8 +92,6 @@ export
Error,
AboveMaxLevel

include("ConsoleLogger.jl")

# The following are also part of the public API, but not exported:
#
# 1. Log levels:
Expand All @@ -102,8 +100,4 @@ include("ConsoleLogger.jl")
# 2. AbstractLogger message related functions:
# handle_message, shouldlog, min_enabled_level, catch_exceptions,

function __init__()
global_logger(ConsoleLogger())
end

end

0 comments on commit f24c773

Please sign in to comment.