LISTSERV mailing list manager LISTSERV 16.5

Help for QSERV-L Archives


QSERV-L Archives

QSERV-L Archives


QSERV-L@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

QSERV-L Home

QSERV-L Home

QSERV-L  May 2014

QSERV-L May 2014

Subject:

Re: [LSST-data] finalizing logging prototype

From:

Kian-Tat Lim <[log in to unmask]>

Reply-To:

General discussion for qserv (LSST prototype baseline catalog)

Date:

Fri, 23 May 2014 13:55:25 -0700

Content-Type:

multipart/signed

Parts/Attachments:

Parts/Attachments

text/plain (85 lines) , application/pgp-signature (85 lines)

Robert,

> There's no definition of "context" --- the first example uses the
> string 'czar' and I don't know how that's associated with a logger. If
> it needs to be created explicitly from a config file I think we have a
> problem.

	A context is just a way of creating a relative logger name that
is pushed/popped (with RAII now).  "czar" is just the addition to the
logger name path (i.e. default_path = default_path + ".czar").  This new
name can be used in the config file, but it is not created from the
config file.

> The performance of formatted output looks worrying.

	Bill is working on this for boost::format.  Do you find the
snprintf timings to be inadequate, too?

> We probably need to support boost::format too.

	So your desire is to either speed up boost::format to be as fast
as snprintf, or support both, right?

> > 	Having enough debug levels.  I'd like to have at least 3 and
> > 	maybe 5 different debug levels, and preferably control them by a
> > 	numerical parameter not a logger name (protolog.debug(3, ...)
> > 	rather than protolog.debug3(...)) to enable changing the level
> > 	of groups of debug commands. Yes, you can do this with  mylog =
> > 	{3: protolog.debug3);  mylog[3](...) but that's more work.
> 
> You provides only 2 by default, trace and debug (+ info + warn + error
> + fatal).  That's not enough.  There's some python to support other
> levels, but it's not standardized.

	The point is that you should think about your multiple levels
differently -- as multiple loggers rather than multiple levels.  Bill's
sample code just shows the isomorphism between the two, but I don't
think it's recommended that you actually use it.

> > 	output control.  It is convenient to make different debug levels format with different indents
> 
> Is this addressed?  It's not critical.

	No, it's not.  This would require hacking at something closer to
the log4cxx level, I think.

> > 	I think we need to be able to change logging levels from an
> > 	interactive python prompt.
> > 
> > 	This is probably supported, but with debug("afw.image", 1, ...)
> > 	debug("afw.image.fitsio", 2, ...) Can I enable afw debug logging
> > 	at level 1 (which applies to afw.image and afw.image.fitsio),
> > 	then switch afw.image to 2 (which also applies to
> > 	afw.image.fitsio), and then change afw.image.fitsio to yet
> > 	another log level?
> 
> Can you provide a complete example to illustrate this?

setLevel("afw.image", 1)
setLevel("afw.image", 2)
setLevel("afw.image.fitsio", 3)

> My impression is that the levels are handled per-logger, and thus per
> context (== logger?? See comment on contexts above).  Is that right?

	No, there's also inheritance in the tree (if Bill got this
right).

> If so, before I can control the debugging level for a given package I
> need to create a logger, and that requires an xml/log4j file which
> users will *not* want to do.

	No, you create a logger in the code.  The XML/log4j file
controls how that logger logs.

-- 
Kian-Tat Lim, LSST Data Management, [log in to unmask]

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the QSERV-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

March 2018
February 2018
January 2018
December 2017
August 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use