From: wanneng on
I want to find a log framwork for fortran which like the log4j.Is there
anybody know something?
From: Richard Maine on
wanneng <yangguosdxl(a)gmail.com> wrote:

> I want to find a log framwork for fortran which like the log4j.Is there
> anybody know something?

I've never heard of log4j, though google points me to it pretty quickly
and gives me an idea what you are talking about. I don't know of any
special "framework" for it, but maybe that's just because it is easy
enough to do at least the basics without special help.

It is quite common for people to put debugging output in their code and
have that debugging output be controlled by a variable that can be set
at run time, either by a configuration file or other means. As far as I
can see from a (very) quick glance, that's what log4j does. The
description of log4j alludes to significant performance penalties from
java log statements, even when logging is turned off. I don't know
enough about java to evaluate that. (Heck, I don't even know whether
there is a special log statement or they are talking about something
more general). But it certainly is not the case that you would even be
able to measure any performance difference from even a lot of such
conditional outputs in Fortran.

Unless I am misunderstanding what log4j is about (which is possible, as
my skim was pretty quick), just do it "manually" in a straightforward
way. No special package should be needed in Fortran. As mentioned,
people do this quite a lot. I'm sure I recall some regulars here saying
that they made a practice of it. Perhaps they might have some particular
hints, but I wasn't thinking there was anything special enough that any
hints would help.

--
Richard Maine | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle | -- Mark Twain
From: Arjen Markus on
On 4 mrt, 04:38, nos...(a)see.signature (Richard Maine) wrote:
> wanneng <yangguos...(a)gmail.com> wrote:
> > I want to find a log framwork for fortran which like the log4j.Is there
> > anybody know something?
>
> I've never heard of log4j, though google points me to it pretty quickly
> and gives me an idea what you are talking about. I don't know of any
> special "framework" for it, but maybe that's just because it is easy
> enough to do at least the basics without special help.
>
> It is quite common for people to put debugging output in their code and
> have that debugging output be controlled by a variable that can be set
> at run time, either by a configuration file or other means. As far as I
> can see from a (very) quick glance, that's what log4j does. The
> description of log4j alludes to significant performance penalties from
> java log statements, even when logging is turned off. I don't know
> enough about java to evaluate that. (Heck, I don't even know whether
> there is a special log statement or they are talking about something
> more general). But it certainly is not the case that you would even be
> able to measure any performance difference from even a lot of such
> conditional outputs in Fortran.
>
> Unless I am misunderstanding what log4j is about (which is possible, as
> my skim was pretty quick), just do it "manually" in a straightforward
> way. No special package should be needed in Fortran. As mentioned,
> people do this quite a lot. I'm sure I recall some regulars here saying
> that they made a practice of it. Perhaps they might have some particular
> hints, but I wasn't thinking there was anything special enough that any
> hints would help.
>
> --
> Richard Maine                    | Good judgment comes from experience;
> email: last name at domain . net | experience comes from bad judgment.
> domain: summertriangle           |  -- Mark Twain

My Flibs project (http://flibs.sf.net) contains a module m_logger (by
Michael Baudin)
to do that sort of things. You may have to use the CVS repository
directly - I am
not sure I have already included it in a tar-file.

It is by no means as extensive as log4j, but it does a nice job.

Regards,

Arjen
set of subroutines in Fortran is taking
From: George White on
On Thu, 4 Mar 2010, wanneng wrote:

> I want to find a log framwork for fortran which like the log4j.Is there
> anybody know something?

The slatec xerror package has some overlap. A nice feature of xerror for
numerical calculations is the ability to produce a table at the end of a
job with a count of each type of (non-fatal) error that ocurred during a
run.

--
George White <aa056(a)chebucto.ns.ca> <gnw3(a)acm.org>
189 Parklea Dr., Head of St. Margarets Bay, Nova Scotia B3Z 2G6