← Back to team overview

ufl team mailing list archive

Re: Debug level messages

 

On Sat, Mar 07, 2009 at 12:51:41PM +0100, Martin Sandve Alnæs wrote:
> Rather:
> 
>   l = ufl.get_logger()
>   level = (logging.INFO + logging.DEBUG)/2
>   l.log(level, "message")
> 
> You can also print to log files with different output
> level than on screen, see recently added logtest.py.
> You can even attach the same file handler to e.g. the
> FFC log, getting merged output from FFC and UFL.
> 
> Martin

What I meant was is there an easy way to write debug messages from
within UFL (or FFC) at a specific log level. Something like

  debug("message", level=3)

or similar.

-- 
Anders


> 
> 
> On Sat, Mar 7, 2009 at 12:08 PM, Martin Sandve Alnæs <martinal@xxxxxxxxx> wrote:
> > l = ufl.log.ufl_logger.get_logger()
> > l.log((logging.INFO + logging.DEBUG)/2, "message")
> >
> > Martin
> >
> >
> >
> > 2009/3/6 Anders Logg <logg@xxxxxxxxx>:
> >> Is there any way to write debug messages on a level other than 0
> >> (using info) or 1 (using debug)?
> >>
> >>
> >> -----BEGIN PGP SIGNATURE-----
> >> Version: GnuPG v1.4.9 (GNU/Linux)
> >>
> >> iEYEARECAAYFAkmxjYoACgkQTuwUCDsYZdEu+QCfYvOvQDKs2VJaV/GQy8rRtZgK
> >> ZP4An11hJ1Rgba/MakLVLvLUgI344Zws
> >> =5eDk
> >> -----END PGP SIGNATURE-----
> >>
> >> _______________________________________________
> >> UFL-dev mailing list
> >> UFL-dev@xxxxxxxxxx
> >> http://fenics.org/mailman/listinfo/ufl-dev
> >>
> >>
> >

Attachment: signature.asc
Description: Digital signature


Follow ups

References