-
-
Save Yardanico/cd3fb7a093a177da255335cb9d90c632 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import strformat | |
template log(data: string): untyped = | |
const | |
pos = instantiationInfo() | |
addition = | |
when defined(release): | |
fmt"[{pos.filename}] " | |
else: | |
fmt"[{pos.filename}:{pos.line}] " | |
echo addition & data | |
log("hi") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment