-
-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation of log config files #291
Comments
Hi @c-git I'm not sure I totally understand the question. Are you asking how to load a config at a particular path? |
Thank you very much for taking the time to respond and for all the work you do on this crate. My apologies on not being clear. The example in the examples folder plus an article I found on medium helped me get a working setup. What I was (and still am) trying to understand was how would I understand what options are available for use in the file that is loaded. I think for right now I've gotten the rotation I need based of the medium article but if it wasn't for the article I'm not sure I would know how to go about setting up the config file to load. So what I'm trying to ask is not so much for an example, but rather somewhere that explains how to create the config file, like what options you can choose from. I hope this helps explain what I'm requesting but if not please let me know and I will try again. In short what I'm looking for is somewhere that says what the crate is capable of doing and how to make use of those capabilities. I tried checking the docs but I wasn't able to figure it out. PS. If you are not opposed I am willing to do a PR submitting 2 more examples one with rotation by time and the other with rotation by size, as I feel those are probably common use cases that others will also be looking for. Of course, the one based on time would have to be after I understand how to do by time, but I think am already able right now to create a new example from the existing example of logging to a file to add rotation. |
@c-git that sounds great, I would love to have more examples and documentation. |
Ok will do. I'll try to put the PR together. Is there somewhere I can learn about the rotation by time? |
I've created the example for logging to a file with a size based trigger but I haven't been able to find info yet on how to do a time based trigger. If someone could point me in the right direction that would be appreciated. |
Come here for the same question, and after viewing your dialog, I am still a little bit confused, does this Thanks for the great effort put into this crate! |
Take a look here: https://docs.rs/log4rs/0.8.3/log4rs/encode/pattern/index.html#formatters |
I'm sorry but I couldn't find where that link explains how one should go about building a YAML file to be used with log4rs. |
Apologies, I was also looking for complete configuration documentation but also the encoder information. When I found the encoder information, I forgot that you were looking just for the greater config documentation not the encoder. |
I see thanks for explaining. My original question and what I think @SteveLauC was also asking is does the detailed documentation for the file format exists, as we couldn't find it even thought it was referenced by the documentation. |
I think I can back work this from the code and would be happy to do so. I'm just not sure where @estk keeps the documentation? |
I've posted a PR to add the documentation. |
Thank you very much, appreciate the documentation. |
Please pardon my ignorance, I've been looking around but haven't been able to find anywhere that lists what is expected to be in a config file to load the configuration. I've found a few example but nothing that explains what all the options are. Does this exist and I just missed it? In the documentation it says, "...The file module documentation covers the exact configuration syntax, but an example in the YAML format is provided below...". I've tried looking but I haven't been able to find it. Would appreciate if someone can point me in the right direction.
The text was updated successfully, but these errors were encountered: