ocurrent icon indicating copy to clipboard operation
ocurrent copied to clipboard

"Structured" logging with meta-data

Open MisterDA opened this issue 3 years ago • 0 comments

Current.Job provides two functions to log output:

val write : t -> string -> unit
(** [write t data] appends [data] to the log. *)

val log : t -> ( 'a, Stdlib.Format.formatter, unit, unit ) format4 -> 'a
(** [log t fmt] appends a formatted message to the log, with a newline added at the end. *)

the logs are then streamed as text to the web interface.

I think it would be nicer if the logs were streamed with metadata, e.g. the build step where they were produced, to let the end interface better chose how to display them instead for streaming pre-formatted logs. In the web interface, this would allow to have drop downs to display/hide the logs of each build step, highlight the label, allow selecting and copying (useful for Dockerfiles ocurrent/ocaml-ci#585).

MisterDA avatar Jun 03 '22 14:06 MisterDA