By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,261 Members | 1,321 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,261 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.

Jun 8 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
devphylosoff wrote:
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.

--
Ian Collins.
Jun 8 '07 #2

P: n/a
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.

Jun 9 '07 #3

P: n/a
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.

--
Ian Collins.
Jun 9 '07 #4

P: n/a
On Jun 9, 6:54 am, Ian Collins <ian-n...@hotmail.comwrote:
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.
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.

--
James Kanze (Gabi Software) email: ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34

Jun 9 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.