How do I setup a File Appender logger from log4net for a class library using .NET Standard 2.0? I don't have an AssemblyInfo.cs. I think I have a fundamental misunderstanding that's leading to my confusion with this, so this may be a simple answer, but I just started a class library that I want to be accessible to as many projects as possible in our solutions and have internal logging from the start.
There is nothing special about the AssemblyInfo.cs file. The attribute to configure log4net can be put in any file in the assembly.
That being said I would recommend against using log4net directly and instead use a ILogger
from the NuGet package Microsoft.Extensions.Logging.Abstractions
. This allows the consumer of your library use any logging system they want instead of being tied to only using log4net.