MicroLogger.API_Serilog.Standard 1.0.5

MicroLogger is an API for an OpenSource Project that we call it NewsRoom

Install-Package MicroLogger.API_Serilog.Standard -Version 1.0.5
dotnet add package MicroLogger.API_Serilog.Standard --version 1.0.5
<PackageReference Include="MicroLogger.API_Serilog.Standard" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MicroLogger.API_Serilog.Standard --version 1.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

micro-logger-API

API for logging in aspnetcore applications and send them to rabbitmq

How to Use API

Register the API services in startup.cs class file

    public class Startup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddMicroLogger(new MicroLogger.API.DomainClasses.MessageBrokerInfoInputModel
            {
                ClientName = "<YourMicroServiceName(Use4ConnectionName)>",
                HostName = "127.0.0.1",
                Port = 15672,
                Username = "guest",
                Password = "guest"
            });
            // ...
            // ...
            // ...

and use the APIs in controllers

    public class HomeController : Controller
    {
        private readonly IMicroLogger logger;
        public HomeController(IMicroLogger logger)
        {
            this.logger = logger;
        }

        public IActionResult Index()
        {
            logger.Info(new LogModel { Message="test msg" });
            logger.Error(new LogModel { Message = "test msg" });
            logger.Warn(new LogModel { Message = "test msg" });
            return View();
        }

micro-logger-API

API for logging in aspnetcore applications and send them to rabbitmq

How to Use API

Register the API services in startup.cs class file

    public class Startup
    {
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddMicroLogger(new MicroLogger.API.DomainClasses.MessageBrokerInfoInputModel
            {
                ClientName = "<YourMicroServiceName(Use4ConnectionName)>",
                HostName = "127.0.0.1",
                Port = 15672,
                Username = "guest",
                Password = "guest"
            });
            // ...
            // ...
            // ...

and use the APIs in controllers

    public class HomeController : Controller
    {
        private readonly IMicroLogger logger;
        public HomeController(IMicroLogger logger)
        {
            this.logger = logger;
        }

        public IActionResult Index()
        {
            logger.Info(new LogModel { Message="test msg" });
            logger.Error(new LogModel { Message = "test msg" });
            logger.Warn(new LogModel { Message = "test msg" });
            return View();
        }

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.5 57 8/13/2019