RakambdaOrg/ChannelPointsMiner

Linux: Creating log file named "/logs/miner.log" at the home user root.

Messiah93 opened this issue · 5 comments

Description

When I start /home/m93_srv7_u2/service_cpm1/miner-shaded.jar, this create a folder named "logs" at the home user root (/home/m93_srv7_u2/logs), and in this logs folder is created at the same time a file "miner.log", which remains empty by the way.

I think the folder may be located at /home/m93_srv7_u2/service_cpm1 instead of /home/m93_srv7_u2/

Start file is located at /home/m93_srv7_u2/service_cpm1/run.sh and the content is:

java -jar miner-shaded.jar --settings config.json

I try to add "export HOME=$PWD" at top of start file but it didn't change anything.

Does it exist a workaround for the file stops being created at the root of the user home?

Version / commit

2.2.6 | 3e83c06 | HEAD

Relevant log output

No response

You can define your own logger file that'll log just to the console or put it in the path you desire.

I'll see later on to maybe change the default. But in any case it's still somewhat better to provide your own logger as you have 100% control over it.

I don't want to use any logger because i'm logging from tmux instance directly, and i'm using Discord Webhook. I just want to avoid folder and file logs/miner.log from be created if it's possible.

What's the issue with using a custom logger?
You can pretty much define a logger that does nothing or log to console, basically "avoid folder and file logs/miner.log from be created".

There's even an example that is given to log only to the console.

Yep it working with console only logger, but I thought by default no miner.log was generated, especially it's not in the right place and empty by default.

I changed the default location in the develop branch d31599c. Will be released along some other stuff as it's not super critical.