Code Monkey home page Code Monkey logo

centralloggingservice's People

Contributors

dependabot[bot] avatar lumbridge avatar

Watchers

 avatar

centralloggingservice's Issues

Some problems

Hello, I am glad I found your project here, as I have searched for some time now something like this, a central logging application with a web interface in dotnet. There are so many docker solutions out there or other languages, I was really wondering if I am blind and just search for the wrong things that something basic for central logging was not available.

Is this still beeing worked on? I read that you plan to migrate it for dotnet core.

I had some hickups that I thought I just share here if it helps:

In general the route for Register for example with /api/ was not working, I removed /api/ for most calls currently.

Saving new Alerts did not write the SubscriptionId into the Database for AlertGroups, I just did a workaround for now like this:

            var newSub = _uow.Repository<Subscription>().Put(new Subscription
            {
                UserId = userId,
                AlertTriggerGroup = new AlertTriggerGroup
                {
                    UserId = userId,
                    AlertTriggerNodes = nodeList
                },
                AlertTypeId = alertTypeId,
                IsActive = true,
                DateTimeEnabled = DateTime.Now
            });

            

            try
            {
                _uow.Commit();
            }
            catch (Exception ex)
            {
                _ls.Log(StaticData.SeverityType.Error, ex);
                return Json(new { success = false, message = "Failed to save alert." }, JsonRequestBehavior.AllowGet);
            }

            newSub.AlertTriggerGroup.SubscriptionId = newSub.Id;

            try
            {
                _uow.Commit();
            }
            catch (Exception ex)
            {
                _ls.Log(StaticData.SeverityType.Error, ex);
                return Json(new { success = false, message = "Failed to save alert." }, JsonRequestBehavior.AllowGet);
            }

In Processor.cs I added just some null checks:

uow.Repository<AlertTriggerGroup>().Where(x => x != null && x.Subscription != null && x.Subscription.IsActive && !x.Subscription.IsDeleted).ToList();

To be able to register a user I modified UnityConfig.cs (unsure if all is needed)

public static void RegisterTypes(IUnityContainer container)
        {
            container.RegisterInstance(new DBEntities());

            container.RegisterType(typeof(IRepository<>), typeof(Repository<>));
            container.RegisterType<IUnitOfWork, UnitOfWork>();
            container.RegisterType<IEntities, DBEntities>();
            container.RegisterType<IController, Controller>();
            container.RegisterType<Controllers.AccountController>(new InjectionConstructor());
            container.Resolve<IUnitOfWork>();
        }

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.