From: Sietse Brouwer <sbbrouwer@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: log reporting?
Date: Thu, 2 May 2013 19:00:51 +0200 [thread overview]
Message-ID: <CAF=dkzwdz9ZYYfv2-3D-MBTNGNEgDPg2ZoTJSiL1HiqVJ=cetQ@mail.gmail.com> (raw)
In-Reply-To: <0623C68C-2855-484A-BADC-DDD188DFB895@uva.nl>
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
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
Hope this helps,
Sietse
___________________________________________________________________________________
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
___________________________________________________________________________________
next prev parent reply other threads:[~2013-05-02 17:00 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 [this message]
2013-05-08 9:03 ` Hans Hagen
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='CAF=dkzwdz9ZYYfv2-3D-MBTNGNEgDPg2ZoTJSiL1HiqVJ=cetQ@mail.gmail.com' \
--to=sbbrouwer@gmail.com \
--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).