aboutsummaryrefslogtreecommitdiff
path: root/examples/log
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-04-06 14:20:18 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-04-06 14:20:18 -0400
commit2bb2ff871fa1761478442bec5f6a32c9428360a1 (patch)
tree9b73df7a0c50c02353ae7bca7c2cd54788ef0077 /examples/log
parent59845e610f2c90474f34079d27b5f1e07071ded4 (diff)
Change method calls to use `foo.baz()` instead of `foo:baz()`
Diffstat (limited to 'examples/log')
-rw-r--r--examples/log/log.tm14
1 files changed, 7 insertions, 7 deletions
diff --git a/examples/log/log.tm b/examples/log/log.tm
index 3aa45e7a..7375d5f6 100644
--- a/examples/log/log.tm
+++ b/examples/log/log.tm
@@ -13,33 +13,33 @@ func _timestamp(->Text):
strftime(str, 20, "%F %T", tm_info);
str
}
- return c_str:as_text()
+ return c_str.as_text()
func info(text:Text, newline=yes):
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)
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)
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)
for file in logfiles:
- file:append("$(_timestamp()) [error] $text$\n")
+ file.append("$(_timestamp()) [error] $text$\n")
func add_logfile(file:Path):
- logfiles:add(file)
+ logfiles.add(file)
func remove_logfile(file:Path):
- logfiles:remove(file)
+ logfiles.remove(file)
func main():
add_logfile((./log.txt))