dbuenzli / logs

Logging infrastructure for OCaml
http://erratique.ch/software/logs
ISC License
86 stars 19 forks source link

Example is too complex and not complete with regard to dependencies #45

Open olleharstedt opened 2 years ago

olleharstedt commented 2 years ago

Had this issue: https://github.com/dbuenzli/logs/issues/18

Had to google to come here.

Wouldn't mind a simpler example... :sweat_smile: And please, include the dependencies so I know what to install/include in dune. :+1:

dbuenzli commented 2 years ago

Which example did you find too complex ? Those in the basics ? I'm not sure I can make them much simpler.

olleharstedt commented 2 years ago

Hm, no, I ended up at https://erratique.ch/software/logs/doc/Logs_cli/index.html#ex for CLI logging. :thinking:

Are you saying

Logs.err (fun m -> m "invalid kv (%a,%a)" pp_key k pp_val v);

works out-of-the-box with only "logs" added to dune config? But where is it logging to, stdout?

dbuenzli commented 2 years ago

It will only log when you setup the reporter here

It may be worth giving a full complete simple example. Before the more complex one.

dbuenzli commented 2 years ago

It will only log when you setup the reporter here

Well that one also uses one more library… If you only want to use logs you should use this reporter.

Anyways, yes should be improved.

rbjorklin commented 1 year ago

@olleharstedt I just provided a complete(?) example in #46 please take a look and see if it helps resolve your situation.

olleharstedt commented 1 year ago

Cool, thanks @rbjorklin :)