Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Dunitrust
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
nodes
rust
Dunitrust
Merge requests
!150
[tests] rust-tests-tools: add fn init_logger_stdout
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
[tests] rust-tests-tools: add fn init_logger_stdout
elois/tests-tools
into
dev
Overview
0
Commits
1
Pipelines
0
Changes
3
Merged
Éloïs
requested to merge
elois/tests-tools
into
dev
6 years ago
Overview
0
Commits
1
Pipelines
0
Changes
3
0
0
Merge request reports
Compare
dev
dev (base)
and
latest version
latest version
489696fe
1 commit,
6 years ago
3 files
+
25
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
3
lib/tests-tools/rust-tests-tools/src/lib.rs
+
19
−
0
View file @ 489696fe
Edit in single-file editor
Open in Web IDE
Show full file
@@ -27,3 +27,22 @@
)]
pub
mod
collections
;
use
log
::
Level
;
use
simplelog
::{
Config
,
LevelFilter
,
TermLogger
};
/// Initialize simple stdout logger
pub
fn
init_logger_stdout
()
{
// Config logger
let
logger_config
=
Config
{
time
:
Some
(
Level
::
Error
),
level
:
Some
(
Level
::
Error
),
target
:
Some
(
Level
::
Debug
),
location
:
Some
(
Level
::
Debug
),
time_format
:
Some
(
"%Y-%m-%d %H:%M:%S%:z"
),
};
// Active stdout logger
TermLogger
::
init
(
LevelFilter
::
Debug
,
logger_config
)
.expect
(
"TESTS: fail to init stdout logger !"
);
}
Loading