Skip to content
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

logging levels and corresponding macros #201

Closed
wants to merge 4 commits into from

Conversation

Projects
None yet
2 participants
@jesusbv
Copy link
Contributor

jesusbv commented Jun 21, 2017

As discussed in issue 121,

The loggin levels are mentioned in the use section

jesusbv added some commits Jun 21, 2017

loggin levels and corresponding macros
loggin levels mentioned in the use section of
crate docs. Ref #121

@jesusbv jesusbv changed the title loggin levels and corresponding macros logging levels and corresponding macros Jun 25, 2017

src/lib.rs Outdated
//! - [trace](https://github.com/rust-lang-nursery/log/blob/master/src/macros.rs#L209)
//!
//! All of these macros accept formatting strings
//! similarly to [println!](https://github.com/rust-lang/rust/blob/master/src/libstd/macros.rs#L127)

This comment has been minimized.

@brson

brson Jul 6, 2017

Contributor

Thanks a bunch @jesusbv, and sorry for taking so long to get back to you.

I wonder if you might take a slightly different approach here, and instead of creating a new 'logging levels' section, write some prose that gets this same information across, setting the stage for the detail that comes in following section.

It might begin like

# Use

The basic use of the log crate is through the five logging macros: [`error!`], [`warn!`], { etc },
where `error!` represents the highest-priority log level, and `trace!` the lowest.
Each of these macros accept format strings similarly to `println!`.

For the hyperlinks you'll want to use rustdoc links, not code links; for the internal links, relative links, and the std links absolute links.

So the error! link would probably be ./macro.error.html and the println! link https://doc.rust-lang.org/stable/std/macro.println.html.

If you convert the list to prose you'll probably want to use out-of-line links like

The [`error!`] macro.

[`error!`]: ./macro.error.html

This comment has been minimized.

@jesusbv

jesusbv Jul 11, 2017

Author Contributor

Thanks for the update @brson. Sorry not to reply sooner.

I have converted it to prose version and updated the links.

@brson

This comment has been minimized.

Copy link
Contributor

brson commented Jul 6, 2017

Thanks a bunch @jesusbv. Sorry for the long delay. Feel free to ping me on irc or email any time.

@@ -26,6 +26,20 @@
//!
//! # Use
//!
//! The basic use of the log crate is through the five logging macros: [`error!`],
//! [`warn!`], [`info!`], [`debug!`] and [`trace!`]
//! where `error!` represents the highest-priority log level, and `trace!` the lowest.

This comment has been minimized.

@brson

brson Jul 12, 2017

Contributor

Can you put a comma before 'where'?

//! [`Trace`][level_link] level log messages. A logging implementation
//! should provide a function that wraps a call to [`set_logger`], handling
//! [`Trace`][level_link] level log messages. A logging framework should
//! provide a function that wraps a call to [`set_logger`], handling

This comment has been minimized.

@brson

brson Jul 12, 2017

Contributor

These changes of "implementation" to "framework" seem indicative of a problem. Previously there was a patch merged that converted "framework" to "implementation", and I assume you did not mean to change these all to "framework". Can you take a look at this diff and see if all these changes are intended? It may be prudent to re-start from the master branch and just make the intended change again.

@jesusbv jesusbv closed this Jul 12, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.