I'm trying to create cyclic logs with GETH.

For some reason, after I'm removing/emptying the file, the geth client node does not write the logs back into it.

geth --datadir $path --syncmode 'full' --rpc --rpcaddr "" --rpcapi $rpcapi --rpcport $rpcport --port $port --gasprice 0 --mine > $path/log 2>&1 &

$path/log :
INFO [01-08|11:54:57] Initialising Ethereum protocol           versions="[63 62]" network=1699

After removing/empty the $path/log file.

The file stay empty and not fill with logs..

Any clue how I can make it work that the logs will write again after I empty the log file?

closed as off-topic by Ismael, Richard Horrocks, Briomkez, ivicaa, shane Jan 14 at 19:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question does not appear to be about Ethereum, the decentralized application platform and smart contract enabled blockchain, within the scope defined in the help center." – Ismael, Richard Horrocks, Briomkez, ivicaa, shane
If this question can be reworded to fit the rules in the help center, please edit the question.

  • You are redirecting the standard output to a file using the shell so geth is not aware where it is writing. If you delete the file and create a new one geth might not be aware. Fortunately there are several tools that allows rotating files in such cases superuser.com/questions/291368/log-rotation-of-stdout. – Ismael Jan 14 at 6:20

Browse other questions tagged or ask your own question.