Google Groups Home
Help | Sign in
Logging
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
Tiago Antão  
View profile
 More options Jul 20 2006, 5:23 am
Newsgroups: fa.caml
From: "Tiago Antão" <tiagoan...@gmail.com>
Date: Thu, 20 Jul 2006 09:23:38 UTC
Local: Thurs, Jul 20 2006 5:23 am
Subject: [Caml-list] Logging
Hi!

Are there any best practices/libraries regarding logging in CAML? My
main use for it will be debugging (I know there are debugging
facilities in CAML, but I am very used to using log as a debug tool -
think Log4J for instance)...

Thanks a lot,
Tiago

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthieu Dubuget  
View profile
 More options Jul 20 2006, 6:16 am
Newsgroups: fa.caml
From: Matthieu Dubuget <matthieu.dubu...@laposte.net>
Date: Thu, 20 Jul 2006 10:16:09 UTC
Local: Thurs, Jul 20 2006 6:16 am
Subject: Re: [Caml-list] Logging
Tiago Antão a écrit :

> Hi!

> Are there any best practices/libraries regarding logging in CAML? My
> main use for it will be debugging (I know there are debugging
> facilities in CAML, but I am very used to using log as a debug tool -
> think Log4J for instance)...

> Thanks a lot,
> Tiago

I do not know Log4J. For the same purpose as yours, I did a small Log
library, using another one, called Tics.

Tics is a binding to QueryPerformanceCouter and al. on MS Windows. At
this moment, it is not multiplatform, but this should be done very easily.

I need Tics because each message sent to Log is timestamped and stored
in memory. The user of Log then can flush and print or display the
stored message when possible.

I did this because I have plenty of memory for those tests, and I wanted
to avoid IO perturbations of timing. I also needed precise timing,
because I'm working with hardware.

Except from those constraint, I really don't think my tools are forth usi
ng.

Salutations

Matt

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
James Woodyatt  
View profile
 More options Jul 20 2006, 3:31 pm
Newsgroups: fa.caml
From: James Woodyatt <jhwoody...@mac.com>
Date: Thu, 20 Jul 2006 19:31:22 UTC
Local: Thurs, Jul 20 2006 3:31 pm
Subject: Re: [Caml-list] Logging
On Jul 20, 2006, at 2:20 AM, Tiago Antão wrote:

> Are there any best practices/libraries regarding logging in CAML? My
> main use for it will be debugging (I know there are debugging
> facilities in CAML, but I am very used to using log as a debug tool -
> think Log4J for instance)...

You may want to have a look at the Cf_journal module in my recently  
released OCaml NAE Core Foundation library.  See <http://sf.net/
projects/ocnae/> for downloads.  It's not anywhere near as full-
featured as Log4J, but it was intended as a foundation upon which to  
build something that full-featured.

I find it works pretty well for debugging purposes.  Your mileage may  

vary.


j h woodyatt <j...@conjury.org>


j h woodyatt <j...@conjury.org>

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jean-Christophe Filliatre  
View profile
 More options Jul 21 2006, 5:02 am
Newsgroups: fa.caml
From: Jean-Christophe Filliatre <filli...@lri.fr>
Date: Fri, 21 Jul 2006 09:02:55 UTC
Local: Fri, Jul 21 2006 5:02 am
Subject: Re: [Caml-list] Logging

Tiago Antão writes:

 >
 > Are there any best practices/libraries regarding logging in CAML? My
 > main use for it will be debugging (I know there are debugging
 > facilities in CAML, but I am very used to using log as a debug tool -
 > think Log4J for instance)...

I'm also  using logging  as a  debug facility sometimes,  and I  use a
printf-like function for this purpose, as follows:

=========================
=========================
====================
let log_ch = open_out "logfile"
let log = Format.formatter_of_out_channel log_ch
let () = at_exit (fun () -> Format.pp_print_flush log (); close_out log
_ch)
let lprintf s = Format.fprintf log s
=========================
=========================
====================

which provides a function lprintf of type

=========================
=========================
====================
val lprintf : ('a, Format.formatter, unit) format -> 'a = <fun>
=========================
=========================
====================

to be used like Format.printf.

This is surely not  the best way to do, and not  very powerful, but at
least  it is  convenient  to  use when  you  already have  Format-like
printers for your datatypes (using %a).

Hope this helps,
--
Jean-Christophe

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google