Way to print/output to file using .NET?
Way to print/output to file using .NET?
I was wondering if there was a way to output to a file like you can in the powerlanguage version of PRINT. The output methods seem to only be able to print to the console. Is there a way for me to save to an ASCII or txt file instead?
Re: Way to print/output to file using .NET?
Maybe not a direct solution to your question, but you might want to consider using real logging framework like nlog. It is in many ways superior to the MC console.
For example you can define multiple logging targets such as file, network, windows event log, database and others. You can have multiple targets and you can even reconfigure targets and log-levels while the signal/indicator is executing without recompiling and reapplying the system to the chart.
Im using nlog and log2console as a logviewer. You can filter log-messages by log-level and class from where the message originated (handy if you have lots of moving parts). I wouldnt want to miss it.
For example you can define multiple logging targets such as file, network, windows event log, database and others. You can have multiple targets and you can even reconfigure targets and log-levels while the signal/indicator is executing without recompiling and reapplying the system to the chart.
Im using nlog and log2console as a logviewer. You can filter log-messages by log-level and class from where the message originated (handy if you have lots of moving parts). I wouldnt want to miss it.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times