Results 1 to 3 of 3
  1. #1

    Log4NetLogging issue

    In your demo for DotNet client 4.0.0, there is some code in the Log4NetLogging.cs file as follows

    public ILogger GetLogger(string category)
    lock (logInstances)
    if (!logInstances.ContainsKey(category))
    logInstances[category] = new Log4NetLoggerWrapper(log4net.LogManager.GetLogger( category));

    I get a compile error on this last line for GetLogger(category) saying "cannot convert 'string' to 'System.Type'".

    If I replace "category" in the call with a made-up Type argument, the Demo runs. I think I'm connected correctly, because I can send a log record to the console or the log file from my program. I notice that the config file only defines WARN level responses and no Appenders. This makes me wonder if I need to worry about this. Is it OK for me to continue without Log4Net logging?
    Last edited by Chuck; September 4th, 2020 at 12:30 AM.

  2. #2
    Join Date
    Feb 2012
    Hi Chuck,

    Are you referring to this project
    In this case I have no evidence of the compile error you mentioned.

    About logging, you can leverage the log levels you need for your development and tests, an example of configuration is here:


  3. #3
    Greetings Giuseppe!

    I got the Lightstreamer DotNet Client Version 4 Demo working. I thought you might be interested in case this comes up with someone else.

    Since you were not experiencing the compile error that I was, I thought that the problem might be in Log4Net. I found that the compile error that I originally reported is due to an incompatibility between the example DotNet Client code and the Log4Net package that is version dependent. I was starting my configuration from scratch so I had installed the latest version of Log4Net from NuGet which is 2.0.9. The DotNet Client refers to GetLogger with one argument of type “string”. Log4Net dropped support for this overload in V2.0.6. So, I uninstalled Log4Net and reinstalled an older version V2.0.5. and the compile error went away, but I got the following run-time error:

    Exception User-Unhandled
    FileNotFoundException: Could not load file or assembly 'System.Configuration.ConfigurationManager, Version=, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.

    I couldn’t find V4.0.3 but System.Configuration.ConfigurationManager 4.7.0 is available on NuGet so I installed that and the run-time error went away. I used the config file you linked to and got some incomplete lines in the log file with the default behavior, so I added APPENDER statements to the LOGGER specifications to explicitly refer to the file appender and now everything works as expected.

    I thank you and your team for your support. I appreciate the quick responses.




Similar Threads

  1. Internet Explorer --> Proxy issue
    By Mone in forum Client SDKs
    Replies: 0
    Last Post: October 22nd, 2007, 11:20 AM
  2. Opera 8 - 9 --> iframes onload issue
    By Mone in forum Client SDKs
    Replies: 0
    Last Post: February 9th, 2007, 02:35 PM
  3. Web server/Lightstreamer dual deployment issue
    By CitiMan in forum Client SDKs
    Replies: 2
    Last Post: November 21st, 2006, 02:55 PM
  4. Replies: 0
    Last Post: November 9th, 2006, 05:12 PM
  5. Firefox 1.0 - --> Status bar issue
    By Mone in forum Client SDKs
    Replies: 0
    Last Post: November 7th, 2006, 12:24 PM

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT +1. The time now is 10:23 PM.