You can output textual information during the model execution. You can use it for tracing the model execution by writing specific text on different occurrences. It can also be used as a debugging tool, for example, to find out what is the order in which the model executes actions of different objects. This possibility is convenient for output of information across several model runs, because information you write is not reset in between model runs.
The log is displayed in the Console view as a read-only text, which can be copied onto the clipboard. By default, the Console view opens at the bottom of the application window when you run your model.
You write to log using the functions trace() and traceln() in the same way as you write in Java using System.out.print() and System.out.println() Java functions.Demo model: Event Writes to the Log Open the model page in AnyLogic Cloud. There, you can run the model or download it (by clicking Model source files).
How can we improve this article?