Skip to content

Commit

Permalink
Release prep (#145)
Browse files Browse the repository at this point in the history
* Update changelog, simplify docs

* More docs cleanup

* Update CHANGELOG.md
  • Loading branch information
estk authored Mar 11, 2020
1 parent 66af567 commit d05c18b
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 27 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@

### Fixed

## [0.11.0]

A performance issue was discovered with gzip and rolling logs, the `background_rotation` feature was
added to mitigate this by spawning a background thread to perform the rotation in. Shout out to @yakov-bakhmatov
for the PR!

### New

* `background_rotation` feature which rotates and compresses log archives in a background thread.

### Changed

* Deprecate xml feature in preparation for removal.
* Simplify and increase visibility of docs.
* Swap some synchronization primitives to use `parking_lot` implementations.

### Fixed


## [0.10.0]

This is a big release as we're moving to rust 2018 edition!
Expand Down
13 changes: 7 additions & 6 deletions src/append/rolling_file/policy/compound/roll/fixed_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,13 +250,13 @@ impl FixedWindowRollerBuilder {

/// Constructs a new `FixedWindowRoller`.
///
/// `pattern` must contain at least one instance of `{}`, all of which will
/// be replaced with an archived log file's index.
///
/// Note that the pattern is the full path to roll archived logs to.
/// `pattern` is either an absolute path or lacking a leading `/`, relative
/// to the `cwd` of your application. The pattern must contain at least one
/// instance of `{}`, all of which will be replaced with an archived log file's index.
///
/// If the file extension of the pattern is `.gz` and the `gzip` Cargo
/// feature is enabled, the archive files will be gzip-compressed.
/// If the extension is `.gz` and the `gzip` feature is *not* enabled, an error will be returned.
pub fn build(
self,
pattern: &str,
Expand Down Expand Up @@ -294,8 +294,9 @@ impl FixedWindowRollerBuilder {
/// ```yaml
/// kind: fixed_window
///
/// # The filename pattern for archived logs. Must contain at least one `{}`.
/// # Note that the pattern is the full path to roll archived logs to.
/// # The filename pattern for archived logs. This is either an absolute path or if lacking a leading `/`,
/// # relative to the `cwd` of your application. The pattern must contain at least one
/// # instance of `{}`, all of which will be replaced with an archived log file's index.
/// # If the file extension of the pattern is `.gz` and the `gzip` Cargo feature
/// # is enabled, the archive files will be gzip-compressed.
/// # Required.
Expand Down
45 changes: 24 additions & 21 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,35 @@
//! An appender takes a log record and logs it somewhere, for example, to a
//! file, the console, or the syslog.
//!
//! Implementations:
//! - [console](append/console/struct.ConsoleAppenderDeserializer.html#configuration): requires the `console_appender` feature.
//! - [file](append/file/struct.FileAppenderDeserializer.html#configuration): requires the `file_appender` feature.
//! - [rolling_file](append/rolling_file/struct.RollingFileAppenderDeserializer.html#configuration): requires the `rolling_file_appender` feature and can be configured with the `compound_policy`.
//! - [compound](append/rolling_file/policy/compound/struct.CompoundPolicyDeserializer.html#configuration): requires the `compound_policy` feature
//! - Rollers
//! - [delete](append/rolling_file/policy/compound/roll/delete/struct.DeleteRollerDeserializer.html#configuration): requires the `delete_roller` feature
//! - [fixed_window](append/rolling_file/policy/compound/roll/fixed_window/struct.FixedWindowRollerDeserializer.html#configuration): requires the `fixed_window_roller` feature
//! - Triggers
//! - [size](append/rolling_file/policy/compound/trigger/size/struct.SizeTriggerDeserializer.html#configuration): requires the `size_trigger` feature
//!
//! ## Encoders
//!
//! An encoder is responsible for taking a log record, transforming it into the
//! appropriate output format, and writing it out. An appender will normally
//! use an encoder internally.
//!
//! Implementations:
//! - [pattern](encode/pattern/struct.PatternEncoderDeserializer.html#configuration): requires the `pattern_encoder` feature
//! - [json](encode/json/struct.JsonEncoderDeserializer.html#configuration): requires the `json_encoder` feature
//!
//! ## Filters
//!
//! Filters are associated with appenders and, like the name would suggest,
//! filter log events coming into that appender.
//!
//! Implementations:
//! - [threshold](filter/threshold/struct.ThresholdFilterDeserializer.html#configuration): requires the `threshold_filter` feature
//!
//! ## Loggers
//!
//! A log event is targeted at a specific logger, which are identified by
Expand Down Expand Up @@ -75,7 +93,7 @@
//!
//! # Examples
//!
//! Configuration via a YAML file:
//! ## Configuration via a YAML file
//!
//! ```yaml
//! # Scan this file for changes every 30 seconds
Expand Down Expand Up @@ -113,14 +131,16 @@
//! additive: false
//! ```
//!
//! Add the following in your application initialization.
//!
//! ```no_run
//! # #[cfg(feature = "file")]
//! # fn f() {
//! log4rs::init_file("log4rs.yml", Default::default()).unwrap();
//! # }
//! ```
//!
//! Programmatically constructing a configuration:
//! ## Programmatically constructing a configuration:
//!
//! ```no_run
//! # #[cfg(all(feature = "console_appender",
Expand Down Expand Up @@ -160,27 +180,10 @@
//! # fn main() {}
//! ```
//!
//! # Additional Configuration
//! For more examples see the (examples)[https://github.com/estk/log4rs/tree/master/examples] in the source.
//!
//! - Appenders
//! - [console](append/console/struct.ConsoleAppenderDeserializer.html#configuration): requires the `console_appender` feature
//! - [file](append/file/struct.FileAppenderDeserializer.html#configuration): requires the `file_appender` feature
//! - [rolling_file](append/rolling_file/struct.RollingFileAppenderDeserializer.html#configuration): requires the `rolling_file_appender` feature
//! - Encoders
//! - [pattern](encode/pattern/struct.PatternEncoderDeserializer.html#configuration): requires the `pattern_encoder` feature
//! - [json](encode/json/struct.JsonEncoderDeserializer.html#configuration): requires the `json_encoder` feature
//! - Filters
//! - [threshold](filter/threshold/struct.ThresholdFilterDeserializer.html#configuration): requires the `threshold_filter` feature
//! - Policies
//! - [compound](append/rolling_file/policy/compound/struct.CompoundPolicyDeserializer.html#configuration): requires the `compound_policy` feature
//! - Rollers
//! - [delete](append/rolling_file/policy/compound/roll/delete/struct.DeleteRollerDeserializer.html#configuration): requires the `delete_roller` feature
//! - [fixed_window](append/rolling_file/policy/compound/roll/fixed_window/struct.FixedWindowRollerDeserializer.html#configuration): requires the `fixed_window_roller` feature
//! - Triggers
//! - [size](append/rolling_file/policy/compound/trigger/size/struct.SizeTriggerDeserializer.html#configuration): requires the `size_trigger` feature
#![doc(html_root_url = "https://docs.rs/log4rs/0.8")]
#![warn(missing_docs)]

#![warn(missing_docs)]
use arc_swap::ArcSwap;
use fnv::FnvHasher;
use log::{Level, LevelFilter, Metadata, Record, SetLoggerError};
Expand Down

0 comments on commit d05c18b

Please sign in to comment.