esm.sh
esm.sh copied to clipboard
Log to stdio?
Hi there! We're trying to self-host https://esm.sh and having the option to log to stdout/stderr would be very helpful in debugging issues. Would it be possible to configure the logger?
Maybe something like:
LOG_PATH=/esm/log
LOG_PATH=stderr
Thanks!
you can configure the log in the config.json:
{
// The log directory, default is "~/.esmd/log".
"logDir": "~/.esmd/log",
// The log level, available values are ["debug", "info", "warn", "error"], default is "info".
"logLevel": "info",
}
to uses stderr to log errors, start the server via go run -tags debug server/esmd/main.go --config=config.json
Ah okay, we're starting it via the Docker container, so I don't think there's an easy way to customize the build tags