diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-06 22:26:12 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-06 22:26:12 -0400 |
| commit | 3406515a44b13d0c290c28ac42bd364ce27560c7 (patch) | |
| tree | 38000658e651ad19b9c8c2590df8fd6bb6faa4d7 /examples/log/log.tm | |
| parent | d8afa73368cdff38125fa1f7d17ad5ce54c84def (diff) | |
Make string escapes more normal: "\n" for newline, etc. Backticks can be
used to put in literal code without escape sequences.
Diffstat (limited to 'examples/log/log.tm')
| -rw-r--r-- | examples/log/log.tm | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/log/log.tm b/examples/log/log.tm index 9c3396e7..4b7893fd 100644 --- a/examples/log/log.tm +++ b/examples/log/log.tm @@ -16,24 +16,24 @@ func _timestamp(->Text) return c_str.as_text() func info(text:Text, newline=yes) - say("$\[2]⚫ $text$\[]", newline) + say("\[2]⚫ $text\[]", newline) for file in logfiles - file.append("$(_timestamp()) [info] $text$\n") + file.append("$(_timestamp()) [info] $text\n") func debug(text:Text, newline=yes) - say("$\[32]🟢 $text$\[]", newline) + say("\[32]🟢 $text\[]", newline) for file in logfiles - file.append("$(_timestamp()) [debug] $text$\n") + file.append("$(_timestamp()) [debug] $text\n") func warn(text:Text, newline=yes) - say("$\[33;1]🟡 $text$\[]", newline) + say("\[33;1]🟡 $text\[]", newline) for file in logfiles - file.append("$(_timestamp()) [warn] $text$\n") + file.append("$(_timestamp()) [warn] $text\n") func error(text:Text, newline=yes) - say("$\[31;1]🔴 $text$\[]", newline) + say("\[31;1]🔴 $text\[]", newline) for file in logfiles - file.append("$(_timestamp()) [error] $text$\n") + file.append("$(_timestamp()) [error] $text\n") func add_logfile(file:Path) logfiles.add(file) |
