/* ******************************************************************************* * Copyright (c) 1996 Martin Poole * ******************************************************************************* ** ** WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! WARNING !! ** ** Any changes to be made to this file should first be checked with ** mplib1 source control for library integrity. ** ** mplib1 source control can be reached at mplib1@quatermass.co.uk ** * * $Source: /home/cvs/cvsroot/onelan/onelan/src/mplib1/libsrc/make_log_str.c,v $ * $Author: mpoole $ * $Date: 2002/10/07 09:37:39 $ * $Revision: 1.2 $ * ******************************************************************************* * * $Log: make_log_str.c,v $ * Revision 1.2 2002/10/07 09:37:39 mpoole * Initial checkin of mplib1-3.1.0 * * Revision 1.1 2002/10/07 09:36:57 mpoole * Initial checkin of mplib1-3.1.0 * * ******************************************************************************* */ /* ------------------------------------------------------------------ Include files ------------------------------------------------------------------ */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* ------------------------------------------------------------------ defines ------------------------------------------------------------------ */ /* ------------------------------------------------------------------ Code starts here ------------------------------------------------------------------ */ char * make_log_str( char *buf ) { static char log_str[TIMESTAMP_STR_SZ]; char pid_str[PID_STR_LEN]; char *tstr; if (buf==NULL) buf=log_str; tstr = make_timestamp_str( NULL ); gen_pid_str( pid_str, getpid() ); sprintf( buf, "%s %s %s ", tstr, pid_str, get_my_uname() ); return(buf); } /* -- End of File -- */