1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! Process-global log control for the upstream Verovio engine.
//!
//! Verovio's log threshold lives in a namespace-level `vrv::logLevel`
//! variable — not per-toolkit. The function in this module is therefore
//! **process-wide** and gates access through a private `Mutex` so concurrent
//! callers can't race on the FFI boundary.
use Mutex;
use ffi;
/// Verbosity threshold for Verovio's internal log channel.
///
/// Mirrors the upstream `LogLevel` enum at `include/vrv/toolkitdef.h`.
/// Set the Verovio log threshold globally for this process.
///
/// Verovio's log state is namespace-global (see `vrv::logLevel`), not
/// per-toolkit, so this call is **process-wide** — every existing and
/// future `Toolkit` in the process is affected.
///
/// Internally serialized with a mutex so concurrent threads can call this
/// without racing. The mutex is held only for the duration of the upstream
/// `EnableLog` call.