RenanTHT
RenanTHT

Reputation: 11

The mono throws me the following error

When I try to run the mono with the "sudo mono server.exe" command it returns me in the following error.

log4net:ERROR Could not create Appender [conLogger] of type [log4net.Appender.ColoredConsoleAppender]. Reported error follows. System.EntryPointNotFoundException: GetConsoleOutputCP at (wrapper managed-to-native) log4net.Appender.ColoredConsoleAppender:GetConsoleOutputCP () at log4net.Appender.ColoredConsoleAppender.ActivateOptions () <0x412efc70 + 0x0005b> in :0 at log4net.Repository.Hierarchy.XmlHierarchyConfigurator.ParseAppender (System.Xml.XmlElement appenderElement) <0x412e7000 + 0x009f6> in :0 log4net:ERROR Appender named [conLogger] not found.

Upvotes: 1

Views: 403

Answers (1)

Lex Li
Lex Li

Reputation: 63295

The source clearly indicates that this appender is Windows only,

https://github.com/apache/logging-log4net/blob/master/src/log4net/Appender/ColoredConsoleAppender.cs#L532

and there is no conditional compilation to avoid such exceptions on Linux or other platforms.

Thus, you might report to them as a bug (but I don't think they would fix it).

You might switch to the common ConsoleAppender, or develop your own Linux version, or search the internet to see if anyone already implemented one.

Upvotes: 1

Related Questions