hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

silent.ha (424B)


      1 // SPDX-License-Identifier: MPL-2.0
      2 // (c) Hare authors <https://harelang.org>
      3 
      4 use fmt;
      5 
      6 // A logger that does not print any messages.
      7 export const silent: *logger = &_silent;
      8 
      9 let _silent: logger = logger {
     10 	println = &silent_println,
     11 	printfln = &silent_printfln,
     12 };
     13 
     14 fn silent_println(l: *logger, fields: fmt::formattable...) void = return;
     15 fn silent_printfln(l: *logger, fmt: str, fields: fmt::field...) void = return;