Skip to content
Snippets Groups Projects
Commit 4d814642 authored by David Schimmel's avatar David Schimmel
Browse files

Docs: Add instructions for adding custom log messages

parent f9306780
Branches
Tags
1 merge request!1New: Created the Logging library
## C# Template
This template includes:
* Automatic building using cake
* Automatic testing with NUnit
* Automatic linting with Resharper
* Automatic documentation publishing using Gitlab CI / CD and a self written script which puts the docs in the docs folder to the wiki
* Automatic releases using semantic-release ([ESLint Code Convention](docs/ESLintConvention)), cake and Gitlab CI / CD
## What you need to do
Place you C# project solution file in .src/.
Make sure Create directory for solution is unticked.
![alt text](docs/images/create_project.png "Create a new Project")
Delete unused docs and update this README.
Add [NUnit](docs/nunit.md) tests to your solution.
## Building
Build this project by running either the build.ps1 or the build<span></span>.sh script.
The project will be build and tested.
### Links
* [Commit convention](docs/ESLintConvention.md)
* [Everything possible with markup](docs/testdoc.md)
* [Adding NUnit tests](docs/nunit.md)
\ No newline at end of file
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");
}
```
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment