mirror of
https://github.com/ocaml-multicore/eio.git
synced 2025-08-23 00:01:45 -04:00
- Set up a box so that wrapping works correctly. - Print a `+` at the start of each trace line to show it is trace output. - Format location tag with the rest of the output (fixes wrapping). - Add tests for traceln.
15 lines
325 B
Markdown
15 lines
325 B
Markdown
```ocaml
|
|
# #require "eio_main";;
|
|
# open Eio.Std;;
|
|
# Eio_main.run @@ fun _env ->
|
|
traceln "One-line trace";
|
|
traceln "@[<v2>A nested list@,Foo@,Bar@]";
|
|
traceln "Trace with position" ~__POS__:("test_trace.md", 5, 1, 10);
|
|
+One-line trace
|
|
+A nested list
|
|
+ Foo
|
|
+ Bar
|
|
+Trace with position [test_trace.md:5]
|
|
- : unit = ()
|
|
```
|