Difference between revisions of "Runtime Log Monitoring (h2)"
m |
m |
||
(3 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
|- | |- | ||
| Runtime Log Monitoring (auto-update) || AFRLme | | Runtime Log Monitoring (auto-update) || AFRLme | ||
− | |} | + | |}{{AFRLme_Patreon}} |
− | |||
This tip shows you how to setup real-time automatic log updates, so that you don't have to keep typing '''PRINT LOG''' into the developers console or opening & closing the '''messages.log''' file each time you want to check for new log messages, errors & warnings, which is extremely useful for developers working on scripting a new feature or debugging their games. ''This tutorial is for Windows. I'm sure there are some mac alternatives for Snaketail available. Essentially it's just an app that mirrors the -tail command for Linux machines.'' | This tip shows you how to setup real-time automatic log updates, so that you don't have to keep typing '''PRINT LOG''' into the developers console or opening & closing the '''messages.log''' file each time you want to check for new log messages, errors & warnings, which is extremely useful for developers working on scripting a new feature or debugging their games. ''This tutorial is for Windows. I'm sure there are some mac alternatives for Snaketail available. Essentially it's just an app that mirrors the -tail command for Linux machines.'' | ||
Line 18: | Line 17: | ||
[[File:rtlog_01.png|400px]] | [[File:rtlog_01.png|400px]] | ||
+ | |||
2a. Next you are going to need to download Snaketail from [https://github.com/snakefoot/snaketail-net/releases/latest here]. Snaketail is an open source app for windows that emulates the -tail command of Linux. In other words it will automatically update any txt / log files you open automatically on file change or after every x amount of time. | 2a. Next you are going to need to download Snaketail from [https://github.com/snakefoot/snaketail-net/releases/latest here]. Snaketail is an open source app for windows that emulates the -tail command of Linux. In other words it will automatically update any txt / log files you open automatically on file change or after every x amount of time. | ||
Line 25: | Line 25: | ||
{| class="ts" | {| class="ts" | ||
|- | |- | ||
− | | '' To find the localAppDir where your projects save game files & log messages are stored, you should run your game through the editor. Press TAB on your keyboard to open up the developer console & then type | + | | '' To find the '''localAppDir''' where your projects save game files & log messages are stored, you should run your game through the editor. Press '''TAB''' on your keyboard to open up the developer console & then type: '''exec print( localAppDir )'''. Press '''enter''', then type '''PRINT LOG''', then press '''enter''' again to show the log. Navigate through the log pages using the '''PAGE UP''' & '''PAGE DOWN''' keys on your keyboard & look for a line containing something like '''c:/users/...''' & that will be where the '''localAppDir''' for your game is located.'' |
− | |||
− | exec print( localAppDir ) | ||
− | |||
− | ''. | ||
|} | |} | ||
+ | |||
[[File:rtlog_02.png|800px]] | [[File:rtlog_02.png|800px]] | ||
+ | |||
3. To display both files at the same time you should use either: the '''Tile windows horizontally''' or the '''Tile windows vertically''' options found under the '''Windows''' menu. Once done you should have something like this... | 3. To display both files at the same time you should use either: the '''Tile windows horizontally''' or the '''Tile windows vertically''' options found under the '''Windows''' menu. Once done you should have something like this... | ||
[[File:rtlog_03.png|800px]] | [[File:rtlog_03.png|800px]] | ||
+ | |||
4. Snaketail does not automatically remember the last session when you open it. The simplest method for getting it to remember the last session is to use '''Save session''', '''load session''' & '''recent files''' in the '''File''' menu. | 4. Snaketail does not automatically remember the last session when you open it. The simplest method for getting it to remember the last session is to use '''Save session''', '''load session''' & '''recent files''' in the '''File''' menu. | ||
Line 48: | Line 47: | ||
! style="text-align:left" | Name !! style="text-align:left" | Description | ! style="text-align:left" | Name !! style="text-align:left" | Description | ||
|- | |- | ||
− | | | + | | [https://github.com/snakefoot/snaketail-net/releases/latest Snaketail] || The application that we will be using to monitor the messages.log & viseditor.log files. |
|}{{toc}} | |}{{toc}} |
Latest revision as of 15:41, 5 August 2016
Name | By |
---|---|
Runtime Log Monitoring (auto-update) | AFRLme |
This tip shows you how to setup real-time automatic log updates, so that you don't have to keep typing PRINT LOG into the developers console or opening & closing the messages.log file each time you want to check for new log messages, errors & warnings, which is extremely useful for developers working on scripting a new feature or debugging their games. This tutorial is for Windows. I'm sure there are some mac alternatives for Snaketail available. Essentially it's just an app that mirrors the -tail command for Linux machines.
I tried a few other apps including the silent update function of Notepad++, but none of the other programs wanted to run silently in the background. They needed the application window to be active (selected) in order to update the data retrieved from any linked log files, which wasn't much different to opening & closing the log files manually or using the print log command in the developer console. |
Tutorial
1. First things first, you should make sure the log level for Visionaire Studio is set to info. To do this go to extras > options > player: set log level to info. The info setting will print out errors, warnings & messages generated by the print() command.
2a. Next you are going to need to download Snaketail from here. Snaketail is an open source app for windows that emulates the -tail command of Linux. In other words it will automatically update any txt / log files you open automatically on file change or after every x amount of time.
2b. Once you have downloaded & extracted or installed whichever version of Snaketail you need (x64, x86, portable), open it. Next we need to locate two files; one being the log file for the Visionaire Studio editor (viseditor.log) & the other being the log file associated with the project you are currently working on (messages.log). These two files will update you on various issues generated by the editor (development) or the player (runtime). Both files are located somewhere in c:/users/username/appdata/local/... Once done you will end up with 2 tabs.
To find the localAppDir where your projects save game files & log messages are stored, you should run your game through the editor. Press TAB on your keyboard to open up the developer console & then type: exec print( localAppDir ). Press enter, then type PRINT LOG, then press enter again to show the log. Navigate through the log pages using the PAGE UP & PAGE DOWN keys on your keyboard & look for a line containing something like c:/users/... & that will be where the localAppDir for your game is located. |
3. To display both files at the same time you should use either: the Tile windows horizontally or the Tile windows vertically options found under the Windows menu. Once done you should have something like this...
4. Snaketail does not automatically remember the last session when you open it. The simplest method for getting it to remember the last session is to use Save session, load session & recent files in the File menu.
& that about covers it. If you want you can enable the always on top option in the file menu or adjust the refresh / changes interval values under Edit > View options > log file.
Resources
Name | Description |
---|---|
Snaketail | The application that we will be using to monitor the messages.log & viseditor.log files. |