Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
picodata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
picodata
Commits
e451ba9c
Commit
e451ba9c
authored
10 months ago
by
Georgy Moshkin
Browse files
Options
Downloads
Patches
Plain Diff
fix: use tarantool::log::current_level instead of a custom static variable
parent
3688323e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1023
feat: rework migration file parsing
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/tlog.rs
+3
-7
3 additions, 7 deletions
src/tlog.rs
with
3 additions
and
7 deletions
src/tlog.rs
+
3
−
7
View file @
e451ba9c
...
...
@@ -2,13 +2,9 @@ use ::tarantool::log::{say, SayLevel};
use
once_cell
::
sync
::
Lazy
;
use
std
::{
collections
::
HashMap
,
ptr
};
static
mut
LOG_LEVEL
:
SayLevel
=
SayLevel
::
Info
;
#[inline(always)]
pub
fn
set_log_level
(
lvl
:
SayLevel
)
{
// SAFETY: Here and onward, globals are used in single thread.
unsafe
{
LOG_LEVEL
=
lvl
;
}
tarantool
::
log
::
set_current_level
(
lvl
)
}
/// For user experience reasons we do some log messages enhancements (we add
...
...
@@ -150,7 +146,7 @@ impl slog::Drain for Drain {
// It's hardcoded in Cargo.toml dependency features
// In runtime it's managed by tarantool box.cfg.log_level
let
level
=
slog_level_to_say_level
(
record
.level
());
if
level
>
unsafe
{
LOG_LEVEL
}
{
if
level
>
tarantool
::
log
::
current_level
()
{
return
Ok
(());
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment