Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
frama-c
Commits
80e1a3d2
Commit
80e1a3d2
authored
Jul 08, 2022
by
Loïc Correnson
Committed by
Allan Blanchard
Jul 28, 2022
Browse files
[log] exporting tty mode for channels
parent
722e71ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/kernel_services/plugin_entry_points/log.ml
View file @
80e1a3d2
...
...
@@ -804,6 +804,7 @@ sig
(
'
a
,
formatter
,
unit
)
format
->
'
a
val
result
:
?
level
:
int
->
?
dkey
:
category
->
'
a
pretty_printer
val
has_tty
:
unit
->
bool
val
feedback
:
?
ontty
:
ontty
->
?
level
:
int
->
?
dkey
:
category
->
'
a
pretty_printer
val
debug
:
?
level
:
int
->
?
dkey
:
category
->
'
a
pretty_printer
val
warning
:
?
wkey
:
warn_category
->
'
a
pretty_printer
...
...
@@ -1038,6 +1039,8 @@ struct
let
transient
channel
=
channel
.
terminal
.
isatty
&&
!
tty
()
let
has_tty
()
=
transient
channel
let
feedback
?
(
ontty
=
`Message
)
?
(
level
=
1
)
?
dkey
?
current
?
source
...
...
src/kernel_services/plugin_entry_points/log.mli
View file @
80e1a3d2
...
...
@@ -158,6 +158,9 @@ module type Messages = sig
@since Beryllium-20090601-beta1
@see <https://frama-c.com/download/frama-c-plugin-development-guide.pdf> Plug-in Development Guide *)
val
has_tty
:
unit
->
bool
(** Returns [true] is this Log's channel is in console mode *)
val
feedback
:
?
ontty
:
ontty
->
?
level
:
int
->
?
dkey
:
category
->
'
a
pretty_printer
(** Progress and feedback. Level is tested against the verbosity level.
@since Beryllium-20090601-beta1
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment