From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Running a preprocessor from GPS? Date: Tue, 28 Jul 2015 10:28:42 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 28 Jul 2015 10:28:42 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="da745e888d4a5182b5fda6212bbb0a63"; logging-data="22833"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19RG3wqLLIizzXcg94pNozE7HgIm1NoCSc=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:GVktnDz+3CgbiTLJYMf8sXzpi8g= Xref: news.eternal-september.org comp.lang.ada:27073 Date: 2015-07-28T10:28:42+00:00 List-Id: On Mon, 27 Jul 2015 07:28:33 -0700, EGarrulo wrote: > I would like to add logging statements to my units. By using > GNATColl.Traces, I could add lines like this one: > > if Active (Me) then > Trace (Me, "Performing Step " & Step(...)); > end if; > > However, this is too verbose. Wrap the test and the string formatting into a procedure. You'll probably need a family of such procedures for different formats - keep them in a package. Write a second package body, where every procedure implementation is simply "null;" and build with whichever package body is appropriate. -- Brian