I am trying to get off this distribution list, but unabe  to do so when 
following the unsubscribe procedure.

Can anyone help?


Sent from Samsung Mobile


-------- Original message --------
From: Piers Williams
Date:13/10/2015 01:48 (GMT+02:00)
To: Log4NET User
Subject: RE: unintended usage of the same configuration file


Nicholas,

The AdoNetAppender is *already* a buffering appender, with a default batch size 
of (I think) 100 for performance reasons as you suggest (both for the sake of 
your app and the poor database server).

Buffering does mean however that if your app tanks you probably lose the log 
message that let you know why, hence again value of (synchronous) file logging.

On 12 Oct 2015 10:47 pm, "Nicholas Duane" 
<nic...@msn.com<mailto:nic...@msn.com>> wrote:
I would agree that file based logging it core.  I would probably not want my 
web application logging to a database, for sure not each log statement.  If 
there was some buffering in between which batched the logs and then sent every 
once in a while to the DB that would seem better, to me at least.  If I needed 
the logs in a database I would still probably write to a local file and then 
figure a way to get the files to a central location where they could be loaded 
into the database.

Thanks,
Nick
________________________________
To: dpsen...@gmail.com<mailto:dpsen...@gmail.com>; 
log4net-user@logging.apache.org<mailto:log4net-user@logging.apache.org>
From: piers.willi...@gmail.com<mailto:piers.willi...@gmail.com>
Subject: RE: unintended usage of the same configuration file
Date: Sun, 11 Oct 2015 22:27:44 +0800

Dominic: I’m afraid I don’t agree with any of what you said. File based logging 
is a critical part of any instrumentation strategy – it’s way faster than 
logging to a (typically remote) database, and gives you somewhere to log the 
errors when the database is down. That’s assuming you have a database at all of 
course – not all web applications even have one (though I’d concede that’s 
rare).

It’s true that web applications will typically have limited write access to 
local disks, and that’s entirely appropriate, but they always have some write 
permissions somewhere – even if it’s only to Temp. Establishing a location with 
write permissions for logs hardly entails ‘punching holes in permissions’.

Finally, as best I can tell, none of this is relevant to the OP’s actual issue, 
which would be just the same whether he was logging to file or to database, 
because it’s a configuration issue.


From: Dominik Psenner
Sent: Sunday, 11 October 2015 2:35 PM
To: Log4NET User
Subject: Re: unintended usage of the same configuration file





The concept behind how web applications work makes it hard to use file 
appenders. A web application should not access a filesystem directly and 
punching holes into permissions may not be advisable. If i had to work out a 
web app i would log to the database that the web application will require 
anyway.
jmtc

On 11 Oct 2015 4:26 a.m., "tasos" <tas...@gmail.com<mailto:tas...@gmail.com>> 
wrote:

Hello.
I'm working on a .net application and i have used this guidance 
http://haacked.com/archive/2005/03/07/ConfiguringLog4NetForWebApplications.aspx/<http://cp.mcafee.com/d/1jWVIe4xAe6jqb333xEVKztwTsSztUQsLELLCzBASztUQsLELzAQjqdTzhO-y--qem3qdTzhO-CyqerLCOSNH3y7NfB2xkI2xqRo_OVImJmfYKr747Cr8KfZvASnD7bIZuVtdCUXC1PBQT7eEyemKCHtBcSyrjdTV555MQsLe8FTdTdw0OuXoHW7bVIr4V6vNeZTYKPBNS2loeO8JNB0y5qAm0pYNuIg5Yw8bb7OJIVlxjwu7UrfGho1FtKDNbN-rso5T4NOpsJIqMUxYjVgElb72RGN_BMkvkyhB0zSHroD_00jqb9EVvpdwIqid43s9gDY4fgd43td8-q8aKCy2pfPh1jlvd45GMtAhrzIVlwq87p7-rvhdMODvjxM->
There is a project on which i have added in the assemblyinfo.cs
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "foo1.config", Watch = 
true)]
and in another one(different assembly)
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "foo2.config", Watch = 
true)]
My configurations are like this 
http://pastebin.com/UpSpwMHH<http://cp.mcafee.com/d/FZsS81MQ76Qm6673hPt6X1KVJ6XNEVvhvvd7b9J6XNEVvhv79ECQrL6zBZ5ZYQsI6QrL6zBZd4QsTvdBJzm74fyva52Fo52RGN_BPoJqIvVsSe8fcShsvW_9ILeenpWZOWrdNTc3DbFKeth4sJtdmXapJcSCrLOaabxEVushjKrKr01HrivA9gVv0CIcb61IbxsSvkyM3iXtfynzYSUMbK9zAOVroRxN3UDOxgGme5Hlz_bwE-F4za17JmSNf-00CQmjhO-Or1oQAq86UixfU8uwq86WqhYQgltd44OvCy2CG-q8blwX8yT7pOH0QgeOfYS-yrWUUiQIbr>
except the different output filenames
(<param name="File" value="foofilename.log"/> )
The problem is that the assembly that uses foo1.config writes on the output
file of the file that is configured in foo2.config.
In each class i use log4net i declare as the guidance site(mentioned above) 
says:

private static readonly ILog Log = 
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);



Thank you in advance for your help!






Reply via email to