Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Logging
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Coscine
backend
libraries
Logging
Commits
4d814642
Commit
4d814642
authored
5 years ago
by
David Schimmel
Browse files
Options
Downloads
Patches
Plain Diff
Docs: Add instructions for adding custom log messages
parent
f9306780
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1
New: Created the Logging library
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+17
-29
17 additions, 29 deletions
README.md
with
17 additions
and
29 deletions
README.md
+
17
−
29
View file @
4d814642
## 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.

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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment