From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=FREEMAIL_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 8629da55 for ; Thu, 7 Feb 2019 14:33:31 +0000 (UTC) Received: (qmail 7390 invoked by alias); 7 Feb 2019 14:33:16 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23864 Received: (qmail 7487 invoked by uid 1010); 7 Feb 2019 14:33:16 -0000 X-Qmail-Scanner-Diagnostics: from mout.gmx.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.100.2/25112. spamassassin: 3.4.2. Clear:RC:0(212.227.17.22):SA:0(-2.6/5.0):. Processed in 3.68676 secs); 07 Feb 2019 14:33:16 -0000 X-Envelope-From: llua@gmx.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Subject: Re: How to obtain a simple use-case: redirect filtered data into file, unfiltered to the terminal? To: zsh-users@zsh.org References: From: Eric Cook Message-ID: <9637b990-d6d7-3ae9-ac81-0aa86df87c6b@gmx.com> Date: Thu, 7 Feb 2019 09:27:53 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:PGtPIKT/WDvBVio7FR2t1VgjSwSx1KvBSz8w6NTNs7AtsLcdDJK c/b0NOQfdRT+Ntnib9cwXzDGBTicWsWD1+cUxuolD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e +O0O6J924KlUCLWOGXDshzZSaayhxtJIo8IT3Iajnnsll2a2QoNmoePU75h3eI On 2/7/19 8:12 AM, Sebastian Gniazdowski wrote: > Hello, > I have a simple use-case that I would want to implement: > 1. There is an application that outputs colorized logs. > 2. I want the logs to go into a file (say `operation.log') filtered, > i.e. without colors. > 3. But at the same time still go to the terminal unfiltered. > 4. I want the application to have a positive response from the > iatty(1) function, i.e. that the application is thinking that the > output is to the terminal (well, it really *is*, it's just that it. > *also* goes to the file). Implement logging in the application.