Shiva-Shadowsong / loggie

A logging utility for Godot.
MIT License
50 stars 4 forks source link

FIX: prefix #13

Closed Pastque closed 1 day ago

Pastque commented 1 week ago

In the loggie_message.gd file, Parameter passing error

## Prepends the given prefix string to the start of the message with the provided separator.
func prefix(prefix : String, separator : String = "") -> LoggieMsg:
    self.content = "{prefix}{space}{content}".format({ # {prefix}{space}{content} Parameter passing error
        "prefix" : prefix,
        "separator" : separator,
        "content" : self.content
    })
    return self

Loggie.msg("After").prefix("Before").info() -> Before{space}After Should be replaced by

## Prepends the given prefix string to the start of the message with the provided separator.
func prefix(prefix : String, separator : String = "") -> LoggieMsg:
    self.content = "{prefix}{separator}{content}".format({ #After repair
        "prefix" : prefix,
        "separator" : separator,
        "content" : self.content
    })
    return self

Loggie.msg("After").prefix("Before").info() -> BeforeAfter

Shiva-Shadowsong commented 1 week ago

Thanks for the report, this has already been fixed in https://github.com/Shiva-Shadowsong/loggie/commit/ce7541fdfab612d7237061aa3566c7588e4e451b and will be released in 1.5.

I will leave the issue up for visibility until it is merged to master.