Re: [Banshee-List] Logging in Banshee: use log4net?

I agree that this would be a good addition.  I've used log4j (the java
version) a lot at work and it has a lot of benefits over the existing
logger in Banshee.  Personally I would like to implement it so that we
could just type Log.debug("my message") instead of log4net.debug("my
message").  The way that we accomplished this at work was with a
wrapper that would get the instance and call the appropriate method
for you.  Less typing is always a good thing.

-- Trey

On 11/8/06, Julien Sobrier <julien sobrier net> wrote:
Gabriel Burt wrote:
> On 11/7/06, Julien Sobrier <julien sobrier net> wrote:
>> Getting the right log for users is not easier. As you can see in the
>> thread  "[Banshee-List] howto avoid creating dirs on flash mp3 player",
>> a user has to put a Console.WriteLine at the right place in the right
>> file to get critical information about an issue.
> This is a misunderstanding on your part.  The WriteLine I asked that
> person to add in was not something that *should* be logged.  We cannot
> spit out via a logger every single variable in Banshee, this one
> included.
> Gabriel

What I mean is that Banshee could put a lot more debugging information
that can be enabled/disabled very easily. It would make sense to log
information read from HAL at the lowest debug level (Info or Debug) that
would be disabled by default. It does not mean that you have to ouptut
this information to a file or to the console every time your run banshee.

For example, in your log file configuration, you would not output by
default Debug, Info, but only Warn and Error for example:
    <level value="WARN" />
    <appender-ref ref="Console" />

Then, if a user need more debug information from Banshee.Dap, the
configuration can be changed:

    <level value="WARN" />
    <appender-ref ref="Console" />
<logger name="Banshee.Dap">
    <level value="DEBUG" />

The goal is to make a lot of debug information available to
users/developers, but not enabled by default (in the sense not printed
out). Each user/developer can select what information they need by
defining the debug level they need, and from what class it should be
generated. So, if you are working on Plugin that touches, for example,
Banshee.Dap, you would enable the lowest debug level from Banshee.Dap
but keep only the Errors from the other Banshee classes.

I hope I was more clear.

Banshee-list mailing list
Banshee-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]