You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
339 B
20 lines
339 B
6 years ago
|
type t =
|
||
|
| Quiet
|
||
|
| Error
|
||
|
| All;
|
||
|
|
||
|
let toString = logLevel =>
|
||
|
switch (logLevel) {
|
||
|
| Quiet => "quiet"
|
||
|
| Error => "error"
|
||
|
| All => "all"
|
||
|
};
|
||
|
|
||
|
let fromString = logLevelString =>
|
||
|
switch (logLevelString) {
|
||
|
| "quiet" => Quiet
|
||
|
| "error" => Error
|
||
|
| "all" => All
|
||
|
| _ => failwith("Unsupported level: " ++ logLevelString)
|
||
|
};
|