Hi,
I have given this more thought. The point is to create an API that can be
used in prototyping for the purpose of logging. Doesn't matter what code
sits behind it. The API either meets the requirements or it doesn't. If
we have done a good job with the API, we can swap out the code behind it
with no effect on the application. Robyn suggested using the Python
logging utility that I found too complicated. We could use that behind
the API I suggested with the addition of another function or so that sets
up configuration parameters.
Now there is the issue of exactly where in the code we were when the
message was sent. Russell and I talked about adding a parameter for that.
syslog or syslog-ng record which machine and user sent the message, but
we may want an extra level of detail. I suppose you could even create
a string of full pathname and line number to add to the message.
Cheers,
Michelle
On Mon, 12 Jun 2006, [EMAIL PROTECTED] wrote:
Tim,
On Sat, 10 Jun 2006, Tim Axelrod wrote:
Hi Michelle,
I find it hard to see what's been accomplished here. Python already has a
syslog module, with exactly the API you specify (OK, actually the order of
the priority and the message are reversed :-)). So are you basically
suggest we rename the standard python library module syslog to be log?
We will want to provide some way of identifying the application messages we
are interested in saving/sorting. We can either do that by wrapping the call
to syslog to only permit pre-defined values that we create syslog.conf files
for OR we can set a policy that says applications call the Python syslog but
only with parameters we specify. On one hand the code enforces policy and on
the other we rely on programmers. I think either option would be reasonable.
Our requirements for the log class, you will recall, are:
1. That it generate messages in a uniform format that includes date/time
and information on the location of the log call inside the application.
This is done automatically by syslog. Nothing extra needed to be done.
2. That log messages from all nodes be aggregated into a single log file.
This is done by altering the syslog.conf file on each machine to send
LOG_USER messages to one machine. And the syslog.conf of the central machine
would specify a filename or pattern that would contain only our messages.
Cheers,
Michelle
_______________________________________________
LSST-data mailing list
[email protected]
http://www.lsstmail.org/mailman/listinfo/lsst-data