Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
conduwuit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
🥺
conduwuit
Commits
1bb4021b
Commit
1bb4021b
authored
9 months ago
by
Jason Volk
Browse files
Options
Downloads
Patches
Plain Diff
add format util to log suite
Signed-off-by:
Jason Volk
<
jason@zemos.net
>
parent
877c04de
No related branches found
No related tags found
1 merge request
!439
Tracing Capture
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/core/log/fmt.rs
+18
-0
18 additions, 0 deletions
src/core/log/fmt.rs
src/core/log/mod.rs
+1
-0
1 addition, 0 deletions
src/core/log/mod.rs
with
19 additions
and
0 deletions
src/core/log/fmt.rs
0 → 100644
+
18
−
0
View file @
1bb4021b
use
std
::
fmt
::
Write
;
use
super
::{
color
,
Level
};
use
crate
::
Result
;
pub
fn
html
<
S
>
(
out
:
&
mut
S
,
level
:
&
Level
,
span
:
&
str
,
msg
:
&
str
)
->
Result
<
()
>
where
S
:
Write
,
{
let
color
=
color
::
code_tag
(
level
);
let
level
=
level
.as_str
()
.to_uppercase
();
write!
(
out
,
"<font data-mx-color=
\"
{color}
\"
><code>{level:>5}</code></font> <code>{span:<12}</code> <code>{msg}</code><br>"
)
?
;
Ok
(())
}
This diff is collapsed.
Click to expand it.
src/core/log/mod.rs
+
1
−
0
View file @
1bb4021b
pub
mod
color
;
pub
mod
fmt
;
mod
reload
;
pub
use
reload
::
ReloadHandle
;
...
...
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