Console

# Course Introduction

Let's learn about logs and see how to use them effectively in the World production process.

# About Logs

(Log) refers to a record of various kinds of information or problematic situations during the World creation process. Logs allow you to verify that the World you are currently working on is working as intended. If something does not work as intended, you can use the logs to figure out what the cause is and troubleshoot the problem. Log types are categorized by the agent that leaves the log. Let's categorize them as System Logs and Creator Logs.

## System Log

This refers to a log that identifies and informs the system of informational messages or errors that occur in the World being created. System Log errors are cateogized like the following based on significance.

[{"Importance":"Low","Icon":"\u0001","Description":"Various information that doesn't impact how the world functions. (Info)"},{"Importance":"Medium","Icon":"\u0001","Description":"Warnings for methods not recommended by the maker or when there is a high chance of an error. (Warning)"},{"Importance":"High","Icon":"\u0001","Description":"Errors that will cause problems if not resolved. (Error)"}]

## Creator Log

This is the log that the creator makes using the log function during the World production process. This can be used to verify that the World is working as the creator intended. The log() function outputs the value that was passed as a parameter to the console window. Variables, property values, or return values of functions can be output on the console window for verification. For example, let's leave a log, "Hello Maple World", when the script component is executed.
    
    
    @Component
    script WorldGreetingLogger extends Component
        @ExecSpace("ServerOnly")
        method void OnBeginPlay()
        log("Hello Maple World")
        end
    end
    

After writing the foregoing, if you test by pressing [Play] , you can check the log on the console window. [png](1653635780944b306b67d58ac48f68585d42061a8ae00)

### Types of Creator Log Functions

Creators can define and use three types of log functions as they see fit.

[{"Log Function":"log()","Description":"The log's icon will display as information (Info)\u0001."},{"Log Function":"log_warning()","Description":"The log's icon will display as a warning (Warning) \u0001."},{"Log Function":"log_error()","Description":"The log's icon will display as an error (Error)\u0001."}]
    
    
    @Component
    script TestLogger extends Component
        @ExecSpace("ServerOnly")
        method void OnBeginPlay()
        log("test_info")
        log_warning("test_warning")
        log_error("test_error")
        end
    end
    

After writing the foregoing, if you test by pressing [Play] , you can check the log on the console window. [png](16546769028283859434d3a424558adaf5c5164899732)

> Tip When creating a world, logs are made frequently to confirm that everything is working as intended. However, if too many logs are made during play testing, it may be easy to overlook crucial logs. We recommend creators organize logs while working on their worlds.

# Check the Log

You can check the log on the console window of the maker. You can open the console window by clicking the Maker's top menu - Panels - Console. The console is divided into console and build console as shown below.

## Console

The console outputs logs of information, warnings, and errors that occurred during the playtest. [png](1654137093143eb77525627fd4de5b7fc28d2c98e7d97)

[{"Numbers":"\u0001","Description":"Deletes the logs remaining in the console window. Click on the expand button on the right side of Clear to activate Clear on Play, \u0001 and click the Start button to automatically delete any logs remaining in the console window and start."},{"Numbers":"\u0001","Description":"Click the button to merge duplicate logs into one. \u0001 The total number of areas combined is displayed."},{"Numbers":"\u0001","Description":"You can collect logs by execution space (Client \/ Server)."},{"Numbers":"\u0001","Description":"Search logs."},{"Numbers":"\u0001","Description":"\u0001 View the total number of info logs.  When this button is activated, \u0001 this \u0001 is where the information is visible, and it won't be visible when deactivated."},{"Numbers":"\u0001","Description":"\u0001 View the total number of warning logs.  When this button is activated, \u0001 this \u0001 is where warnings are visible, and it won't be visible when deactivated."},{"Numbers":"\u0001","Description":"\u0001 View the total number of error logs.  When this button is activated, \u0001 this \u0001 is where warnings are visible, and it won't be visible when deactivated."},{"Numbers":"\u0001","Description":"You can check the log's severity, recorded time, execution space, and details."},{"Numbers":"\u0001","Description":"You can see how many duplicate logs are combined."},{"Numbers":"\u0001","Description":"\u0001 If you select a specific log, you can view detailed information about that log. In the case of a script error, clicking the link moves to the corresponding line in the script. If it is an entity, the entity is selected in \u0001 Hierarchy."}]

## Build Console

Information, warnings, and error logs generated from scripts, logic, and data of the World being created are the output. [png](16764466594148031d846b5b54c8c8c3d458c9cb97fee)

[{"Numbers":"\u0001","Description":"You can view only the logs created by the current script by activating the Current scrip Only button."},{"Numbers":"\u0001","Description":"Search logs."},{"Numbers":"\u0001","Description":"\u0001 View the total number of info logs.  When this button is activated, \u0001 this \u0001 is where the info is visible, and it won't be visible when deactivated."},{"Numbers":"\u0001","Description":"\u0001 View the total number of warning logs.  When this button is activated, \u0001 this \u0001 is where the warnings are visible, and it won't be visible when deactivated."},{"Numbers":"\u0001","Description":"\u0001 View the total number of error logs.  When this button is activated, \u0001 this \u0001 is where the errors are visible, and it won't be visible when deactivated."},{"Numbers":"\u0001","Description":"You can check the log type and contents."},{"Numbers":"\u0001","Description":"\u0001 If you select a specific log, you can view detailed information about that log. In the case of a script error, clicking the link moves to the corresponding line in the script. If it is an entity, the entity is selected in \u0001 Hierarchy."}]

# Released World Console

Creators can view logs by opening the console in a released world. The information, warnings, and error logs from the world's script, logic, data, etc, are output here.

[png](1735021134960de6269099c084e1ebd3ebe4c18796a69)

[{"Number":"\u0001","Description":"Delete the logs remaining in the console window."},{"Number":"\u0001","Description":"The console can be folded and opened."},{"Number":"\u0001","Description":"Change the console to the minimized size."},{"Number":"\u0001","Description":"Saves the log as a txt file. Save Path: C:\\\Users\\\User Name\\\AppData\\\LocalLow\\\nexon\\\MapleStory Worlds\\\ConsoleLogs\\\WorldID"},{"Number":"\u0001","Description":"Adjusts the console window's transparency."},{"Number":"\u0001","Description":"Delete the remaining logs and start log output by activating Clear on play."},{"Number":"\u0001","Description":"Merges duplicate logs when the button is pressed."},{"Number":"\u0001","Description":"View the total number of info, warning, and error logs."},{"Number":"\u0001","Description":"Searches logs."}]

# Use of Logs

There aren't many cases of everything working out as the creator intended in one try when writing scripts and conducting play tests. Creators can use logs with scripts appropriately to quickly identify any problems with a world to fix them. Let's use logs to reduce trial and error and create a more efficient script.

> Learn More Script errors can be resolved faster and more accurately by properly utilizing the debug capabilities with logs. Also refer to .