Skip to content

Commit da4f54a

Browse files
committed
6.1.9 release
1 parent 53f033f commit da4f54a

File tree

10 files changed

+50
-25
lines changed

10 files changed

+50
-25
lines changed

rls/API.Library.dll

0 Bytes
Binary file not shown.

rls/API.Library.pdb

84 Bytes
Binary file not shown.

rls/APIConfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"API_RECAPTCHA_PRIVATE_KEY": false,
2323
"API_RECAPTCHA_URL": "https://www.google.com/recaptcha/api/siteverify?secret=0&response=1",
2424
"API_RECAPTCHA_ENABLED": false,
25-
"API_AD_DOMAIN": "CSOCORK",
25+
"API_AD_DOMAIN": "",
2626
"API_AD_PATH": "",
2727
"API_AD_USERNAME": "",
2828
"API_AD_PASSWORD": "",

rls/appsettings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
}
3030
},
3131
"ConnectionStrings": {
32-
"DefaultConnection": "Integrated Security=true;Persist Security Info=False;Initial Catalog=APPLICATIONS_DEV;Server=3.9.2.57; Column Encryption Setting=enabled;TrustServerCertificate=True;"
32+
"DefaultConnection": "Integrated Security=true;Persist Security Info=False;Initial Catalog=;Server=; Column Encryption Setting=enabled;TrustServerCertificate=True;"
3333
},
3434
"ADOSettings": {
3535
"API_ADO_DEFAULT_CONNECTION": "DefaultConnection",
@@ -41,7 +41,7 @@
4141
"enyimMemcached": {
4242
"Servers": [
4343
{
44-
"Address": "3.9.2.141",
44+
"Address": "",
4545
"Port": 11211
4646
}
4747
],

rls/log4net.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<file type="log4net.Util.PatternString" value="Logs\Log4Net.[%processid].log" />
1313
<appendToFile value="true" />
1414
<layout type="log4net.Layout.PatternLayout">
15-
<conversionPattern value="%date [%property{MachineName}] [%thread] %level %class.%method:%line - %message%newline" />
15+
<conversionPattern value="%date [%property{MachineName}] [%property{rootID}] [%thread] %level %class.%method:%line - %message%newline" />
1616
</layout>
1717
<lockingModel type="log4net.Appender.FileAppender+InterProcessLock" />
1818
</appender>
@@ -43,7 +43,7 @@
4343
<threshold value="ALL" />
4444
<bufferSize value="1" />
4545
<connectionType value="Microsoft.Data.SqlClient.SqlConnection, Microsoft.Data.SqlClient, Version=1.0.0.0,Culture=neutral,PublicKeyToken=23ec7fc2d6eaa4a5"/>
46-
<connectionString value="Integrated Security=true;Server=3.9.2.57;Initial Catalog=APPLICATIONS_DEV;Persist Security Info=False;Column Encryption Setting=enabled;TrustServerCertificate=True;" />
46+
<connectionString value="Integrated Security=true;Server=;Initial Catalog=;Persist Security Info=False;Column Encryption Setting=enabled;TrustServerCertificate=True;" />
4747
<commandText value="INSERT INTO TD_LOGGING ([LGG_DATETIME],[LGG_THREAD],[LGG_LEVEL],[LGG_CLASS],[LGG_METHOD],[LGG_LINE],[LGG_MESSAGE],[LGG_EXCEPTION],[LGG_MACHINENAME]) VALUES (@Datetime,@Thread,@Level,@Class,@Method,@Line,@Message,@Exception,@MachineName)" />
4848
<parameter>
4949
<parameterName value="@Datetime" />

rls/packages/API.Library.6.1.8.nupkg

7.79 KB
Binary file not shown.

rls/packages/API.Library.6.1.9.nupkg

94.9 KB
Binary file not shown.

src/API.Library/API.Library.csproj

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<ImplicitUsings>enable</ImplicitUsings>
4+
5+
<ImplicitUsings>enable</ImplicitUsings>
56
<Platforms>AnyCPU;x64</Platforms>
67
<TargetFramework>net6.0</TargetFramework>
78
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
@@ -11,25 +12,18 @@
1112
<PackageId>API.Library</PackageId>
1213
<Product>API Library</Product>
1314
<Copyright>Central Statistics Office, Ireland</Copyright>
14-
<Version>6.1.8</Version>
15+
<Version>6.1.9</Version>
1516
<Authors>Central Statistics Office, Ireland</Authors>
1617
<SignAssembly>False</SignAssembly>
1718
<RepositoryUrl>https://github.com/CSOIreland/Server-API-Library</RepositoryUrl>
1819
<PackageReleaseNotes>
19-
- [ENHANCEMENT] adding class type fullname to AD memcache object
20+
- [ENHANCEMENT] adding activity root id to log4net
21+
- [ENHANCEMENT] changing api stopwatch to activity duration
22+
- [ENHANCEMENT] including pdb on build
2023
</PackageReleaseNotes>
2124
</PropertyGroup>
2225

23-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
24-
<Optimize>False</Optimize>
25-
</PropertyGroup>
26-
27-
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
28-
<Optimize>False</Optimize>
29-
</PropertyGroup>
30-
3126
<ItemGroup>
32-
<None Remove="Entities\API.RESTful.cs~RF7c82b848.TMP" />
3327
<None Remove="log4net.config" />
3428
</ItemGroup>
3529

@@ -49,12 +43,34 @@
4943
<PackageReference Include="System.DirectoryServices.AccountManagement" Version="7.0.0" />
5044
</ItemGroup>
5145

46+
5247
<ItemGroup>
5348
<FrameworkReference Include="Microsoft.AspNetCore.App" />
5449
</ItemGroup>
5550

5651
<ItemGroup>
5752
<Folder Include="Properties\" />
53+
5854
</ItemGroup>
5955

56+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
57+
<Optimize>True</Optimize>
58+
<DebugType>portable</DebugType>
59+
</PropertyGroup>
60+
61+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
62+
<DebugType>portable</DebugType>
63+
</PropertyGroup>
64+
65+
66+
<ItemGroup Condition="'$(Configuration)'=='Debug'">
67+
<None Include="bin\Debug\net6.0\*.pdb" Pack="true" PackagePath="lib\net6.0" />
68+
</ItemGroup>
69+
70+
71+
72+
<ItemGroup Condition="'$(Configuration)'=='Release'">
73+
<None Include="bin\Release\net6.0\*.pdb" Pack="true" PackagePath="lib\net6.0" />
74+
</ItemGroup>
75+
6076
</Project>

src/API.Library/Entities/API.JSONRPC.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ public async Task ProcessRequest(HttpContext httpContext, CancellationTokenSourc
206206
catch (Exception e)
207207
{
208208
Log.Instance.Fatal(e);
209+
Log.Instance.Fatal(e.StackTrace);
209210
await returnResponseAsync(httpContext, "", apiCancellationToken, HttpStatusCode.InternalServerError);
210211
}
211212
}

src/API.Library/Middleware/API.Middleware.cs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ public APIMiddleware(RequestDelegate next) : base()
1616

1717
public async Task InvokeAsync(HttpContext context)
1818
{
19+
// Initiate the activity
20+
var activity = Activity.Current;
21+
22+
log4net.LogicalThreadContext.Properties["rootID"] = activity.RootId;
23+
24+
25+
1926
if (!ApiServicesHelper.ApplicationLoaded)
2027
{
2128
Log.Instance.Fatal("No API configuration loaded.");
@@ -24,10 +31,9 @@ public async Task InvokeAsync(HttpContext context)
2431
}
2532
else
2633
{
27-
// Initiate Stopwatch
28-
Stopwatch sw = new Stopwatch();
29-
// Start Stopwatch
30-
sw.Start();
34+
35+
// Start the activity Stopwatch
36+
activity.Start();
3137

3238
Log.Instance.Info("API Interface Opened");
3339

@@ -194,11 +200,13 @@ public async Task InvokeAsync(HttpContext context)
194200
// Terminate Perfomance collection
195201
cancelPerformance.Cancel(true);//safely cancel thread
196202
cancelPerformance.Dispose();
197-
// Stop Stopwatch
198-
sw.Stop();
199-
200-
Log.Instance.Info("API Execution Time (s): " + ((float)Math.Round(sw.Elapsed.TotalMilliseconds / 1000, 3)).ToString());
203+
// Stop the activity
204+
activity.Stop();
205+
Log.Instance.Info("API Execution Time (s): " + ((float)Math.Round(activity.Duration.TotalMilliseconds / 1000, 3)).ToString());
201206
Log.Instance.Info("API Interface Closed");
207+
208+
209+
202210
}
203211
}
204212
}

0 commit comments

Comments
 (0)