Skip to content

Commit 3875ec7

Browse files
committed
---
yaml --- r: 31067 b: refs/heads/incoming c: 0dd4b42 h: refs/heads/master i: 31065: dcbf37c 31063: 58f1e95 v: v3
1 parent 0ad9d95 commit 3875ec7

File tree

2 files changed

+13
-18
lines changed

2 files changed

+13
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9-
refs/heads/incoming: 2f50607d8840d2ea7de6a7367ab9854d6951e889
9+
refs/heads/incoming: 0dd4b42a00e01189a28ec12d20a8b144b4e02a14
1010
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/doc/rust.md

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2306,30 +2306,25 @@ logging level:
23062306
// Full version, logging a value.
23072307
log(core::error, ~"file not found: " + filename);
23082308
2309-
// Log-level abbreviated, since core::* is imported by default.
2309+
// Log-level abbreviated, since core::* is used by default.
23102310
log(error, ~"file not found: " + filename);
23112311
2312-
// Formatting the message using a format-string and #fmt
2312+
// Formatting the message using a format-string and fmt!
23132313
log(error, fmt!("file not found: %s", filename));
23142314
2315-
// Using the #error macro, that expands to the previous call.
2315+
// Using the error! macro, that expands to the previous call.
23162316
error!("file not found: %s", filename);
23172317
~~~~
23182318

2319-
A `log` expression is *not evaluated* when logging at the specified
2320-
logging-level, module or task is disabled at runtime. This makes inactive
2321-
`log` expressions very cheap; they should be used extensively in Rust
2322-
code, as diagnostic aids, as they add little overhead beyond a single
2323-
integer-compare and branch at runtime.
2324-
2325-
Logging is presently implemented as a language built-in feature, as it makes
2326-
use of compiler-provided logic for allocating the associated per-module
2327-
logging-control structures visible to the runtime, and lazily evaluating
2328-
arguments. In the future, as more of the supporting compiler-provided logic is
2329-
moved into libraries, logging is likely to move to a component of the core
2330-
library. It is best to use the macro forms of logging (*#error*,
2331-
*#debug*, etc.) to minimize disruption to code using the logging facility
2332-
when it is changed.
2319+
A `log` expression is *not evaluated* when logging at the specified logging-level, module or task is disabled at runtime.
2320+
This makes inactive `log` expressions very cheap;
2321+
they should be used extensively in Rust code, as diagnostic aids,
2322+
as they add little overhead beyond a single integer-compare and branch at runtime.
2323+
2324+
Logging is presently implemented as a language built-in feature,
2325+
as it makes use of compiler-provided, per-module data tables and flags.
2326+
In the future, logging will move into a library, and will no longer be a core expression type.
2327+
It is therefore recommended to use the macro forms of logging (`error!`, `debug!`, etc.) to minimize disruption in code that uses logging.
23332328

23342329

23352330
### Assert expressions

0 commit comments

Comments
 (0)