Skip to content

Commit 734531f

Browse files
committed
(maint) Fix language server logging to a file
Previously the case compare was looking for a non zero result which meant even if a debug file was specified, it still used STDOUT. This commit now correctly identifies when a user enters stdout as the debug destination.
1 parent 3690ca2 commit 734531f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/lib/puppet-vscode/logging.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def self.log_message(severity, message)
2121
def self.init_logging(options)
2222
if options[:debug].nil?
2323
@logger = nil
24-
elsif options[:debug].casecmp 'stdout'
24+
elsif (options[:debug].casecmp 'stdout').zero?
2525
@logger = Logger.new($stdout)
2626
elsif !options[:debug].to_s.empty?
2727
# Log to file

0 commit comments

Comments
 (0)