Thanasis Ioannidis
Thanasis Ioannidis

Reputation: 3231

Best approach for sending log files with log4net

What is the best approach for sending whole files (log files etc) in a logging mechanism?

Ideally we would like to have a mechanism, not only to send some logging info (exception message, class and method etc) but also to transmit to our e-support system some log files (or any files in general) that would help. We want this mechanism as much parametrized as it can get for each application (specify the files or folders to send, specify how to send or when, on which error etc etc..) We also need to find a way to "attach" these files to our logging information in our DB system in the e-support platform, not just send them and then try to archive them manually.

So, what is the best approach for this requirement? Any ideas? Is there anything that I should be careful for?

Upvotes: 4

Views: 709

Answers (1)

tobsen
tobsen

Reputation: 5398

Some questions: When do you want to send the logging information? Always or after an exception occured? On application close?

Depending on your answer, it might be easier to have a class which handles your requirements and just sends the files which are created by the currently configured log appenders. In that case I suggest to not create an own appender but a separate class but build something along those lines.

Upvotes: 1

Related Questions