Browse thread
[Caml-list] kprintf with user formatters
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Markus Mottl <markus@o...> |
| Subject: | Re: [Caml-list] kprintf with user formatters |
On Wed, 14 Jul 2004, Pierre Weis wrote:
> Your problem is thus that the function Debug.printf is not the right
> one (since it has not the right type :)
Btw., since we are at it: I'd like to use my own printers depending on
a conditional, e.g.:
let log level fmt =
if may_log level then
kfprintf ...
else
???
If the given log level "level" does not allow logging the message
specified by "fmt", I just want to ignore the parameters provided together
with "fmt" - but how? Is there some (safe) trick, or do I have to write
my own Printf/Format-modules? I don't want to waste computation time
by unnecessarily converting format arguments to strings, which may be
very costly, e.g. when this would mean converting IPs to hostnames, etc.
Regards,
Markus
--
Markus Mottl http://www.oefai.at/~markus markus@oefai.at
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners