> -----Original Message----- > From: Linux on 390 Port [mailto:[EMAIL PROTECTED] On > Behalf Of David Boyes > Sent: Tuesday, July 17, 2007 11:44 AM > To: [email protected] > Subject: Re: Anything in UNIX like a z/OS GDG? > >
<snip> > There is a C function called tmpnam that will create a temporary file > name for you, but there isn't a concept of a GDG; you get a name > generated by the call which is seldom human predictable. > > A suggestion, though: Rather than invent your own logging, use syslog. > It's better integrated with management tools, and you don't have to > worry about the file storage at all, and your operators only have one > place to look for problems. > > For C or other compiled languages, #include syslog.h in your program, > and then use openlog/syslog/closelog to write messages. > > For scripts, you can use 'logger' in to do the same job. Creating the > log entry becomes something like: > > logger -p local0.notice -t MYHOST: 'Application Foo Borked Itself. > Please check it.' > > Much easier and much more system management friendly. > > -- db Hum, that's an idea. The only "negative" is that syslog does not separate multiple executions of the program into different files. I guess that I could put in a START and END type log information in that case and then split the logger file based on that. Oh, and include the PID just in case there are multiple, concurrent executions of the program. Definately something to consider. That's what my z/OS ftp server does so that interspersed log records are attributed to the correct client. Oh, and I know that I said "log", but I really misspoke. This is more like a report than a log. That is, it is something that a person might want to review or email to an end user. I guess I'm not yet over whatever it was that got ahold of me on the weekend. The brain is still a bit fuzzy. -- John McKown Senior Systems Programmer HealthMarkets Keeping the Promise of Affordable Coverage Administrative Services Group Information Technology The information contained in this e-mail message may be privileged and/or confidential. It is for intended addressee(s) only. If you are not the intended recipient, you are hereby notified that any disclosure, reproduction, distribution or other use of this communication is strictly prohibited and could, in certain circumstances, be a criminal offense. If you have received this e-mail in error, please notify the sender by reply and delete this message without copying or disclosing it. ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
