Skip to content
Hyomoto edited this page Jun 24, 2021 · 15 revisions
Jump To Go Back Arguments Methods Variables

Logger( name, Outputs... )

The Logger makes it easy to write outputs to multiple streams. A common use case is if you wanted to write something to both the GMS output window as well as a text file. If FAST events are not disabled, all open Loggers will be closed when the game ends. Since logger must make use of the outputs, it must keep them open. If you would like to change this behavior, use a BufferedOutput instead.

global.debug	= new Logger( "debug", FAST_LOGGER_DEFAULT_LENGTH, System, new FileText( "log/debug.text" ) )

debug.write( "Hello World!" );

Arguments

Name Type Purpose
name string The name of the logger, will be used to differentiate its output
Outputs... [__OutputStream__](__outputstream__) The outputs that this Logger will write to

Methods

Jump To top write close toString

write( )

Name Type Purpose
None

No description.


close( )

Name Type Purpose
None

Calls close() on all of the provided outputs.


toString( )

Name Type Purpose
None

Returns the name of this Logger, for debugging purposes.


Variables

Jump To top
Name Type Initial Purpose
Logs int undefined or int If FAST events are disabled, returns undefined. Otherwise used to manage the log list.
__Outputs undef array_create( argument_count - 1 ) No description.
__Name undef _name No description.
Clone this wiki locally