diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-06-14 11:03:34 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-06-15 23:30:24 -0700 |
| commit | 89b0e6e12ba2fb24ec0e6655a1130c16eb8d1745 (patch) | |
| tree | 842308cfd38935989d625db41ffdd22758f8acdb /src/liblog | |
| parent | 6d8342f5e9f7093694548e761ee7df4f55243f3f (diff) | |
| download | rust-89b0e6e12ba2fb24ec0e6655a1130c16eb8d1745.tar.gz rust-89b0e6e12ba2fb24ec0e6655a1130c16eb8d1745.zip | |
Register new snapshots
Diffstat (limited to 'src/liblog')
| -rw-r--r-- | src/liblog/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/liblog/lib.rs b/src/liblog/lib.rs index 2ecfef35308..90a186f59d2 100644 --- a/src/liblog/lib.rs +++ b/src/liblog/lib.rs @@ -155,7 +155,7 @@ pub static WARN: u32 = 2; /// Error log level pub static ERROR: u32 = 1; -local_data_key!(local_logger: Box<Logger:Send>) +local_data_key!(local_logger: Box<Logger + Send>) /// A trait used to represent an interface to a task-local logger. Each task /// can have its own custom logger which can respond to logging messages @@ -226,7 +226,7 @@ pub fn log(level: u32, loc: &'static LogLocation, args: &fmt::Arguments) { // frob the slot while we're doing the logging. This will destroy any logger // set during logging. let mut logger = local_logger.replace(None).unwrap_or_else(|| { - box DefaultLogger { handle: io::stderr() } as Box<Logger:Send> + box DefaultLogger { handle: io::stderr() } as Box<Logger + Send> }); logger.log(&LogRecord { level: LogLevel(level), @@ -246,7 +246,7 @@ pub fn log_level() -> u32 { unsafe { LOG_LEVEL } } /// Replaces the task-local logger with the specified logger, returning the old /// logger. -pub fn set_logger(logger: Box<Logger:Send>) -> Option<Box<Logger:Send>> { +pub fn set_logger(logger: Box<Logger + Send>) -> Option<Box<Logger + Send>> { local_logger.replace(Some(logger)) } |
