Open2

UEFNでのログの設計を考えるメモ

aiiroIndyaiiroIndy

logクラス

デフォルトのログレベルはNormal。
Debug, Verbose の挙動は、しばらく前に調べた時にはNormal と同じだったような気もする。最近どうだろう

UnrealEngine.digest.verse /UnrealEngine.com/Temporary/Diagnostics
log_level<native><public> := enum:
    Debug
    Verbose
    Normal
    Warning
    Error

# log_channel is the base class used to define log channels. When printing a message to a log, the log channel class name will be prefixed to the output message.
log_channel<native><public> := class<abstract>:

# log class to send messages to the default log
log<native><public> := class:
    # Channel class name will be added as a prefix used when printing the message e.g. '[log_channel]: #Message
    Channel<native><public>:subtype(log_channel)

    # Sets the default log level of the displayed message. See log_level enum for more info on log levels. Defaults to log_level.Normal.
    DefaultLevel<native><public>:log_level = external {}

    # Print message using the given log level
    (log:)Print<native><public>(Message:string, ?Level:log_level = external {})<computes>:void

    # Prints current script call stack using the give log level
    PrintCallStack<native><public>(?Level:log_level = external {})<computes>:void


Print関数

Verse.digest.verse
# Writes `Message` to a dedicated `Print` log while displaying it in `Color` on the client screen for `Duration` seconds. By default, `Color` is `NamedColors.White` and `Duration` is `2.0` seconds.
Print<native><public>(Message:string, ?Duration:float = external {}, ?Color:color = external {})<transacts>:void

# Writes `Message` to a dedicated `Print` log while displaying it in `Color` on the client screen for `Duration` seconds. By default, `Color` is `NamedColors.White` and `Duration` is `2.0` seconds.
Print<native><public>(Message:message, ?Duration:float = external {}, ?Color:color = external {})<transacts>:void