ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: log reporting?
Date: Wed, 08 May 2013 11:03:44 +0200	[thread overview]
Message-ID: <518A14F0.6030505@wxs.nl> (raw)
In-Reply-To: <CAF=dkzwdz9ZYYfv2-3D-MBTNGNEgDPg2ZoTJSiL1HiqVJ=cetQ@mail.gmail.com>

On 5/2/2013 7:00 PM, Sietse Brouwer wrote:
> Hi Hans,
>
>> How do I enable the output of for example:
>>      report_typescripts("unknown library %a or %a",name_one,name_two)
>
> `logs.reporter("fonts","typescripts")` returns a function for writing
> to the log. Calling that function produces this sort of output:
>
> fonts      > typescripts > bla bla bla
>
> Sometimes calls to a reporter are wrapped in a 'only if tracker x is
> active'. This is not the case with this reporter, though. If this
> reporter is not printing anything, it's because the error condition is
> not arising, not because you didn't activate some tracker.
>
> For completeness: the wiki has more on trackers, including a list of them.
> http://wiki.contextgarden.net/Trackers

context --trackers
context --directives
context --experiments

> And this is what a reporter wrapped in a tracker looks like:
>
>      -- defining the tracker
>      local trace_casing = false
>      trackers.register("typesetters.casing", function(v) trace_casing = v end)
>
>      -- checking whether the tracker is active
>      if trace_casing then
>          report_casing("case trigger %a, instance %a, result
> %a",attr%100,div(attr,100),ok)
>      end

Klopt. En verschillende modules kunnen dezelfde tracker gebruiken (een 
ietwat complex onderliggend mechanisms zorgt er voor dat alles wordt 
gesynchroniseerd).

Men kan ook in texsmfcnf.lua dingen instellen (trackers, directives, 
experiments). Men kan die dingen op verschillende momenten instellen:

- commandline
- environment
- cnf file
- tex/lua file

in volgorde van prioriteit.

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


      reply	other threads:[~2013-05-08  9:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-02 15:30 Meer, H. van der
2013-05-02 17:00 ` Sietse Brouwer
2013-05-08  9:03   ` Hans Hagen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=518A14F0.6030505@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).