Is it possible to do something like this when logging log4net?
logger.Debug("username : {0} password : {1} server : {2}",username,server,password)
Or I was left only with a rounded "+" concatenation.
"+"
Yes, you can in two ways
log.Debug(String.format("username : {0} password : {1} server : {2}",username,server,password));
Or use the default API
logger.DebugFormat("username : {0} password : {1} server : {2}",username,server,password)
You can use the string format as follows:
logger.Debug(string.Format("username : {0} password : {1} server : {2}", username, server, password))
You can also use the new string interpolation function in C # 6.0 :
logger.Debug($"username : {username} password : {password} server : {server}")
Source: https://habr.com/ru/post/1236966/More articles:Holding mouse while typing - javascriptjQuery Drag and Follow Mouse - jqueryHow to retrieve EntityGraph dynamically in Spring Download - javaGtk3 ProgressBar (): unable to receive events in Python - pythonMaven: Why can I run mvn checkstyle: checkstyle without pom.xml config? - mavensetFromObject (mesh) returns incorrect values, sometimes javascriptLearning Ajax Newbie (PHP JQuery) - javascriptHow to obfuscate everything except public names of methods and attributes using proguard? - javaCopy copy of TinyMCE from notepad (clipboard) with javafx WebView on java 1.8 - clipboardRequest "And" Sqlite 3 REST - restAll Articles