Comments (9)
Can you please provide detailed steps that can reproduce this? I've tried both a sample console app as well as unit test and am unable to reproduce this issue. The only thing I could think would be some concurrency issue writing to the file at the same time. But the file should be completely overwritten and behind a lock.
public virtual void CanRoundTripSettingsWithUpdates() {
var settings = new SettingsDictionary {
["MySetting"] = "ABCDE"
};
var storage = GetStorage();
storage.SaveObject("test.json", settings);
settings["MySetting"] = "AB";
storage.SaveObject("test.json", settings);
var savedSettings = storage.GetObject<SettingsDictionary>("test.json");
Assert.Single(savedSettings);
}
{"MySetting":"AB"}
from exceptionless.net.
The problem is observable like this:
- create a new console program (in this case I'm using .Net framework 4.5.2)
- add the appropriate Exceptionless library
- write the following code and execute (change the apiKey; change "c:\temp" to other folder if needed ):
static void Main(string[] args)
{
const string apiKey = "TLFsO5wRvyoMDiF3SSJOgkskCNhTHw**********";
const string useFolder = @"c:\temp";
var serverSettingsFile = Path.Combine(useFolder, apiKey.Substring(0,8), "server-settings.json");
ExceptionlessClient.Default.Configuration.UseFolderStorage(useFolder);
ExceptionlessClient.Default.Configuration.UseFileLogger(Path.Combine(useFolder, $"Exceptionless.log"));
ExceptionlessClient.Default.Startup(apiKey);
while (true)
{
Console.WriteLine("Change Client Configuration Settings and watch the result here (you might need to wait up to 2 minutes...)");
System.Threading.Thread.Sleep(5000);
if (File.Exists(serverSettingsFile))
{
Console.WriteLine($"Current settings (at {DateTime.Now:u}):");
Console.ForegroundColor = ConsoleColor.Cyan;
Console.WriteLine(File.ReadAllText(serverSettingsFile));
Console.ResetColor();
}
}
}
from exceptionless.net.
Does this happen if you don't use a temp folder? I just tried it and I couldn't reproduce
from exceptionless.net.
Apparently the problem occurs only when using a custom folder to settings storage, i. e.:
ExceptionlessClient.Default.Configuration.UseFolderStorage("c:\\myfolder");
It looks OK when using:
ExceptionlessClient.Default.Configuration.UseIsolatedStorage();
(one can confirm by opening the file "C:\ProgramData\IsolatedStorage\xxx\AssemFiles\TLFsO5wR\server-settings.json"
)
from exceptionless.net.
What operating system are you using? I'm on Windows 11 and I also tried it with UseFolderStorage("store")
and it worked
from exceptionless.net.
I'm using Windows 10 Pro.
However, I downloaded the entire code from this repository and tested by referencing directly the VIsual Studio project into my test console (instead in referencing the complied assemblies), and that way it worked OK.
So the mistery remains.
from exceptionless.net.
I've been able to reproduce using the nuget package and not source. I'll try and track this down
from exceptionless.net.
I need to get better about pushing more frequent releases. I just noticed after tracking this down that this was actually fixed in this pr quite some time ago: #247 I'm pushing a new release in a few minutes.
from exceptionless.net.
https://github.com/exceptionless/Exceptionless.Net/releases/tag/v4.7.0
from exceptionless.net.
Related Issues (20)
- I can receive Error level data, but I cannot receive infomation level log data (exceptionless.Nlog used) HOT 9
- Using Exceptionless.NLog with Exceptionless.AspNetCore can not capture the HTTP context information HOT 1
- Why can't Info level logs be uploaded to Exceptionless HOT 5
- How disable de-duplicated. HOT 7
- Add Exceptionless.Windows plugin to capture additional helpful information HOT 3
- Exception.HResult is not being mapped to error.code property HOT 2
- Flaky test - PersistedDictionaryTests.WillSaveOnce
- Flaky test - FileExceptionlessLogTests.LogFlushTimerWorks HOT 1
- Sometimes pinvoke cannot work fine HOT 4
- Front end site cannot load normally HOT 1
- Updating from v4.6.2 to v4.7.0 or newer causes conflicts with Ben.Demystifier HOT 1
- Breaking change - System.Diagnostics.ExceptionExtensions now marked as internal HOT 2
- Blazor WebAssembly Support HOT 1
- Issue with commit log in DispatcherUnhandledException event HOT 5
- Exceptionless.Windows vs Exceptionless.Wpf HOT 2
- Preserving custom object property names sent to SetProperty and AddObject HOT 2
- NLog: How can I send user identity? HOT 4
- Update NLog ExceptionlessTarget to use Layout for ApiKey and ServerUrl HOT 6
- NLogExceptionlessLog Missing Exception object HOT 4
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 exceptionless.net.