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,FORGED_MUA_MOZILLA, UNCLOSED_BRACKET autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,41c5dc8789baf2f3 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Received: by 10.180.106.199 with SMTP id gw7mr73267wib.0.1348190011842; Thu, 20 Sep 2012 18:13:31 -0700 (PDT) Path: q11ni3492521wiw.1!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.131.MISMATCH!xlned.com!feeder3.xlned.com!news.astraweb.com!border2.a.newsrouter.astraweb.com!newsfeed10.multikabel.net!multikabel.net!newsfeed20.multikabel.net!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!newsreader4.netcologne.de!news.netcologne.de!news.glorb.com!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Date: Tue, 18 Sep 2012 08:36:44 +0200 From: =?ISO-8859-1?Q?Thomas_L=F8cke?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120909 Thunderbird/15.0.1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Understanding Visibility References: In-Reply-To: Message-ID: <5058167c$0$285$14726298@news.sunsite.dk> Organization: SunSITE.dk - Supporting Open source NNTP-Posting-Host: 77.234.168.90 X-Trace: news.sunsite.dk DXC=d]9N]\9DiS=2]0d4PBaYSB=nbEKnk;BeI;]CeQ6;43ZOKe3?:>X1cAE?;m5ccY33>^Oo7SF On 09/17/2012 10:42 PM, tonyg wrote: > > I needed to log some stuff from several tasks in one program. So I wrote a little logging package. I used a package containing several text_io.file_types followed by a protected object to make sure the file operations were not interfered with. > However when things were passed through to inside the protected object I found that the file was not taking the information being passed to it. Can anyone explain this to me, as I think the file should be visible. > You could take a peek at how they solved the problem in the GNATCOLL package, specifically the Traces part: http://docs.adacore.com/gnatcoll-docs/traces.html It works flawlessly, or rather I've not been able to trash it yet. :D Another option is Alog from codelabs: http://www.codelabs.ch/alog/ And a third one is grabbing AWS and look at their AWS.Log package. Lots of good stuff to learn from. Personally I use GNATCOLL.Traces for most of my logging needs, as it can log to syslogd, which I find very handy. -- Thomas L�cke | thomas@12boo.net | http://12boo.net