Hi,
Had a binary I wanted to run in a windows service. This is cross platform and I use upstart to run it on Linux.
If I run it without the windows service wrapper as a plain .exe then the software works great. However if I wrap it in windows service wrappers, the ones they provide on the MDSDN, it fails over.
Tracked it down to consap.cc
log4cplus::tostream& output = (logToStdErr ? ofConsole.lockCerr() : ofConsole.lockCout());
output << "I will not crash"
Is there anyting I can do?
dcmtk in a service
Moderator: Moderator Team
-
- DCMTK Developer
- Posts: 120
- Joined: Thu, 2009-11-26, 08:15
So as soon as DCMTK tries to use cout or cerr, it crashes? Windows services are weird...
You could use the --log-config option that a lot of the tools provide to make it use something else than the ConsoleAppender for logging (e.g. a FileAppender or a NullAppender).
If you are running your own code, calling Logger::getRoot().removeAllAppenders(); should get rid of the ConsoleAppender.
Hope this helps,
Uli
You could use the --log-config option that a lot of the tools provide to make it use something else than the ConsoleAppender for logging (e.g. a FileAppender or a NullAppender).
If you are running your own code, calling Logger::getRoot().removeAllAppenders(); should get rid of the ConsoleAppender.
Hope this helps,
Uli
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest