Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to limit the information of a Tidlog file
#1
https://stackoverflow.com/questions/49347189/how-not-to-include-the-information-of-the-files-appended-to-the-log-tidlog-file

 
The log file (Indy) of an email in SMTP format includes the information of the attached files that are not necessary for my needs.

Adding information from attached files greatly increases the log file and causes me problems reading this information. I keep this file in a "blob" field of the database. Reading this field is causing me problems. Do you have an example of a code that retains this information (other than the files attached)?

Here is the answer to this question:

The default TIdLog... components are meant to log whatever raw data is being transmitted/received over the socket connection, for purposes of debugging and replaying sessions. There are no real filtering capabilities. If you don't want portions of the emails being logged, you will have to use TIdLogEvent or TIdConnectionIntercept, or derive a custom TIdLog... or TIdConnectionIntercept... based component, to parse the raw data yourself, essentially re-implementing the SMTP and RFC822 protocols so you can choose to log only what you want


Do you have an example that would allow me to remember the information transmitted without the information of the linked files?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)