C Board  

Go Back   C Board > General Programming Boards > Networking/Device Communication

Reply
 
LinkBack Thread Tools Display Modes
Old 04-19-2006, 07:23 PM   #1
Registered User
 
Join Date: Sep 2004
Posts: 99
write a log file

I do not even know where to start. How do I create a log file where after executing some client-server communication user can read what kind of info exchange was performed. I'm writing this in C.
Any introductory comments where to look for info???
Thanks.
kocika73 is offline   Reply With Quote
Old 04-19-2006, 07:38 PM   #2
Registered User
 
Join Date: Nov 2001
Posts: 1,348
fopen()

http://www.cplusplus.com/

Check out my website for software development links.

http://www.dslextreme.com/users/kuphryn/links.html

Kuphryn
kuphryn is offline   Reply With Quote
Old 04-20-2006, 05:36 AM   #3
Registered User
 
Join Date: Sep 2004
Posts: 99
That's not what I meant. Thanks anyway.
I have no problems with files manipulation in C. My question is what I need to write to a log file of that type and if fprintf is what I'm looking for. The client does not do much. Just sends some info entered by user and waits for servers response and data.
kocika73 is offline   Reply With Quote
Old 04-20-2006, 05:39 AM   #4
and the hat of Jobseeking
 
Salem's Avatar
 
Join Date: Aug 2001
Location: The edge of the known universe
Posts: 21,710
Which OS?

Linux has for example a specific API for creating log files.

Yes, you can just use fprintf() if you want to.
__________________
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.

Salem is offline   Reply With Quote
Old 04-20-2006, 06:58 AM   #5
Registered User
 
Join Date: Sep 2004
Posts: 99
Thanks Salem. Client is on Red Hat 7.2, but server is on SunOS 5.10 if I remember correctly the version number. Would it make a difference?
kocika73 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
opening empty file causes access violation trevordunstan C Programming 10 10-21-2008 11:19 PM
SYnchronize read & write of a cache file lei_michelle C Programming 4 02-26-2008 05:49 PM
Post... maxorator C++ Programming 12 10-11-2005 08:39 AM
Unknown Memory Leak in Init() Function CodeHacker Windows Programming 3 07-09-2004 09:54 AM
System drdroid C++ Programming 3 06-28-2002 10:12 PM


All times are GMT -6. The time now is 06:44 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22