Skip to content

Logging

Tanveer Yousuf edited this page Aug 9, 2018 · 6 revisions

Logging Overview

Logging code in an application can unnecessarily get complicated. However, with DevAccelerate Core, you can write log messages in a unified fashion regardless of all the under-the-hood complexities. You just need to create an instance of the IDaLogManager type and pass an IDaLogMessage object to the Write method:

var logManager = DaLogManagerFactory.CreateLogManager();

var msg = new DaLogMessage()
{
    Title = "some title",
    Priority = 3,
    Text = "Some text"
};

var categories = new List<string>();
categories.Add("General");
msg.Categories = categories;
logManager.Write(msg);
Clone this wiki locally