Skip to content

Commit

Permalink
Merge branch 'master' of github.com:JuliaLang/julia
Browse files Browse the repository at this point in the history
  • Loading branch information
ViralBShah committed May 15, 2020
2 parents 205b260 + 70a5901 commit 4f2e983
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Compiler/Runtime improvements
Code that requires assumptions about object layout and addresses (usually for
interoperability with C or other languages) might need to be updated; for
example any object that needs a stable address should be a `mutable struct`.
As a result, Array `view`s no longer allocate ([#34126]).

Command-line option changes
---------------------------
Expand Down
11 changes: 11 additions & 0 deletions base/logging.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ Severity/verbosity of a log record.
The log level provides a key against which potential log records may be
filtered, before any other work is done to construct the log record data
structure itself.
# Examples
```
julia> Logging.LogLevel(0) == Logging.Info
true
```
"""
struct LogLevel
level::Int32
Expand Down Expand Up @@ -420,6 +426,11 @@ end
Disable all log messages at log levels equal to or less than `level`. This is
a *global* setting, intended to make debug logging extremely cheap when
disabled.
# Examples
```
Logging.disable_logging(Logging.Info) # Disable debug and info
```
"""
function disable_logging(level::LogLevel)
_min_enabled_level[] = level + 1
Expand Down

0 comments on commit 4f2e983

Please sign in to comment.