Join 34,000+ subscribers and receive articles from our
blog about software quality, testing, QA and security.

Logging from Win32 C++


#1

Hi,

I would like to log to a smart inspect console from a Win32 C++ program. Could you suggest the best way to perform this logging over TCP/IP?

Many thanks

Ajay


#2

Hello Ajay,

thanks for your interest in SmartInspect. Unfortunately, there is currently no native C++ library for SmartInspect and we do not have concrete plans to add one. The only option to use SmartInspect with C++ is to use Borland C++Builder 2006 at the moment.

However, we lately thought about adding a SmartInspect COM library and it would be interesting to know if this would be a feasible option for you.


#3

Thanks for the reply.

Is there anyway of send logging information directly over to the TCP-IP port. Do you publish the protocol?

Thanks

Ajay


#4

Sending the logging information directly to the TCP port is possible, yes. The TCP protocol and log format are simple and open (SmartInspect ships with the full source code of the libraries). Basically, the TCP protocol works like this:

  • After a TCP socket connection has been established, the Console sends a server banner and the libraries reply with a client banner (each on its own line)
  • For each log packet the libraries are sending, the Console replies with a short status message

A log packet is transferred in binary format for size and performance reasons. The exact format of a log packet can be looked up in the library source code.


#5

Hello,

I just wanted to let you know that we published an article with the SmartInspect formats and protocols (see the article at the bottom):

http://www.gurock.com/products/smartinspect/articles/

Let me know if you have any questions about it.


#6

Do you have C++ Builder examples? I’m using C++Builder 2010 …

[quote=tgurock]Hello Ajay,

thanks for your interest in SmartInspect. Unfortunately, there is currently no native C++ library for SmartInspect and we do not have concrete plans to add one. The only option to use SmartInspect with C++ is to use Borland C++Builder 2006 at the moment.

However, we lately thought about adding a SmartInspect COM library and it would be interesting to know if this would be a feasible option for you.[/quote]