charmbracelet / charmbracelet/log

Change default caller format

Open
#151 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
3.4k
Forks
103
PR merge metrics
No merged PRs in 30d

Description

Currently the caller format is

```go
caller = fmt.Sprintf("<%s>", caller)
```

Which yields

```console
2024/11/24 00:17:22 INFO Installing browser...
```

When I click it in the console in VSCode it cannot open the file. that's very useful for me to click it and open the line where the logs comes from automatically.

![image](https://github.com/user-attachments/assets/be7d9a7f-d9cf-450d-8674-421f8d463dc6)

I suggest changing a bit the format of the caller. for instance with `caller = fmt.Sprintf("[%s]", caller)` it's clickable

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.