Skip to content

Commit a849d02

Browse files
authored
Logging implementation update (#871)
1 parent a868e1c commit a849d02

File tree

179 files changed

+1484
-669
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

179 files changed

+1484
-669
lines changed

dotnet/src/dotnetcore/DynService/Cosmos/CosmosDBConnection.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
using GeneXus.Cache;
1313
using GeneXus.Data.Cosmos;
1414
using GeneXus.Data.NTier.CosmosDB;
15-
using log4net;
1615
using Microsoft.Azure.Cosmos;
1716

1817
namespace GeneXus.Data.NTier
@@ -65,7 +64,7 @@ public class CosmosDBConnection : ServiceConnection
6564
//Options not supported by the spec yet
6665
//private const string DISTINCT = "DISTINCT";
6766

68-
static readonly ILog logger = log4net.LogManager.GetLogger(typeof(CosmosDBConnection));
67+
static readonly IGXLogger logger = GXLoggerFactory.GetLogger<CosmosDBConnection>();
6968
public override string ConnectionString
7069
{
7170
get

dotnet/src/dotnetcore/DynService/Cosmos/CosmosDBDataReader.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
using GeneXus.Cache;
1010
using GeneXus.Data.NTier;
1111
using GeneXus.Data.NTier.CosmosDB;
12-
using log4net;
1312
using Microsoft.Azure.Cosmos;
1413
using Newtonsoft.Json;
1514

@@ -27,7 +26,7 @@ public class CosmosDBDataReader : IDataReader
2726
private int ItemCount;
2827
private List<Dictionary<string, object>> Items = null;
2928

30-
static readonly ILog logger = log4net.LogManager.GetLogger(typeof(CosmosDBDataReader));
29+
static readonly IGXLogger logger = GXLoggerFactory.GetLogger<CosmosDBDataReader>();
3130
private void CheckCurrentPosition()
3231
{
3332
if (m_currentEntry == null)

dotnet/src/dotnetcore/DynService/Cosmos/CosmosDBRequestWrapper.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
using System.IO;
44
using System.Threading.Tasks;
55
using GeneXus.Data.Cosmos;
6-
using log4net;
76
using Microsoft.Azure.Cosmos;
87
using Newtonsoft.Json;
98

@@ -14,7 +13,7 @@ public class RequestWrapper
1413
private readonly Container m_container;
1514
private readonly CosmosClient m_cosmosClient;
1615
private readonly QueryDefinition m_queryDefinition;
17-
static readonly ILog logger = log4net.LogManager.GetLogger(typeof(RequestWrapper));
16+
static readonly IGXLogger logger = GXLoggerFactory.GetLogger<RequestWrapper>();
1817
public string idValue { get; set; }
1918
public object partitionKeyValue { get; set; }
2019
public bool queryByPK { get; set; }

dotnet/src/dotnetcore/DynService/Cosmos/DynService.CosmosDB.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
</ItemGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.31.0" />
16+
<PackageReference Include="Azure.Core" Version="1.35.0" />
17+
<PackageReference Include="Microsoft.Azure.Cosmos" Version="3.36.0" />
1718
</ItemGroup>
1819

1920
<ItemGroup>

dotnet/src/dotnetcore/DynService/OData/DynServiceOData.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
</ItemGroup>
1414
<ItemGroup>
1515
<PackageReference Include="GeneXus.Odata.Client" Version="5.2.3.8" />
16-
<PackageReference Include="log4net" Version="2.0.15" />
1716
</ItemGroup>
1817
<ItemGroup>
1918
<ProjectReference Include="..\..\GxClasses\GxClasses.csproj" />

dotnet/src/dotnetcore/GxClasses.Web/GxClasses.Web.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
</ItemGroup>
3030

3131
<ItemGroup>
32-
<PackageReference Include="log4net" Version="2.0.15" />
32+
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
33+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
3334
</ItemGroup>
3435

3536
<ItemGroup>

dotnet/src/dotnetcore/GxClasses.Web/Middleware/GXRouting.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace GxClasses.Web.Middleware
2828
internal class GXRouting : IGXRouting
2929
{
3030

31-
static readonly ILog log = log4net.LogManager.GetLogger(typeof(IGXRouting));
31+
private static readonly IGXLogger log = GXLoggerFactory.GetLogger<IGXRouting>();
3232

3333
public static string VirtualPath = string.Empty;
3434
public static string LocalPath = Directory.GetCurrentDirectory();

dotnet/src/dotnetcore/GxClasses.Web/Middleware/HandlerFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public class BaseUrls
3232

3333
public class HandlerFactory
3434
{
35-
private static readonly ILog log = log4net.LogManager.GetLogger(typeof(GeneXus.HttpHandlerFactory.HandlerFactory));
35+
private static readonly IGXLogger log = GXLoggerFactory.GetLogger<HandlerFactory>();
3636
private string _basePath;
3737
static Dictionary<string, Type> _aspxObjects = new Dictionary<string, Type>(){
3838
{"gxoauthlogout",typeof(GXOAuthLogout)},

dotnet/src/dotnetcore/GxClasses.Web/Notifications/WebSocket/WSHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace GeneXus.Http.WebSocket
1818
{
1919
public class WSHandler: WebSocketHandler, IGXWebSocketAsync
2020
{
21-
private static readonly ILog log = log4net.LogManager.GetLogger(typeof(WSHandler));
21+
private static readonly IGXLogger log = GXLoggerFactory.GetLogger<WSHandler>();
2222
private const string GX_NOTIFICATIONINFO_NAME = "GeneXus.Core.genexus.server.SdtNotificationInfo";
2323
protected static WebSocketConnectionManager WebSocketConnectionManager = new WebSocketConnectionManager();
2424

dotnet/src/dotnetcore/GxClasses/Domain/GXXmlReadWrite.cs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
using System;
2-
using System.Xml;
32
using System.Collections;
43
using System.Collections.Specialized;
5-
using System.Text;
6-
using System.Net;
74
using System.IO;
5+
using System.Net;
6+
using System.Text;
7+
using System.Xml;
88
using System.Xml.Schema;
9+
using System.Xml.XPath;
10+
using System.Xml.Xsl;
911
using GeneXus.Application;
1012
using GeneXus.Http.Client;
1113
using GeneXus.Http.Server;
1214
using GeneXus.Utils;
13-
using log4net;
14-
15-
using System.Xml.Xsl;
16-
using System.Xml.XPath;
1715

1816
namespace GeneXus.XML
1917
{
@@ -1887,7 +1885,7 @@ public void Dispose()
18871885

18881886
public class GXXMLWriter: IDisposable
18891887
{
1890-
private static readonly ILog log = log4net.LogManager.GetLogger(typeof(GXXMLWriter));
1888+
private static readonly IGXLogger log = GXLoggerFactory.GetLogger<GXXMLWriter>();
18911889
private XmlTextWriter writer;
18921890

18931891
private short errorCode;

0 commit comments

Comments
 (0)