Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

topshelf

Serilog in Windows-Service not writing to logfile

September 29, 2023 by Tarik

I had a very similar issue. In my case, the problem was with relative paths. I just had to specify the absolute path. Now it works like a charm. WriteTo.RollingFile(AppDomain.CurrentDomain.BaseDirectory + “\\logs\\log-{Date}.log”)

Categories windows-services Tags serilog, topshelf, windows-services Leave a comment

Console.WriteLine() inside a Windows Service?

August 24, 2023 by Tarik

The output will simply be discarded. In a Windows Service there is no Console so Console.Write* output is discarded. There are a number of alternatives: The System.Diagnostics.Trace class has a similar interface to the Console class so you could migrate your code quite easily to this. It can then be configured to output to a … Read more

Categories c# Tags c++, topshelf, windows-services Leave a comment

Installing a Topshelf application as a Windows service

February 14, 2023 by Tarik

Run your service.exe install to install the service. See the Topshelf Command Line Reference documentation for more information.

Categories .net Tags .net, topshelf, windows-services Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa