Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Document --log argument #8025

Open
h4x3rotab opened this issue Feb 2, 2021 · 3 comments
Open

Document --log argument #8025

h4x3rotab opened this issue Feb 2, 2021 · 3 comments

Comments

@h4x3rotab
Copy link
Contributor

h4x3rotab commented Feb 2, 2021

The format of the --log argument is unclear now. It only says:

Sets a custom logging filter. Syntax is <target>=<level>, e.g. -lsync=debug.

Log levels (least to most verbose) are error, warn, info, debug, and trace. By default, all targets log info. The global log level can be set with -l<level>.

However the format can be very flexible. E.g. it supports setting log levels for multiple component: info,lsync=debug. Does it follow the env_logger's standard described here?

If so, I think it's necessary to make it explicitly described in the command line flag docs.

@dvdplm
Copy link
Contributor

dvdplm commented Feb 2, 2021

Does it follow the env_logger's standard described here?

Yes, it does. And I agree it would be good to mention the docs you link to. Do you mind opening a PR for that? :)

@qdm12
Copy link
Contributor

qdm12 commented Nov 1, 2021

Related question, it mentions

/// By default, all targets log `info`. The global log level can be set with -l<level>.

Is there any documentation or variable defining all the possible targets? Thanks!!

@bkchr
Copy link
Member

bkchr commented Nov 3, 2021

No there is no documentation on all the possible levels. I would also not recommend to copy this over to gossamer. Just come up with your own logging targets. In rust logging targets are for example the crate names if there is no explicit target given.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants