# Logging

If you run into issues when using Simplygon you should always check the log for clues. You should enable logging as soon as you have initialized the Simplygon interface. You can access the log in the following ways:

# Log to stdout

If you want to get the log from stdout, use the global setting "EnableLog":

    # Log to trace window

    If you want to get the log to the debuggers trace window, use the global setting "LogOutputToTraceWindow". (Note that log to trace window is enabled by default, as long as logging is enabled.)

      # Log to file

      If you want to get the log to a file, you need to enable the "LogToFile" setting, and also for each of the threads that call into Simplygon, set the log file that will receive the log, using the SetThreadLocalLogFileNameSetting call. If you run Simplygon from only one thread, you only need to set it once.

        # Flush every row to log

        By default, the log is written to a cached stream, which means that if there is a crash, some of the rows might be missing from the log. To enable Simplygon to flush every row, but at a performance hit, use "FlushLogPerRow".