Comments (4)
I'm not quite sure what you're setting out to achieve. However, this is an open source project. Please have a look at the sources. You'll find it is a very simple. If you decide to make improvements that would have value for all users, I would be open to a pull request.
from common.logging.log4net.universal.
Just wanted to let you know that original Log4Net1213 have below mentioned piece of code through which custom properties set in ILog of common.logging were passed to log4net.
if (base.CustomProperties != null && base.CustomProperties.Count > 0) { foreach (KeyValuePair<string, object> customProperty in base.CustomProperties) { ThreadContext.get_Properties().set_Item(customProperty.Key, customProperty.Value); } }
This is missing in your Log4Net.Universal.
from common.logging.log4net.universal.
@queston02 I think I'm starting to understand what you're getting at. With this package you can't pass anything to the log4net.ThreadContext, is that snippet from your own code? Couldn't you just override and use the Log4NetThreadVariablesContext
.
Copy Log4NetGlobalVariablsContext.cs
, Log4NetThreadVariablesContext.cs
,Log4NetNestedThreadVariablesContext.cs
, etc over and then put following in the Log4NetLogger.cs
:
/// <summary>
/// Returns the global context for variables
/// </summary>
public override IVariablesContext GlobalVariablesContext
{
get { return new Log4NetGlobalVariablesContext(); }
}
/// <summary>
/// Returns the thread-specific context for variables
/// </summary>
public override IVariablesContext ThreadVariablesContext
{
get { return new Log4NetThreadVariablesContext(); }
}
/// <summary>
///
/// </summary>
public override INestedVariablesContext NestedThreadVariablesContext
{
get { return new Log4NetNestedThreadVariablesContext(); }
}
from common.logging.log4net.universal.
@PokeyTheCat that makes complete sense. Thanks for the suggestion. If things workout i might even put a pull request with changes.
from common.logging.log4net.universal.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from common.logging.log4net.universal.