This question is locked. New answers and comments are not allowed.
I searched for an error in my code and randomly I found out that setting MediumTrust to True this leads to disabling the file log mechanism. Costed me a lot of time until finding out what the problem was. Perhaps this information helps others!