Skip to content

Commit

Permalink
Disable logs by default
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacShelton committed Feb 8, 2024
1 parent ce86446 commit 759ed2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions log.adept
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import terminal

adeptls\log_filename *ubyte = '/tmp/adeptls.log'
adeptls\log_file *FILE = null
adeptls\enable_logging bool = true
adeptls\enable_logging bool = false

func initializeLogging(){
if adeptls\enable_logging {
Expand All @@ -26,8 +26,9 @@ func finalizeLogging(){

pragma __builtin_warn_bad_printf_format
func log(format String, args ...) {
vsprintf(def result String, format, args)

if adeptls\log_file != null {
vsprintf(def result String, format, args)
fwrite(result.array, 1, result.length, adeptls\log_file)
fflush(adeptls\log_file)
}
Expand Down
1 change: 0 additions & 1 deletion main.adept
Original file line number Diff line number Diff line change
Expand Up @@ -285,4 +285,3 @@ func completion(message *Message) {

lsp\writeMessage(response)
}

0 comments on commit 759ed2c

Please sign in to comment.