IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 22 years ago

Closed 22 years ago

Last modified 22 years ago

#189 closed defect (fixed)

error name size and message logging.

Reported by: robert.desonia@… Owned by: Paul Price
Priority: high Milestone:
Component: PSLib SDRS Version: unspecified
Severity: normal Keywords:
Cc:

Description

The SDRS states that the error name "is of the form aaa.bbb.ccc and identifies
the component raising the error." (ref:sec 2.5) Also, the message logging
section (2.4.2) limits the output of the name in the log to be only 15
characters.

If I interpret the aaa.bbb.ccc form to be a specific identifier in the form
lib.subdir.function (e.g., psLib.sysUtils.psLogSetDestination), this makes for
a name in which is much more than 15 characters long. In fact, the lib.subdir
is all that fits in the log message at all. I adjusted the log output to
print the last part of the name instead of the first, but I don't know if that
is really desirable either.

We could:

  1. do nothing;


  1. increase the name size in the message log;


  1. reformat the message log to be multiple lines (more like the cvs log

format); and/or

  1. specify a shorter naming convention.



What are your thoughts?

-rdd

Change History (3)

comment:1 by Paul Price, 22 years ago

Resolution: fixed
Status: newclosed

Let's go with option 3. I patched the SDRS (see below). The substance of the
change is that the "name" may take the rest of the line, and the message starts
on the line below, with each line indented by four spaces (i.e., "\n" in the msg
must end up being "\n ").

The output format is controlled with the function:
%
\begin{verbatim}
void psLogSetFormat(const char *fmt);
\end{verbatim}
%
which expects a string consisting of the letters \code{H} (host),
\code{L} (level), \code{M} (message), \code{N} (name), and \code{T}
(time). The default is \code{THLNM}, which produces log messages in
the form:
\begin{verbatim}
YYYY:MM:DD hh:mm:ssZ | hostname | L | name

The message goes here
and is indented by 4 spaces.

\end{verbatim}
where \code{YYYY}, \code{MM}, \code{DD}, \code{hh}, \code{mm}, and
\code{ss} are the year, month (Jan is 01), day of the month, hours
(0--23), minutes, and seconds when the log message was received. Note
that the timestamp is in ISO order, and that the timezone is GMT
(hence the \code{Z}). The \code{hostname} is returned by
\code{gethostname}, \code{L} is a character associated with the level
(\code{A}, \code{E}, \code{W}, and \code{I} for \code{PS_LOG_ABORT},
\code{PS_LOG_ERROR}, \code{PS_LOG_WARN}, and \code{PS_LOG_INFO}
respectively. Other levels are represented numerically (\code{5}
etc.). The other two fields, \code{name} and \code{msg}, are the
arguments to \code{psLogMsg}. The \code{msg} is placed on a new line
(allowing the \code{name} to fill the rest of the previous line),
with each line indented by 4 spaces. An example message is:
%
\begin{verbatim}
2004:02:24 20:14:18Z | alibaba.IfA.Hawaii.Edu | I | example.utils.helloWorld

Hello world,
it's me calling.

\end{verbatim}
%
The possible order of the format entries is fixed and not determined
by the order of the letters used in \code{psLogSetFormat}. Selecting
an output format with fewer than the complete set of 5 entries simply
removes those entries from the output messages.

comment:2 by Paul Price, 22 years ago

Keywords: VERIFIED added

Closing subsequent to release of SDRS-08, ADD-07.

comment:3 by Paul Price, 22 years ago

Keywords: VERIFIED removed
Note: See TracTickets for help on using tickets.