Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7051417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:15:40+00:00 2026-05-28T03:15:40+00:00

I am currently using TopShelf with a Console Application to create a Windows Service.

  • 0

I am currently using TopShelf with a Console Application to create a Windows Service. When I run the code as a console application I use a few Console.WriteLine() to output results. Once the code does what it is supposed to do I install the console application as a Windows Service.

Are there any downsides with leaving the Console.WriteLine() code even though a Windows Service can not write to the console? Are there any risks of having unstable code if I leave the Console.WriteLine() in there?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:15:40+00:00Added an answer on May 28, 2026 at 3:15 am

    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:

    1. The System.Diagnostics.Trace class has a similar interface to the
      Console class so you could migrate your code quite easily to this.
    2. It can then be configured to output to a file. You can use the
      System.Diagnostics.EventLog class to write to the Event Log which you can then monitor using Event Viewer.
    3. You can use the third-party
      open-source log4net library which is very flexible.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently using TopShelf with Ninject to create a Windows Service. I have
Im currently using a java application to run commands on a unix box by
I am currently using Windows Server 2008 Standard and have several Hyper V machines.
I am currently using matplotlib.pyplot to create graphs and would like to have the
Our team is currently using some ported code from an old architecture to a
Im currently using PHP to fetch results from a mysql db. Im also displaying
The code im currently using is this var focus; function focuswindow() { focus =
im currently using the SDL-devel-1.2.13-mingw32 library in code blocks 8.02. with the mingw 5.1.6
Currently using wxHTML to display a remote web page in a C++ Windows wxWidgets
Im currently using the available toolkit for windows phone. By using the time picker,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.