stderr
All logs that you wish to display to your users should be written to stderr
Below are various examples of how to do this is in multiple languages.
C#
Java
NodeJS
PHP
Python
Ruby
1
using System;
2
3
Console.Error.WriteLine("Hello World")
Copied!
1
System.err.println("Hello World!");
Copied!
1
console.error('Hello World')
Copied!
1
fwrite(STDERR, 'Hello World' . PHP_EOL);
Copied!
1
import sys
2
3
print("Hello World!", file=sys.stderr)
Copied!
1
require "logger"
2
3
log = Logger.new(STDERR)
4
5
log.debug('Hello Word!')
Copied!
Last modified 2mo ago
Copy link