简体   繁体   中英

Client-side logging strategy

I need to implement a logging strategy for a WPF application that will run on the Desktop of client side of the application.

I am using the Enterprise Library Caching Block (v5) and there is a lot of great functionality. However, I do not want to reveal too much information about how the business logic does its's thing. This sorta conflicts with an easy-to consume log messages. One the one hand I need to log as much information as possible to provide debugging support. One the other hand I don't want to reveal too much information that may enable reverse-engineering by reading the log files.

I initially had thought of hashing class names and assigning an int identifier to each method and then logging that information on the client-side. This would reduce the amount of information that can be used for unintended purposes, but is not very efficient when I have to read the files and transpose the hashed ids back to the class names.

Anyone have experience with this issue, any good articles on this?

Thanks.

If this log is intended to be only enabled when errors or issues occurs and for yourself to read then I wouldn't bother by trying to obfuscate the log to hide "business logic" from users.

The obfuscation will only slow down you debugging of the issue, and as you surmise, if someone really wants to look at your business logic, they can just get a disassembler.

I think you'll find most users don't even bother looking at anything *.log .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM