]>
git.proxmox.com Git - rustc.git/blob - vendor/env_logger/src/fmt/writer/atty.rs
2 This internal module contains the terminal detection implementation.
4 If the `auto-color` feature is enabled then we detect whether we're attached to a particular TTY.
5 Otherwise, assume we're not attached to anything. This effectively prevents styles from being
9 #[cfg(feature = "auto-color")]
11 use is_terminal
::IsTerminal
;
13 pub(in crate::fmt
) fn is_stdout() -> bool
{
14 std
::io
::stdout().is_terminal()
17 pub(in crate::fmt
) fn is_stderr() -> bool
{
18 std
::io
::stderr().is_terminal()
22 #[cfg(not(feature = "auto-color"))]
24 pub(in crate::fmt
) fn is_stdout() -> bool
{
28 pub(in crate::fmt
) fn is_stderr() -> bool
{
33 pub(in crate::fmt
) use self::imp
::*;