Workarounds for functions which are not available in new mongosh

Hi Massimiliano

hostname() and tojsononeline() are part of my application scripts. They are used for logging purpose.

I skipped using _getEnv() because it is not documented. Otherwise I would use it also in my application. Currently I use rather --eval "const HOME = ${HOME}" if I need to read environment variables.

Kind Regards
Wernfried

1 Like