stc::cout in server mode (running in background)

I

Ian Collins

devphylosoff said:
hi

how to print text messages on standard output (like a "std::cout <<
"text";) in below serwer :
http://devphyl.rootnode.pl/com/SieveServer/
original site: http://msdn.microsoft.com/msdnmag/issues/0400/async/

unfortunately std::cout doesn't work, because serwer start and run in
background, so my question
is what I need to change in code.

save to file is not acceptable.
Then you are either out of luck, or there is a platform specific answer.
Try a group dedicated to your platform.
 
D

devphylosoff

the code is a COM server running on Windows XP, but my problem is to
find the easiest way to log server activy
(logging without delay to access, so the solution with saving to file
is omitted)
I use Microsoft Visual Studio and I cannot find out the built-in
output tab for program output (it means not for this program)
major changes in server code are also not allowable.
moreover, server create threads.

i think that problem is general in similar applications.
 
I

Ian Collins

devphylosoff wrote:

Please retain context in your replies, this post doesn't make sense on
its own.
the code is a COM server running on Windows XP, but my problem is to
find the easiest way to log server activy
(logging without delay to access, so the solution with saving to file
is omitted)
I use Microsoft Visual Studio and I cannot find out the built-in
output tab for program output (it means not for this program)
major changes in server code are also not allowable.
moreover, server create threads.

i think that problem is general in similar applications.
The general solution is to log to a file. There isn't any guarantee
that an application running in the background (where supported) even has
an output device attached.
 
J

James Kanze

devphylosoff wrote:
Please retain context in your replies, this post doesn't make sense on
its own.
The general solution is to log to a file.

Is it? All of the servers I've worked on log to a variety of
places, depending on how serious the log is: a file, syslog,
email...
There isn't any guarantee that an application running in the
background (where supported) even has an output device
attached.

There is, however, a pretty good guarantee that a terminal won't
be attached.

I'm not sure what the OP's problem is with logging to a file.
Maybe he just doesn't know you have to flush after each log
message.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,293
Messages
2,571,505
Members
48,192
Latest member
LinwoodFol

Latest Threads

Top