Re: Application Logging Block without config file



Hi Steve

I knew about the blog, but it doesn't solve the problem. The schema to save
the configuration is still the same.

But many thanks for your answer, I really appriciate it.

Severin


"Stevanich" wrote:

Severin,

Tom Hollander explains a couple different methods for storing the Enterprise
Library configuration. You will still need a *.config file in some form
though.

http://blogs.msdn.com/tomholl/archive/2006/04/02/entlib2externalconfig.aspx

Hope this helps,


Steve

"Severin Meyer" <SeverinMeyer@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:B6D25986-9280-448A-B13A-CA4C3DC73C30@xxxxxxxxxxxxxxxx
This meens, that I don't want to use the normal .config files provided by
the
.net Framework.

Sometimes my settings data is persisted in the registry, datbase, or else
where.
So I need to get a procedure to set the configuration of the Logger
directly
throug the code.

I have found a way to configure an instance of a LogWriter to do what I
want, just throug code. But if I'm Logging via the static "Logger" class,
there is an exception, that nothing was configured.

I think, that the Logger is using a predefined LogWriter, but I was unable
to initialize it.

Hope this clarifys my problem a bit.

Severin

"Stevanich" wrote:

Severin,

Could you explain what you mean by 'The configuration for my application
is
stored elsewhere'?

Thanks,

Steve - dotneticated.com

"Severin Meyer" <SeverinMeyer@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CE70DBE0-A5B0-482B-8092-5E89781B293E@xxxxxxxxxxxxxxxx
I'm searching for a simple logging library and want to give the
Enterprise
Library a try.

The problem I'm delaing with at first is to configure this bulding
block.
The defaut way is to do this in the config-file. The problem is, that I
don't
want to use such a configuration file. The configuration for my
application
is stored else where.

My approaoch is to configure the logger solely with code in c#. So I
will
be
free where and in which format I store my settings.
Unfortunatly I have not found any sample to do this. The only hint I
have
found is that it should be possible even without config file.

Perhaps there is someone out there who can direct me to a usable
sample.

Regards,

Severin






.



Relevant Pages

  • Re: A new way to configure Python logging
    ... I used that particular level for logging within a unit test ... you need to do programmatic configuration anyway. ... logger* to process incoming LogRecords. ... The Handlers will usually employ elaborate filtering, ...
    (comp.lang.python)
  • Re: A new way to configure Python logging
    ... post about your usage of logging. ... I usually register a logger 'foo' within the application and one logger ... you need to do programmatic configuration anyway. ... so that it is easy to just add multiple handlers for various levels to ...
    (comp.lang.python)
  • Re: Java Logger
    ... E.g. for the ConsoleHandler, read ... reading in the initial configuration. ... It uses the Logger ... the log methods (log, entering, exiting). ...
    (comp.lang.java.programmer)
  • Re: A new way to configure Python logging
    ... layout and how incremental logging configuration should work, ... Once implemented, the configuration format will ... I usually register a logger 'foo' within the application and one logger ... The Handlers I register have suitable Filters associated with them, ...
    (comp.lang.python)
  • Re: Application Logging Block without config file
    ... Library configuration. ... So I need to get a procedure to set the configuration of the Logger ... found is that it should be possible even without config file. ...
    (microsoft.public.vsnet.enterprise.tools)

Loading