Have anybody used console log4net appender in .net core based windows service application? I am using .net core 2.1.6 console application which is hosted inside windows service. I have a file appender which is righting to file. wanted a console appender log view real time at console as well.
Asked
Active
Viewed 164 times
1 Answers
0
A Windows Service has no visible console, it runs on an invisible desktop. See Console.WriteLine() inside a Windows Service?.
If you want to view your log in real-time, then open the log with a viewer that supports that, for example tail -f
on Git Bash, or through Notepad++ with the tail button (eye icon). Note that the latter tends to hang of the file is being written to a lot.

CodeCaster
- 147,647
- 23
- 218
- 272
-
I know windows service has no visible console. Is there Anyway i can forward my logs with any appender where i can view in any sort of console. like supervidor d in linux or anything else – Kamran Shahid Aug 30 '19 at 13:42
-
I'm sure that for whatever log service you want to use, an appender is available. – CodeCaster Aug 30 '19 at 13:48
-
I know about consoleappender / colourconsoleappender . Just not able to connect how can i show/watch those logs on windows service which is running a dotnet core application. i haven't used tail -f prior or notepad++ eye icon.I am use to notepad++ for my logs views. will try eye icon on it. Thanks – Kamran Shahid Aug 31 '19 at 14:02