I want to know how to get a log file of a program. This is useful to find the faults in an application when it crashes.
I mean opening the application through the terminal and at the same time writing a log file.
Are there special commands to do this, or is it automatically done whenever an application is run? If so, where is that log file stored?