Git Product home page Git Product logo

dna-framework's People

Contributors

angelsix avatar brinkdinges avatar eynsherkiel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dna-framework's Issues

Error on ensure database file logger

at Microsoft.Extensions.Logging.Logger.Log[TState](LogLevel logLevel, EventId eventId, TState state, Exception exception, Func3 formatter) at Microsoft.Extensions.Logging.LoggerMessage.<>c__DisplayClass10_06.b__0(ILogger logger, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, Exception exception)
at Microsoft.EntityFrameworkCore.Diagnostics.EventDefinition6.Log[TLoggerCategory](IDiagnosticsLogger1 logger, WarningBehavior warningBehavior, TParam1 arg1, TParam2 arg2, TParam3 arg3, TParam4 arg4, TParam5 arg5, TParam6 arg6, Exception exception)
at Microsoft.EntityFrameworkCore.Internal.RelationalLoggerExtensions.CommandError(IDiagnosticsLogger1 diagnostics, DbCommand command, DbCommandMethod executeMethod, Guid commandId, Guid connectionId, Exception exception, Boolean async, DateTimeOffset startTime, TimeSpan duration) at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary2 parameterValues)
at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteRelationalConnection.EnableForeignKeys()
at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteRelationalConnection.Open(Boolean errorsExpected)
at Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.SqliteDatabaseCreator.Exists()
at Microsoft.EntityFrameworkCore.Storage.RelationalDatabaseCreator.ExistsAsync(CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Migrations.HistoryRepository.d__23.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.d__12.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at KeitriPOS.Relational.ClientDataStore.d__22.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at KeitriPOS.App.d__1.MoveNext() in D:\Projects\WPF\KeitriPOS_v2\KeitriPOS\App.xaml.cs:line 51

LogLevel not present in logfile

Hi,

I use your framework on many project and I'm almost fully satisfy of it. You did a great job.

My last point of disappointment is the fact that we don't log the log level on the log file. Why you don't use them on the log file ?

Or may we can and I don't understand how to activate them.

Anyway great job and thank you.

Use ASP.NET Core 3

I've updated my server project to ASP.NET Core 3 and have tried to implement Dna.Framework.AspNet. I've followed this guide and made the following changes related to Dna:

Program.cs

        public static IHostBuilder CreateHostBuilder(string[] args) =>
            Host.CreateDefaultBuilder(args)
                .ConfigureWebHostDefaults(webBuilder =>
                {
                    webBuilder.UseDnaFramework(construct =>
                    {
                        // Add file logger
                        construct.AddFileLogger();
                    });

                    webBuilder.UseStartup<Startup>();
                });

It builds and runs, but the DI shortcuts don't work (ie. DI.ApplicationDbContext) and throws System.InvalidOperationException: 'Cannot resolve scoped service 'xxx.ApplicationDbContext' from root provider.'

Any ideas?

IsDevelopment always false in NuGet package

When calling Framework.Environment.IsDevelopment always returns false:
The #if RELEASE is checked when the NuGet package is compiled.

The best solution I found was making a method that sets the IsDevelopment with a conditional attribute and calling that method from outside the NuGet Package.

[Conditional("DEBUG")]
public void SetIsDevelopment() => IsDevelopment = true;

But this only works if you call the method from outside the NuGet Package, otherwise it will not work.

File logging date time

Hi, in the file: dna-framework/Source/Dna.Framework/Logging/File/FileLogger.cs

// Get current time
var currentTime = DateTimeOffset.Now.ToString("yyyy-MM-dd hh:mm:ss");

the problem is with the "hh" it only gives time based on AM & PM, a possible solution is to replace it with "HH" (24h basis).

HttpEndpointChecker Bug

Hi,

when I was testing the HttpEndpointChecker I found that when the app is launched offline the HttpEndpointChecker doesnt fire the "stateChangedCallback", hence the app wont be aware that it's offline and the offline bar wont show after setting the offline bar to Collapsed by default (Online by default), I digged in the Framework code and I found that this boolean is set to false by default:

public bool Responsive { get; set; }

Therefor the event doesnt fire.

if (responsive != Responsive)
{
Responsive = responsive;
mStateChangedCallback?.Invoke(responsive);
}

A possible solution to this is to simply set Responsive to "null" and add a condition "Responsive != null" next to the "responsive != Responsive"

Thank you for reading this.

Ensure directory needed on log call

When attempting to log to a file and the directory doesn't exist the call fails.

Need ensure directory of log file before attempting to log.

Documentation

Hi there,

Where can I find the dna-framework documentation ?

Best regards.

Suggestion: improvements for FileLogger

Hi, thank you for sharing your work!

I would like to extend the FileLogger with logging of exception stack trace (configurable) and configurable format string for writing timestamps (I sometimes need milliseconds). The default behavior will be unchanged.
For my own project, I also want to add a helper for logging some information about user environment (useful for troubleshooting Desktop apps).

@angelsix , would you mind checking a couple of pull requests related to the above suggestions, or should I rather not bother you with these? ;)

Dna.Framework Exception

Hi, I'm following your WPF UI Tutorials series, I'm on "part 35 - Log in to Web Server", I'm getting this exception when I click log in:

System.IO.FileNotFoundException: 'Could not load file or assembly 'Dna.Framework, Version=1.0.7.15, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.'

I googled it for 2 days now, tried many suggested solutions but nothing seems to work.

PS: Thank you so much for the series, so helpful, Much love

Issue with HttpEndpointChecker interval Please Help me

Why url checking every 20 seconds?
I want to check url every 2 or 3 seconds.
I set interval 2000 milliseconds but it is checking every 20 seconds

=================
var httpWatcher = new HttpEndpointChecker(
// Checking fasetto.chat
ApiHelpers.MainUrl,
// Every 20 seconds
interval: 2000,
// Pass in the DI logger
logger: null,
// On change...
stateChangedCallback: (result) =>
{
// Update the view model property with the new result
IoC.Application.ServerReachable = result;
});
}

This is my code

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.