I developed some C# assembly with UDF for SQL Server 2008. In particular I have some functions which use SQLite database. I added there trace listener to write a log file to see what is happing inside. But there is a problem - on every call to UDF function it is flooding log file with messages like these:
20160226,191636.67 [P5816]/[T4] Native library pre-loader failed to get setting "No_PreLoadSQLite" value: System.ArgumentNullException: Value cannot be null.
Parameter name: path1
at System.IO.Path.Combine(String path1, String path2)
at System.Data.SQLite.UnsafeNativeMethods.GetXmlConfigFileName()
at System.Data.SQLite.UnsafeNativeMethods.GetSettingValue(String name, String default)
I can see that on every call it is logging ~18 of such messages for every of following parameters:
"No_PreLoadSQLite", "PreLoadSQLite_NoSearchForDirectory", "PreLoadSQLite_ProcessorArchitecture",
"PreLoadSQLite_ProcessorArchitecture", "PreLoadSQLite_BaseDirectory", "PreLoadSQLite_UseAssemblyDirectory",
"PreLoadSQLite_ProcessorArchitecture", "No_PreLoadSQLite", "PreLoadSQLite_NoSearchForDirectory",
"PreLoadSQLite_ProcessorArchitecture", "PreLoadSQLite_ProcessorArchitecture", "PreLoadSQLite_BaseDirectory",
"PreLoadSQLite_UseAssemblyDirectory", "PreLoadSQLite_ProcessorArchitecture", "No_SQLiteConnectionNewParser",
"DefaultFlags_SQLiteConnection", "No_SQLiteFunctions", "SQLite_ForceLogPrepare"
It is a bit annoying to see all the messages in log, difficult to track log messages which related to functionality which I'm interested in.
Could you please advice - how could I get rid of that extra/unwanted trace messages?
Maybe I need to do some special SQLlite API call to disable loading of all that settings?
Note: to make my UDF assembly working under from SQL Server CLR engine I copied SQLite.Interop.dll, System.Data.SQLite.dll and System.Data.SQLite.dll.config files into C:\Windows\system32. As you can see System.Data.SQLite.dll.config file is in the same dir as System.Data.SQLite.dll but it does not help.
Note: both DLLs SQLite.Interop.dll, System.Data.SQLite.dll has version 1.0.99.0.
Thank you in advance.
Aucun commentaire:
Enregistrer un commentaire