Kkevsterrr / geneva

automated censorship evasion for the client-side and server-side
https://censorship.ai
BSD 3-Clause "New" or "Revised" License
1.91k stars 177 forks source link

Engine: Ability to set log file logging level #37

Closed lepz0r closed 1 year ago

lepz0r commented 2 years ago

Currently Geneva engine.py always write log to file with logging level debug regardless of --log level parameter, but it can be problem when downloading a large file or having too many connections, the log file can grow so quickly

Kkevsterrr commented 2 years ago

Can you share how are you invoking the engine? If running engine.py directly, --log should control the logger; if that's not working, I'll mark this a bug

lepz0r commented 2 years ago

the logger that output to terminal can be controlled with --log but logger that output to trials/log/<environtment-id>.engine.log can't be controlled with --log, I run the engine with sudo python3 engine.py --server-port 80,443 --environment-id cincin28 --strategy "[TCP:flags:PA]-fragment{tcp:8:True}(,fragment{tcp:4:True})-|" --log info --no-save-packets which output nothing to the terminal but output something like this file to trials/log/cincin28.engine.log regardless of --log level parameter cincin28.engine_info.log