Skip to content

String representation of logged instances should be configurable #6

Description

@Ozzypig
local part = workspace.Part
Logging:info("%s is my favorite part", part) --> not currently possible, see #5 
Logging:info("%s is my favorite part", part.Name)
Logging:info("%s is my favorite part", part:GetFullName())

Doing print(part) uses the part's name as if it were tostring(part). It would be nice to have a configuration that switches to the result of Instance:GetFullName. While it is not possible to use %s with an instance (see #5), it should be possible to use the full name for more verbose logging.

This begs the question of where such configurations should live, e.g. all loggers in general (like level), the root logger only, or on formatters.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions