[jira] [Created] (LOG4NET-462) ReadOnlyPropertiesDictionary not thread safe

2015-04-22 Thread Tom Tutko (JIRA)
Tom Tutko created LOG4NET-462:
-

 Summary: ReadOnlyPropertiesDictionary not thread safe
 Key: LOG4NET-462
 URL: https://issues.apache.org/jira/browse/LOG4NET-462
 Project: Log4net
  Issue Type: Bug
Affects Versions: 1.2.13
Reporter: Tom Tutko
Priority: Blocker


I have an application that runs as a windows service and spins up multiple 
AppDomains, each with their own loggers. I will often run into an issue where 
log4net appears to be causing one or more of the spun up AppDomains to not 
function properly. The relevant stack trace looks as follows:

System.InvalidOperationException: Collection was modified; enumeration 
operation may not execute.
  at System.Collections.Hashtable.HashtableEnumerator.MoveNext()
  at log4net.Util.ReadOnlyPropertiesDictionary.GetObjectData(Serialization 
info, StreamingContext context)
  at System.Runtime.Serialization.ObjectCloneHelper.GetObjectData(Object 
serObj, String& typeName, String& assemName, String[]& fieldNames, 
Object[]& fieldValues)

I have not been able to find the specific conditions to reproduce this but it 
happens often enough to be a huge problem. Looking at the log4net source, the 
ReadOnlyPropertiesDictionary.GetObjectData() method does a foreach over the 
InnerHashTable collection but there is nothing to stop that collection from 
being modified outside of that loop which is leading to the exception. I am not 
sure where in my code I would be doing anything that modified that collection 
indirectly but I do know that I push several things on and off of the 
LogicalThreadContext.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


log4net not working outside local environment

2015-04-22 Thread ryguy2281
So I've discovered that outside of my machine, the web service I built with
log4net is not working.

It works great in Visual Studio 2010 when I compile it through there, It
also works through my IIS implementation on my laptop. When my boss tries it
on his machine (through visual studio) or when I try to set it up through an
IIS implementation not on my machine the logging is not working.

The error in my boss's visual studio when he compiles the project is this: 

log4net:ERROR XmlConfigurator: Failed to find configuration section
'log4net' in the application's .config file. Check your .config file for the
 and  elements. The configuration section should
look like: 

The log4net.config has the above line mentioned in the error, I'm not sure
what could be wrong.

Do I need to install log4net or something? I was under the impression that
log4net.dll was the only thing needed in the project but do I need to
install something additional to get the logging to work?

Any theories on what I could be doing wrong?



--
View this message in context: 
http://apache-logging.6191.n7.nabble.com/log4net-not-working-outside-local-environment-tp54642.html
Sent from the Log4net - Dev mailing list archive at Nabble.com.


AW: log4net not working outside local environment

2015-04-22 Thread Dominik Psenner
Hi,

check this:

http://logging.apache.org/log4net/log4net-1.2.12/release/faq.html#trouble-se
rvice

and this:

http://logging.apache.org/log4net/log4net-1.2.12/release/faq.html#trouble-fi
le-perm

and if both of these FAQ do not apply you could try this:

http://logging.apache.org/log4net/log4net-1.2.12/release/faq.html#trouble-ev
aluate-configurationerrors-at-runtime

or this:

http://logging.apache.org/log4net/log4net-1.2.12/release/faq.html#internalDe
bug

Cheers

-Ursprüngliche Nachricht-
Von: ryguy2281 [mailto:r.johnston2...@gmail.com] 
Gesendet: 23 April 2015 00:57
An: log4net-dev@logging.apache.org
Betreff: log4net not working outside local environment

So I've discovered that outside of my machine, the web service I built with
log4net is not working.

It works great in Visual Studio 2010 when I compile it through there, It
also works through my IIS implementation on my laptop. When my boss tries it
on his machine (through visual studio) or when I try to set it up through an
IIS implementation not on my machine the logging is not working.

The error in my boss's visual studio when he compiles the project is this: 

log4net:ERROR XmlConfigurator: Failed to find configuration section
'log4net' in the application's .config file. Check your .config file for the
 and  elements. The configuration section should
look like: 

The log4net.config has the above line mentioned in the error, I'm not sure
what could be wrong.

Do I need to install log4net or something? I was under the impression that
log4net.dll was the only thing needed in the project but do I need to
install something additional to get the logging to work?

Any theories on what I could be doing wrong?



--
View this message in context:
http://apache-logging.6191.n7.nabble.com/log4net-not-working-outside-local-e
nvironment-tp54642.html
Sent from the Log4net - Dev mailing list archive at Nabble.com.