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: Wed, 29 Jul 2015 10:02:49 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <9d870b85-cd15-4814-af8d-0e0cd65eaff6@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Wed, 29 Jul 2015 10:02:49 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="da745e888d4a5182b5fda6212bbb0a63"; logging-data="22487"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+RpHQmok0rqTb7cpzyhkZ7dhVwTUEpADY=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:U3GKnbvA96lihnNH0apFb8Y7XWw= Xref: news.eternal-september.org comp.lang.ada:27121 Date: 2015-07-29T10:02:49+00:00 List-Id: On Tue, 28 Jul 2015 04:39:45 -0700, EGarrulo wrote: > On Tuesday, July 28, 2015 at 12:30:18 PM UTC+2, Brian Drummond wrote: >> 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. > > Thanks but this wouldn't work in my case because I want logging code to > stay, while being able to enable or disable it -- and with different > levels -- at runtime. In which case you don't need the second (null) package body. Instead, the package exports means to control logging level. -- Brian