diff options
author | Christian Duerr <contact@christianduerr.com> | 2020-05-05 22:50:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-05 22:50:23 +0000 |
commit | 81ce93574f62d4b117fdd79af65391f30316a457 (patch) | |
tree | 951a0578860c6028e2dfff0ca83879001c6b2385 /alacritty/src/logging.rs | |
parent | 04f0bcaf54ed373128ca0f84ee8fcdd8e52bce23 (diff) | |
download | r-alacritty-81ce93574f62d4b117fdd79af65391f30316a457.tar.gz r-alacritty-81ce93574f62d4b117fdd79af65391f30316a457.tar.bz2 r-alacritty-81ce93574f62d4b117fdd79af65391f30316a457.zip |
Extend style guideline documentation
Diffstat (limited to 'alacritty/src/logging.rs')
-rw-r--r-- | alacritty/src/logging.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/alacritty/src/logging.rs b/alacritty/src/logging.rs index 569135ec..defa4605 100644 --- a/alacritty/src/logging.rs +++ b/alacritty/src/logging.rs @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -//! Logging for alacritty. +//! Logging for Alacritty. //! //! The main executable is supposed to call `initialize()` exactly once during //! startup. All logging messages are written to stdout, given that their @@ -151,19 +151,19 @@ impl OnDemandLogFile { let mut path = env::temp_dir(); path.push(format!("Alacritty-{}.log", process::id())); - // Set log path as an environment variable + // Set log path as an environment variable. env::set_var(ALACRITTY_LOG_ENV, path.as_os_str()); OnDemandLogFile { path, file: None, created: Arc::new(AtomicBool::new(false)) } } fn file(&mut self) -> Result<&mut LineWriter<File>, io::Error> { - // Allow to recreate the file if it has been deleted at runtime + // Allow to recreate the file if it has been deleted at runtime. if self.file.is_some() && !self.path.as_path().exists() { self.file = None; } - // Create the file if it doesn't exist yet + // Create the file if it doesn't exist yet. if self.file.is_none() { let file = OpenOptions::new().append(true).create(true).open(&self.path); |