1

I’m using servicestack logging.eventlog package to write logs to Windows event log and I’m getting the following description on Windows Application Event Log:

"The description for Event ID 0 from source Application cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer. If the event originated on another computer, the display information had to be saved with the event. The following information was included with the event: An error occurred in the application: AxRenderServerInovadata Exception: INFO: Begin AxRenderServerInovadata the message resource is present but the message is not found in the string/message table".

This is the class that I created:

public class Logger
{
    /// <summary>
    /// Logs the specified log description.
    /// </summary>
    /// <param name="logDescription">The log description.</param>
    /// <param name="logType">Type of the log.</param>
    public void Log(string logDescription, Enumerators.LogType logType)
    {
        LogManager.LogFactory = new EventLogFactory("AxRenderServerInovadata","Application");

        var log = LogManager.GetLogger(GetType());

        switch (logType)
        {
            case Enumerators.LogType.Error:
                log.Error(logDescription);
                break;
            case Enumerators.LogType.Info:
                log.Info(logDescription);
                break;
            case Enumerators.LogType.Debug:
                log.Debug(logDescription);
                break;
        }

    }

Anyone know why I'm getting this description?

4

1 回答 1

1

这是解决此问题的另一个 Stackoverflow 问题的答案:https ://stackoverflow.com/a/46834838/56621

于 2017-10-19T21:30:34.817 回答