Passing parameter to singleton I wrote this factory class in order to pass parameter to Singlton class, is it a good design in term of design for multithreading environment?

public static class LoggingServiceFactory
{
    private static string _connectionstring;
    private static readonly Lazy&lt;LoggingService&gt; _INSTANCE = new Lazy&lt;LoggingService&gt;(() =&gt; new LoggingService(_connectionstring));

    public static ILoggingService GetService(string connectionString)
    {
        _connectionstring = connectionString;
        return _INSTANCE.Value;
    }

    private class LoggingService : ILoggingService
    {
        private string _connectionstring;
        internal LoggingService(string connectionString)
        {
            _connectionstring = connectionString;
        }

        public void LogMessage(string msg)
        {
            // do the logging work
        }

    }
}

public interface ILoggingService
{
    void LogMessage(string msg);
}
I would not personally put LoggingService implementation inside factory, as it reduces testability and usually needed to play some tricks with generics type parameters only.

To have a predictable behavior according to your design it might look like:

public static class LoggingServiceFactory
{
    static ConcurrentDictionary&lt;string, ILoggingService&gt; Services { get; } = 
        new ConcurrentDictionary&lt;string, ILoggingService&gt;();

    public static ILoggingService GetService(string connectionString) =&gt;
        Services.GetOrAdd(connectionString, cs =&gt; new LoggingService(cs));
}


Anyway, it makes sense to think about delegating it to IoC container... 

I don't think that it is a responsibility of this class to verify if connection string is the same. This interface delivers different perception.