Skip to content

Commit

Permalink
Added logger injection + missing imports
Browse files Browse the repository at this point in the history
  • Loading branch information
morofatwork committed Aug 31, 2022
1 parent 1cf8546 commit 7a70cf7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion templates/apicontroller.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;

${namespaces}namespace ${namespace};

[ApiController]
[Route("api/[controller]")]
public class ${classname} : ControllerBase
{
${cursor}
private readonly ILogger<${classname}> _logger;

public ${classname}(ILogger<${classname}> logger)
{
_logger = logger;
}
}

0 comments on commit 7a70cf7

Please sign in to comment.