Can I configure Ftp/Sftp tracing via application configuration file, w/o modifying code and recompiling application?

Of course, I can write my own LogWriter, that uses a TraceSource, and setup it for any Ftp/Sftp object I've created; but, in my view, this is common and useful scenario.

asked 03 Aug '10, 14:30

_FRED_'s gravatar image

_FRED_
907
accept rate: 0%


Hello,

adding a new LogWriter which will log to TraceSource looks to be a good idea. We will add it to one of future versions. Thanks for the suggestion.

Adding an ability to turn on logging by just updating config is tempting too. However it may have some undesirable side effect:

  • Some (paranoid?) dev's may feel a bit tricked when our component starts reading the config file without being asked.

  • Some dev's may be unhappy when the admin or app user can turn on logging by updating config files. For example passwords can be retrieved from Verbose logs. And updating logfile is easier than installing the packet capture software.

Both concerns can be addressed if programmer is required to explicitly state that logger configuration should be read from the config file. Something like this:

Ftp.LogWriter = LogWriterHelper.ReadFromConfig()

or by adding an attribute to assembly - similar to Log4Net XmlConfigurator attribute:

[assembly: Rebex.Configuration.XmlLogWriterConfigurator(Watch = true)]

What do you think? Would it be ok for you?

link

answered 03 Aug '10, 20:45

Martin%20Vobr's gravatar image

Martin Vobr ♦♦
335310
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×2

Asked: 03 Aug '10, 14:30

Seen: 178 times

Last updated: 30 Mar '11, 07:22