mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
Update OrchardLog4netLogger.cs
This commit is contained in:
@@ -63,12 +63,18 @@ namespace Orchard.Logging {
|
||||
if (_shellSettings.Value != null) {
|
||||
ThreadContext.Properties["Tenant"] = _shellSettings.Value.Name;
|
||||
}
|
||||
else {
|
||||
ThreadContext.Properties.Remove("Tenant");
|
||||
}
|
||||
|
||||
try {
|
||||
var ctx = HttpContext.Current;
|
||||
if (ctx != null) {
|
||||
ThreadContext.Properties["Url"] = ctx.Request.Url.ToString();
|
||||
}
|
||||
else {
|
||||
ThreadContext.Properties.Remove("Url");
|
||||
}
|
||||
}
|
||||
catch(HttpException) {
|
||||
// can happen on cloud service for an unknown reason
|
||||
@@ -416,4 +422,4 @@ namespace Orchard.Logging {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user