awaescher/Fusion

install as service

Closed this issue · 3 comments

hi,

can you provide this as a windows service.

the idea. we are running tests in teamcity, it would be super cool to enalbed disable fuslog and be able to export the data and make it availabel during build. So users can quickly investigate whats going on

thanks

Hi,

what an idea - but I think this does not fit well. You see, Fusion++ is an UI-centered app. There's no headless mode or anything like that. Running this as a Windows Service seems wrong to me (especially with all those megabytes of DevExpress UI controls, etc.).

However, I want to encourage you to build an own service. You can use the classes I wrote to control the .NET Assembly Log registry keys and parse the logs if you want.

To record a session, simply use this code:

var session = new FusionSession(new RegistryFusionService());
session.Start()
...
session.Stop();

This handles everything you need in the Windows Registry.

To parse the logs afterwards, use:

var logStore = new TransparentLogStore("PATH-GOES-HERE");
var parser = new LogFileParser(new LogItemParser(), new FileReader(), new LogFileService(logStore));
parser.Progress = (current, total) => ... // do anything here if you want progress reporting
var logs = await parser.ParseAsync();

Hope this helps.

For an upcoming experiment, I extracted all the reusable Fusion++ logic to an .NET Standard library here.
I do not plan to make a package or anything. However you can use that lib from now on if you want.