Перейти к основному содержанию

Logger

Module used to log messages to Inner Core and internal log.

Index

Functions

Flush

  • Flush(): void
  • Writes logger content to file and clears all buffers.


    Returns void

Log

  • Log(message: string, prefix?: string): void
  • Writes message to the log, using specified log prefix.

    @remarks

    It will be writed to [<prefix>/D] <message> as-is, where prefix will be MOD if it not specified.


    Parameters

    • message: string

      message to be logged

    • optionalprefix: string

      prefix of the message, can be used to filter log

    Returns void

LogError

  • LogError(error: Throwable): void
  • Logs java Throwable with full stack trace to.


    Parameters

    • error: Throwable

      java Throwable to be logged

    Returns void

debug

  • debug(tag: string, message: string): void
  • Writes debugging message to log, using specified tag.

    @remarks

    It will be writed to [<tag>/D] <message> as-is.

    @since

    2.2.0b77


    Parameters

    • tag: string
    • message: string

    Returns void

error

  • error(tag: string, message: string, error?: Throwable): void
  • Writes error message to log, using specified tag. If it writed before game startup finish, debugging log with all messages will appear.

    @remarks

    It will be writed to [<tag>/E] <message> as-is. If error also provided, it will be appended with same tag above error message.

    @since

    2.2.0b77


    Parameters

    • tag: string
    • message: string
    • optionalerror: Throwable

    Returns void

info

  • info(tag: string, message: string): void
  • Writes information message to log, using specified tag.

    @remarks

    It will be writed to [<tag>/I] <message> as-is.

    @since

    2.2.0b77


    Parameters

    • tag: string
    • message: string

    Returns void

Page Options