1

Topic: nlog: questions on record of dens in a DB

Good afternoon! Understanding with nlog, I try to write broad gulls to a DB. There were questions: 1. By the current moment record does not go to a DB. Prompt, where at nlog it is possible to see the reason: why he does not write to a DB? A config I put more low. It is a minimum idle variant. The insertion rights in the table are, in sessions I see connections with this request, but dens in the table are not present. Itself nlog does not give any helps, errors where to look - purely "a black box". 2. If idle record is included in a DB broad gulls in a file cease to register. I make comments on broad gulls in a DB - file recording works. At all it is not pleasant to me that write process in a file depends on write process in a DB. A question: whether in correctly adjusted nlog'e there is such trouble - as the DB so broad gulls in a file cease to register is disconnected? Here my config: <? xml version = "1.0" encoding = "utf-8"?> <configuration> <configSections> <section name = "nlog" type = "NLog. Config. ConfigSectionHandler, NLog "/> </configSections> <nlog xmlns ="http://www.nlog-project.org/schemas/NLog.xsd"xmlns:xsi ="http://www.w3.org/2001/XMLSchema-instance"internalLogLevel ="Debug"> <variable name ="logDir"value =" $ {basedir}/log "/> <variable name ="fileName"value =" $ {gdc:item=FileName} "/> <variable name ="appName"value =" $ {gdc:item=AppName} ver. $ {gdc:item=AppNum}. "/> <variable name ="detailedLayout"value =" $ {baseLine} $ {message} $ {exception:format=ToString} "/> <targets> <target name ="logfile"xsi:type ="File"fileName ="..."layout =" $ {detailedLayout} "archiveFileName ="..." > </target> <target xsi:type = "Database" name = "test" keepConnection = "true" dbProvider = "Npgsql. NpgsqlConnection, Npgsql" connectionString = "User ID=<...>;Password=<...>;Host=localhost;Port=5432;Database=<...>;Pooling=true"> <commandText> INSERT INTO servicelog (dt, message) values (@dt, @message) </commandText> <parameter layout = "$ {date}" name = "dt"/> <parameter layout = "$ {message}" name = "message"/> </target> </targets> <rules> <logger name = "*" minlevel = "Trace" writeTo = "logfile"/> <logger name = "*" minlevel = "Trace" writeTo = "test"/> </rules> </nlog> </configuration>

2

Re: nlog: questions on record of dens in a DB

Hello, BlackHorse, you wrote: BH> 1. By the current moment record does not go to a DB. Prompt, where at nlog it is possible to see the reason: why he does not write to a DB? https://github.com/NLog/NLog/wiki/Internal-Logging... <<RSDN@Home 1.3.108 alpha 5 rev. 56>>

3

Re: nlog: questions on record of dens in a DB

Hello, _Raz _, you wrote: _R _> Hello, BlackHorse, you wrote: BH>> 1. By the current moment record does not go to a DB. Prompt, where at nlog it is possible to see the reason: why he does not write to a DB? _R _> https://github.com/NLog/NLog/wiki/Internal-Logging the enormous thanks!