Rolf Kristensen

Results 263 comments of Rolf Kristensen

NLog 5.0 is already supported. But if using `EnableJsonLayout` then you have to explicitly specify `pipeline=""` until #159 has been merged and released.

There is an example here for using EcsLayout with NLog Console Target: https://github.com/elastic/ecs-dotnet/blob/master/src/Elastic.CommonSchema.NLog/README.md Should be trivial to also use it with NLog FileTarget (Change from `type="Console"` to `type="File"`)

See also https://github.com/NLog/NLog/issues/4982 for an example of customizing your own NLog JsonLayout that outs JSON in Ecs-Common-Schema-Format. Where you are free to customize it in whatever direction you like.

Make sure to change File-properties for `NLog.config`-file to Copy Always to output. See also: https://github.com/NLog/NLog/wiki/Logging-troubleshooting

@nu774 Seems the font-size hack only works to a certain point, and then one have to go full owner-drawn.

You can do this:: ```c# var config = new LoggingConfiguration(); var mongoTarget = new NLog.Mongo.MongoTarget(); mongoTarget.Fields.Add(new NLog.Mongo.MongoField() { Name = "AppName", Layout = "${AppName}" }); config.AddTarget("targetMongo", mongoTarget); ```

Think it will work if you just provide a "dummy"-value for connectionString like this: ```xml ``` When Mongo-Target initializes then it validates if connnectionString contains an non-empty value. If the...

@pwelter34 Looks resolved, as this project is now using MongoDB.Driver ver. 2.7.0

Know nothing about MongoDb. But I guess if you create user with the builtin role `readWriteAnyDatabase` then it should work: https://docs.mongodb.com/manual/reference/built-in-roles/#readWriteAnyDatabase You can perform a `grantRole`-action for the user: https://docs.mongodb.com/manual/tutorial/manage-users-and-roles/#modify-access-for-an-existing-user