Main Page Class Hierarchy Compound List File List Compound Members File Members

# logit.c File Reference

`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <stdarg.h>`
`#include <time.h>`
`#include <time_ew.h>`
`#include <earthworm.h>`

Go to the source code of this file.

## Defines
#define | DATE_LEN 10 /** Length of the date field **/
## Functions
void | logit_init (char *prog, short mid, int bufSize, int logflag)
void | logit (char *flag, char *format,...)
int | get_prog_name (char *full_name, char *prog_name)
void | html_logit (char *flag, char *format,...)
## Variables
FILE * | fp = NULL
char | date [DATE_LEN]
char | date_prev [DATE_LEN]
time_t | now
char | logName [256]
char | logpath [128]
char | template [64]
char | extension [12]
char * | buf
tm | res
int | init = 0
int | disk = 1
int | soe = 1
int | pid
int | logbuffersize
int | bErrorIssuedToStderr = 0

## Define Documentation

#define DATE_LEN 10 /** Length of the date field **/

| Definition at line 137 of file logit.c.

## Function Documentation

int get_prog_name | ( | char * | full_name,
|  | char * | prog_name
| ) |

| Definition at line 650 of file logit.c. References EW_FAILURE, and EW_SUCCESS. Referenced by logit_init().

void html_logit | ( | char * | flag,
|  | char * | format,
|  | ... |
| ) |

| Definition at line 692 of file logit.c. References bErrorIssuedToStderr, buf, fp, gmtime_ew(), init, logbuffersize, ReleaseSpecificMutex(), RequestSpecificMutex(), and res.

void logit | ( | char * | flag,
|  | char * | format,
|  | ... |
| ) |

| Definition at line 396 of file logit.c. References bErrorIssuedToStderr, buf, fp, gmtime_ew(), init, logbuffersize, ReleaseSpecificMutex(), RequestSpecificMutex(), res, and soe. Referenced by accept_ew(), add_item(), AHPA_init(), AHPA_next(), AHPA_next_ev(), AppendDateStr(), ArcMsg2EWEvent(), bind_ew(), BuildDateStr(), buildFacList(), BuildPhs(), BuildTerm(), closesocket_ew(), connect_ew(), ConvertNSNMsg(), CreateDir(), CreateMutex_ew(), CreateSACSupportFiles(), CreateSemaphore_ew(), CreateSpecificMutex(), EWEvent2ArcMsg(), GetNEICStaList(), getNextLine(), GetNextLine(), GlEvt2EWEvent(), gma(), GSEPA_close(), GSEPA_end_ev(), GSEPA_init(), GSEPA_next(), GSEPA_next_ev(), init_pri_queue(), InitEWChan(), InitEWEvent(), k2evt2ew(), listen_ew(), log_strongmotion(), log_strongmotionII(), logit_init(), MatchNeic2SCN(), PA_close(), PA_end_ev(), pa_find_data(), PA_init(), PA_next(), PA_next_ev(), ParseEllipse(), ParseMagnitude(), ParseNSNMsg(), ParsePhase(), ParsePhaseMagnitude(), parseSnippet(), pop_next_item(), PostSemaphore(), printFacList(), ProduceSAC_NextStationForEvent(), read_frame(), read_glevt_phasecard(), read_glevt_sumcard(), read_head(), read_hyp(), read_phs(), read_tag(), RecursiveCreateDir(), recv_all(), recv_ew(), recvfrom_ew(), ReleaseMutex_ew(), ReleaseSpecificMutex(), resetTimeout(), Sac2EWEvent(), SAC_filelist(), SAC_reftime(), SAC_SwapDouble(), SAC_SwapLong(), SAC_SwapShort(), SacHeaderInit(), SACmac_init(), SACmac_quicklook(), SACmac_repick(), SACPA_close(), SACPA_end_ev(), SACPA_init(), SACPA_next(), SACPA_next_ev(), SACPABase_close(), SACPABase_end_ev(), SACPABase_end_scn(), SACPABase_end_scn_gm(), SACPABase_init(), SACPABase_next_ev(), SACPABase_next_ev_review(), SACPABase_next_scn(), SACPABase_SetOutputFormat(), SACPABase_write_amppicks(), SACPABase_write_extinfo(), SACPABase_write_parametric(), SACPABase_write_stainfo(), SACPABase_write_trace(), SEIPA_close(), SEIPA_end_ev(), SEIPA_init(), SEIPA_next(), SEIPA_next_ev(), select_ew(), send_ew(), sendall(), SendPage(), sendto_ew(), socket_ew(), SocketPerror(), SocketSysInit(), StringToAmpLine(), StringToLoc(), StringToPhaseLine(), StructMakeLocal(), SUDSPA_end_ev(), SUDSPA_init(), SUDSPA_next(), SUDSPA_next_ev(), SwapDo(), t_atodbl(), TANKPA_close(), TANKPA_end_ev(), TANKPA_init(), TANKPA_next(), TANKPA_next_ev(), WaitSemPost(), wave_client_setup(), wave_inquire(), wave_request(), write_glevt_phasecard(), write_glevt_sumcard(), WriteSAC_Event_BAD(), WriteSAC_NextStationForEvent(), writetrig_init(), wsAppendMenu(), wsAttachServer(), wsGetServerPSCN(), wsGetTraceAscii(), wsGetTraceBin(), wsParseAsciiHeaderReply(), wsParseBinHeaderReply(), wsParseMenuReply(), wsSearchSCN(), wsWaitAscii(), and wsWaitBinHeader().

void logit_init | ( | char * | prog,
|  | short | mid,
|  | int | bufSize,
|  | int | logflag
| ) |

| Definition at line 198 of file logit.c. References buf, CreateSpecificMutex(), disk, EW_SUCCESS, fp, get_prog_name(), gmtime_ew(), init, logbuffersize, logit(), pid, res, and soe. Referenced by main().

## Variable Documentation

int bErrorIssuedToStderr = 0`[static]`

| Definition at line 163 of file logit.c. Referenced by html_logit(), and logit().

char* buf`[static]`

| Definition at line 147 of file logit.c. Referenced by html_logit(), logit(), and logit_init().

char date[DATE_LEN]`[static]`

| Definition at line 140 of file logit.c.

char date_prev[DATE_LEN]`[static]`

| Definition at line 141 of file logit.c.

int disk = 1`[static]`

| Definition at line 150 of file logit.c. Referenced by logit_init().

char extension[12]`[static]`

| Definition at line 146 of file logit.c.

FILE* fp = NULL`[static]`

| Definition at line 139 of file logit.c. Referenced by html_logit(), logit(), and logit_init().

int init = 0`[static]`

| Definition at line 149 of file logit.c. Referenced by html_logit(), logit(), and logit_init().

int logbuffersize`[static]`

| Definition at line 157 of file logit.c. Referenced by html_logit(), logit(), and logit_init().

char logName[256]`[static]`

| Definition at line 143 of file logit.c.

char logpath[128]`[static]`

| Definition at line 144 of file logit.c.

time_t now`[static]`

| Definition at line 142 of file logit.c.

int pid`[static]`

| Definition at line 152 of file logit.c. Referenced by logit_init().

struct tm res`[static]`

| Definition at line 148 of file logit.c. Referenced by html_logit(), logit(), and logit_init().

int soe = 1`[static]`

| Definition at line 151 of file logit.c. Referenced by logit(), and logit_init().

char template[64]`[static]`

| Definition at line 145 of file logit.c.