opened
sushmahonda
username_0
Hello,
 I'm trying to logs stored in to the database.but we are getting the below InternalLogger error. Please see the below LoggingConfiguration databse using C#.
2016-07-13 01:49:03.5817 Info Found 117 configuration items
2016-07-13 01:49:03.6328 Info Found 117 configuration items


DatabaseTarget target = new DatabaseTarget();
            DatabaseParameterInfo param;

            target.DBProvider = "sqlserver";
            target.DBHost = ".";
            target.Name = "database";
            target.ConnectionString = "Data Source=\SQLSERVER;Initial Catalog=DatabaseName;User Id=id;Password=password;Integrated Security=True";
            target.CommandText = "exec NLog_Webservice @site_id,@request_xml,@response_xml,@servername, @datetimestamp,@session_id,@method, @username,@data1,@data2,@data3,@data4";

            param = new DatabaseParameterInfo();
            param.Name = "@site_id";
            param.Layout = "${gdc:item=site_id}";
            target.Parameters.Add(param);

            param = new DatabaseParameterInfo();
            param.Name = "@request_xml";
            param.Layout = "${gdc:item=requestxml}";
            target.Parameters.Add(param);

            param = new DatabaseParameterInfo();
            param.Name = "@response_xml";
            param.Layout = "${gdc:item=responsexml}";
            target.Parameters.Add(param);

            param = new DatabaseParameterInfo();
            param.Name = "@servername";
            param.Layout = "${machinename}";
            target.Parameters.Add(param);

            param = new DatabaseParameterInfo();
            param.Name = "@datetimestamp";
            param.Layout = "${date}";
            target.Parameters.Add(param);

            param = new DatabaseParameterInfo();
            param.Name = "@session_id";
            param.Layout = "${gdc:item=sessionid}";
            target.Parameters.Add(param);

            param = new DatabaseParameterInfo();
            param.Name = "@method";
            param.Layout = "${gdc:item=method}";
            target.Parameters.Add(param);

            param = new DatabaseParameterInfo();
            param.Name = "@username";
            param.Layout = "${windows-identity}";
            target.Parameters.Add(param);

            param = new DatabaseParameterInfo();
            param.Name = "@data1";
            param.Layout = "${gdc:item=data1}";
            target.Parameters.Add(param);

            param = new DatabaseParameterInfo();
            param.Name = "@data2";
            param.Layout = "${gdc:item=data2}";
            target.Parameters.Add(param);

            param = new DatabaseParameterInfo();
            param.Name = "@data3";
            param.Layout = "${gdc:item=data3}";
            target.Parameters.Add(param);

            param = new DatabaseParameterInfo();
            param.Name = "@data4";
            param.Layout = "${gdc:item=data4}";
            target.Parameters.Add(param);
            InternalLogger.LogFile = "c:\\log1.txt";

            config.AddTarget(target.Name, target);
            config.LoggingRules.Add(new LoggingRule("tableLogegr", LogLevel.Debug, target));

please help ASAP...

Thanks
LoggingConfiguration Database table logger  we are getting InternalLogger error:   2016-07-13 01:49:03.5817 Info Found 117 configuration items
issue
created
304NotModified
username_1
What is the internal error? Please use the issue template
comment
created
304NotModified
username_1
Hey! Could you give us some more into?
comment
created
304NotModified
username_1
We cannot help you without the needed info. Feel free to give some more info and then I will reopen this issue.
comment
closed
304NotModified
username_1
issue