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

Logging server



I need to implement a kind of logging server with the following features:

  1. Every client sends log to server just in case of Error level message to log.

  2. If client can’t connect to the server it saves the log to local machine.

  3. Client logs to local machine in case the level of message is lower than Error level.

  4. Server recieve log and saves it to separate folder to every client. Every client has its unique authorization string.

  5. It would be great if messages for each client are viewed in different way in Console.

I am newbie in SmartInspect and I can’t find any way to operate recieved messages at server side. For example, to save recieved message into certain file. So, could you explain the best way to implement these features?




Thanks for your posting. 1-3 are client-side features and could be implemented with a custom protocol for the SmartInspect libraries:

The custom protocol would basically combine the log files and TCP/IP protocols (whose classes could even be re-used internally) and can forward the log entries based on your custom logic.

Point 4 is difficult because SmartInspect does not have built-in authentication and this feature would need to be implemented with a custom packet type that is sent at the beginning of the log stream, for example. We have detailed information about SmartInspect’s protocols here on our website:

There’s also an introduction article about writing a simple server for SmartInspect (it’s for Delphi but should be helpful none the less):

There’s also the SmartInspect SDK (in .NET) which has many features you would need for a custom SmartInspect log server:

Last but not least, SmartInspect already has its own log server which may be used for the server part (it does not have authentication, though):

This setup also includes documentation.

For point 5, you can simply use the host/application name properties and/or sessions for your applications to differentiate the available clients in the Console (to create a View for each client, for example).

Just let me know in case you have any questions about one of these points.

I hope this helps,