Skip to content
Snippets Groups Projects

C# Template

C# library allowing logging.

Example for including custom log messages: Add the following code to the required Api controller constructor and add the logger calls where needed:

    public class ProjectController : Controller
    {
        ...
		private readonly CoscineLogger _logger;

        public ProjectController(ILogger<LicenseController> ilogger)
        {
			...
            _logger = new CoscineLogger(ilogger);
            _logger.Log(LogType.Reporting, "Example log message");
        }