Answers for "where can i find console logs from logging .net"

C#
5

c# debug console log

using System.Diagnostics;

// print a message to the output window of the IDE
Debug.WriteLine("Debug Information");
Posted by: Guest on April-16-2021
1

# logging

# logging
import logging

# log the execution time and a message of an action
logging.basicConfig(filename='fileName.log',
                    level=logging.INFO,
					format='%(levelname)s:%(asctime)s:%(message)s',
					datefmt="%Y-%m-%d %H:%M:%S")

logging.info('ADD TWO NUMBERS')
print(5+5)

# output in console -> 10
# output in fileName.log -> INFO:2021-12-25 17:47:27:ADD TWO NUMBERS
# Logging is a means of tracking events that happen when some software runs. Logging is important for software developing, debugging and running. If you don’t have any logging record and your program crashes, there are very little chances that you detect the cause of the problem.
Posted by: Guest on March-27-2022

Code answers related to "where can i find console logs from logging .net"

C# Answers by Framework

Browse Popular Code Answers by Language