Changeset 4273
- Timestamp:
- Jun 15, 2005, 9:57:10 AM (21 years ago)
- Location:
- trunk/doc/pslib
- Files:
-
- 2 edited
-
ChangeLogSDRS.tex (modified) (3 diffs)
-
psLibSDRS.tex (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/pslib/ChangeLogSDRS.tex
r4268 r4273 1 %%% $Id: ChangeLogSDRS.tex,v 1.14 6 2005-06-15 02:58:05 price Exp $1 %%% $Id: ChangeLogSDRS.tex,v 1.147 2005-06-15 19:57:10 eugene Exp $ 2 2 3 3 \subsection{Changes from version 00 to version 01} … … 577 577 \end{itemize} 578 578 579 \subsection{Changes from Revision 14 (27 April 2005) to Revision 15 ( ...)}579 \subsection{Changes from Revision 14 (27 April 2005) to Revision 15 (15 June 2005)} 580 580 581 581 \begin{itemize} … … 726 726 \item add \code{limit} param to \code{psDBDeleteRows()} 727 727 \item change \code{p_psDBRunQuery()} to accept a \code{printf()} style format 728 \end{itemize} 728 \item added F (file:line) to psLogMsg and psTrace 729 \item added psLogGetLevel 730 \end{itemize} -
trunk/doc/pslib/psLibSDRS.tex
r4268 r4273 1 %%% $Id: psLibSDRS.tex,v 1.2 89 2005-06-15 02:58:05 price Exp $1 %%% $Id: psLibSDRS.tex,v 1.290 2005-06-15 19:57:10 eugene Exp $ 2 2 \documentclass[panstarrs,spec]{panstarrs} 3 3 … … 11 11 \project{Pan-STARRS Image Processing Pipeline} 12 12 \organization{Institute for Astronomy} 13 \version{1 4}13 \version{15} 14 14 \docnumber{PSDC-430-007} 15 15 … … 43 43 10 & 2004 Nov 30 & update for cycle 4 \\ \hline 44 44 11 & 2005 Jan 21 & draft for cycle 5 \\ \hline 45 12 & 2005 Feb 09 & final for cycle 5 \\ 46 13 & 2005 Mar 30 & draft for cycle 6 \\ 47 14 & 2005 Apr 27 & final for cycle 6 \\ 45 12 & 2005 Feb 09 & final for cycle 5 \\ \hline 46 13 & 2005 Mar 30 & draft for cycle 6 \\ \hline 47 14 & 2005 Apr 27 & final for cycle 6 \\ \hline 48 15 & 2005 Jun 15 & draft for cycle 7 \\ \hline 48 49 \RevisionsEnd 49 50 … … 157 158 158 159 \begin{itemize} 159 \item The memory management functions, defined below, must be written 160 to be thread-safe, since we cannot risk this crucial area being 160 \item The memory management and error stack functions, defined below 161 (Sections~\ref{sec:memory} \&~\ref{sec:errors}), must be written to 162 be thread-safe, since we cannot risk this crucial area being 161 163 unstable. 162 164 \item Re-entrant versions of system calls and external library 163 165 functions should be used. We expect that these cases are 164 166 sufficiently small that we are prepared to err on the side of 165 caution. 167 caution. 166 168 \item The practise of using \code{static} variable to achieve high 167 169 efficiency (e.g., so that subsequent calls do not have to repeat a … … 315 317 316 318 \subsubsection{Memory Management} 319 \label{sec:memory} 317 320 318 321 In the following sections, we specify the API set and define the … … 1219 1222 % 1220 1223 which expects a string consisting of the letters \code{H} (host), 1221 \code{L} (level), \code{M} (message), \code{N} (name), and \code{T}1222 ( time). The default is \code{THLNM}, which produces trace messages in1223 the form:1224 \code{L} (level), \code{M} (message), \code{N} (name), \code{F} 1225 (file:name), and \code{T} (time). The default is \code{THLNM}, which 1226 produces trace messages in the form: 1224 1227 \begin{verbatim} 1225 YYYY-MM-DD hh:mm:ssZ | hostname | L | name 1228 YYYY-MM-DD hh:mm:ssZ | hostname | L | name | file:line 1226 1229 The message goes here 1227 1230 and is indented by 4 spaces. … … 1229 1232 where \code{YYYY}, \code{MM}, \code{DD}, \code{hh}, \code{mm}, and 1230 1233 \code{ss} are the year, month (Jan is 01), day of the month, hours 1231 (0--23), minutes, and seconds when the trace message was received. Note1232 that the timestamp is in ISO order, and that the timezone is GMT1234 (0--23), minutes, and seconds when the trace message was received. 1235 Note that the timestamp is in ISO order, and that the timezone is GMT 1233 1236 (hence the \code{Z}). The \code{hostname} is returned by 1234 \code{gethostname}, \code{L} is a character associated with the level 1235 (\code{A}, \code{E}, \code{W}, and \code{I} for \code{PS_LOG_ABORT}, 1236 \code{PS_LOG_ERROR}, \code{PS_LOG_WARN}, and \code{PS_LOG_INFO} 1237 respectively. Other levels are represented numerically (\code{5} 1238 etc.). The other two fields, \code{facil} and \code{msg}, are the 1239 arguments to \code{psTrace}. The \code{msg} is placed on a new line 1240 (allowing the \code{name} to fill the rest of the previous line), 1241 with each line indented by 4 spaces. An example message is: 1237 \code{gethostname}, \code{L} is the numerical level. The other two 1238 fields, \code{name} and \code{msg}, are the facility name and the 1239 complete message provided to \code{psTrace}. The \code{msg} is placed 1240 on a new line (allowing the \code{name} to fill the rest of the 1241 previous line), with each line indented by 4 spaces. An example 1242 message is: 1242 1243 % 1243 1244 \begin{verbatim} 1244 2004:02:24 20:14:18Z | alibaba.IfA.Hawaii.Edu | I | example.utils.helloWorld 1245 2004:02:24 20:14:18Z | alibaba.IfA.Hawaii.Edu | I | example.utils.helloWorld | example.c:20 1245 1246 Hello world, 1246 1247 it's me calling. … … 1308 1309 \code{PS_LOG_INFO}. 1309 1310 1311 \begin{prototype} 1312 int psLogGetLevel(); 1313 \end{prototype} 1314 % 1315 This function returns the current log level. 1316 1310 1317 Log messages are sent to the destination most recently set using: 1311 1318 % … … 1334 1341 % 1335 1342 which expects a string consisting of the letters \code{H} (host), 1336 \code{L} (level), \code{M} (message), \code{N} (name), and \code{T}1337 ( time). The default is \code{THLNM}, which produces log messages in1338 the form:1343 \code{L} (level), \code{M} (message), \code{N} (name), \code{F} 1344 (file:line), and \code{T} (time). The default is \code{THLNM}, which 1345 produces log messages in the form: 1339 1346 \begin{verbatim} 1340 YYYY-MM-DD hh:mm:ssZ | hostname | L | name 1347 YYYY-MM-DD hh:mm:ssZ | hostname | L | name | file:line 1341 1348 The message goes here 1342 1349 and is indented by 4 spaces. … … 1391 1398 1392 1399 \subsection{Error Handling} 1400 \label{sec:errors} 1393 1401 \hlabel{errorStack} 1394 1402 … … 1400 1408 returns the error code. 1401 1409 \begin{prototype} 1402 psErrorCode p_psError(const char *filename, unsigned int lineno, const char *func, psErrorCode code, 1403 bool new, const char *format, ...); 1404 \end{prototype} 1405 \begin{datatype} 1406 #define psError(code, new, format, ...) psError(__FILE__, __LINE__, __func__, code, new, format, __VA_ARGS__) 1410 psErrorCode p_psError(const char *filename, 1411 unsigned int lineno, 1412 const char *func, 1413 psErrorCode code, 1414 bool new, 1415 const char *format, ...); 1416 \end{prototype} 1417 \begin{datatype} 1418 #define psError(code, new, format, ...) \ 1419 p_psError(__FILE__, __LINE__, __func__, code, new, format, __VA_ARGS__) 1407 1420 \end{datatype} 1408 1421
Note:
See TracChangeset
for help on using the changeset viewer.
