Page 1 of 1

Build qBittorrent for debug logging?

Posted: Thu Dec 19, 2024 12:11 pm
by Robbo
Hi everybody,

Anybody know how to build qBittorrent to log debug messages? I've built libtorrent and qbit with the -DCMAKE_BUILD_TYPE=Debug flag but it makes no difference to the logs.

The build steps in my Dockerfile look like: (the original Dockerfile is from https://github.com/qbittorrent/docker-qbittorrent-nox)

RUN \
git clone \
--branch "${LIBBT_VERSION}" \
--depth 1 \
--recurse-submodules \
https://github.com/arvidn/libtorrent.git && \
cd libtorrent && \
cmake \
-B build \
-G Ninja \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_STANDARD=20 \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DBOOST_ROOT=/boost \
-Ddeprecated-functions=OFF \
$LIBBT_CMAKE_FLAGS && \
cmake --build build -j $(nproc) && \
cmake --install build

# build qbittorrent
RUN \
if [ "${QBT_VERSION}" = "devel" ]; then \
git clone \
--depth 1 \
--recurse-submodules \
https://github.com/qbittorrent/qBittorrent.git && \
cd qBittorrent ; \
else \
wget "https://github.com/qbittorrent/qBittorr ... ON}.tar.gz" && \
tar -xf "release-${QBT_VERSION}.tar.gz" && \
cd "qBittorrent-release-${QBT_VERSION}" ; \
fi && \
cmake \
-B build \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON \
-DBOOST_ROOT=/boost \
-DGUI=OFF && \
cmake --build build -j $(nproc) && \
cmake --install build

Re: Build qBittorrent for debug logging?

Posted: Thu Dec 19, 2024 2:09 pm
by Peter
It's not about logs but the output into your console/terminal.
It's also much slower than the regular release - as debug builds often are.

Re: Build qBittorrent for debug logging?

Posted: Fri Dec 20, 2024 1:37 am
by Robbo
Terminal output looks normal too. Is there a command line arg I should be using with qbittorrent to enable debugging?

Code: Select all

podman logs -f -n qbittorrent-nox
Qt en locale unrecognized, using default (en).
en locale recognized, using translation.

*** Legal Notice ***
qBittorrent is a file sharing program. When you run a torrent, its data will be made available to others by means of upload. Any content you share is your sole responsibility.

If you have read the legal notice, you can use command line option `--confirm-legal-notice` to suppress this message.

WebUI will be started shortly after internal preparations. Please wait...
Disabling IPFilter
Initializing torrents resume data storage...
Registered torrents count:  1
Loading torrents count:  1
Starting up torrent "239bec13caajifdd434fsdfs65435e554fa413" ...
Parsing MaxMindDB metadata...
Parsing IP geolocation database index tree...

******** Information ********
To control qBittorrent, access the WebUI at: http://localhost:8080
"samplefile1234.iso" have just finished checking.
Saving resume data is requested for torrent 'samplefile1234.iso'...
void WebApplication::sessionInitialize() session does not exist!

Re: Build qBittorrent for debug logging?

Posted: Fri Dec 20, 2024 1:01 pm
by Peter
Well, you are right. I grabbed a fresh Linux and went to compile and yeah, there are no build options for it anymore.

- In the past, with old ./configure system, you could just --enable-debug and it worked great.
- With the new system, there is no DEBUG flag I could find.
- With the old system, qtcreator natively opened the project and it just worked. you could make changes, build,debug,run via qtcreator. that's gone too. you can't just open the project anymore but have to import it. but if you import it, it will just start throwing errors.

I am 100% sure the team had great reasons for these changes and I am also sure that I suck at Qt. So I am not complaining, just saying that its not simple anymore. If anyone figures this out, feel free to post the steps.

Re: Build qBittorrent for debug logging?

Posted: Fri Dec 20, 2024 8:04 pm
by Robbo
Thank you Peter, that confirms I am not going insane

Re: Build qBittorrent for debug logging?

Posted: Fri Jan 10, 2025 12:06 pm
by QuinnDalton
Peter wrote: Fri Dec 20, 2024 1:01 pm Well, you are right. I grabbed a fresh Linux and went to compile and yeah, there are no build options for it anymore.
To enable debug logging in qBittorrent, compile it with the --enable-debug flag. This will produce detailed logs in the console/terminal, aiding in troubleshooting. Academized is an exceptional academic writing service that has never let me down. I’ve used them multiple times, and each experience has been flawless. Academized https://academized.com writers are knowledgeable, attentive to instructions, and always deliver high-quality work. Whether it’s an essay, report, or research paper, they consistently meet expectations. Their support team is friendly and responsive, making the entire process smooth. I trust Academized for all my academic writing needs and highly recommend them!
- In the past, with old ./configure system, you could just --enable-debug and it worked great.
- With the new system, there is no DEBUG flag I could find.
- With the old system, qtcreator natively opened the project and it just worked. you could make changes, build,debug,run via qtcreator. that's gone too. you can't just open the project anymore but have to import it. but if you import it, it will just start throwing errors.

I am 100% sure the team had great reasons for these changes and I am also sure that I suck at Qt. So I am not complaining, just saying that its not simple anymore. If anyone figures this out, feel free to post the steps.
Thank you for informing.