yacreader icon indicating copy to clipboard operation
yacreader copied to clipboard

fix(): recurring log if container is used with a liveness probe

Open davinkevin opened this issue 6 months ago • 2 comments

Hello,

I just installed the yacreaderlibrary:9.15.0 container in a k8s cluster, and discovered if I have a liveness probe on /, I have a log entry like this every 10 seconds (default value for the probe).

WARN  2025-06-22T16:17:39.695 QObject: Cannot create children for a parent that is in a different thread.
(Parent is RequestMapper(0x55a65a9548e0), parent's thread is QThread(0x55a65a94f4c0), current thread is QThread(0x55a65a955870)

It has the disadvantage to bloat the output and the log file created by yacreaderlibrary.

Is there a way to remove/fix this warning message? Is it possible to prevent any log storage on the FS, in container world it's some kind of anti-pattern, everything should be gathered from stdout/stderr.

Thank you 😇

davinkevin avatar Jun 22 '25 16:06 davinkevin

You can use the --loglevel setting to control the log, use --loglevel error and you should be fine.

λ YACReaderLibraryServer
Usage: YACReaderLibraryServer [options] command

YACReaderLibraryServer is the headless (no gui) version of YACReaderLibrary.

This appplication supports persistent settings, to set them up edit this file C:/Users/luisa/AppData/Local/YACReader/YACReaderLibrary/YACReaderLibrary.ini
To learn about the available settings please check the documentation at https://raw.githubusercontent.com/YACReader/yacreader/develop/YACReaderLibraryServer/SETTINGS_README.md

Options:
  -?, -h, --help         Displays help on commandline options.
  --help-all             Displays help including Qt specific options.
  -v, --version          Displays version information.
  --loglevel <loglevel>  Set log level. Valid values: trace, info, debug, warn,
                         error.
  --port <port>          Set server port (temporary). Valid values: 1-65535
  --system-info          Prints detailed information about the system
                         environment, including OS version, hardware
                         specifications, and available resources.

Arguments:
  command                The command to execute. [start, create-library,
                         update-library, add-library, remove-library,
                         list-libraries, set-port, rescan-xml-info]

luisangelsm avatar Jun 22 '25 17:06 luisangelsm

For that, I must change the default entrypoint defined in the container, is this what you recommend?

Because of this s6 system, it's not a trivial task and one of the simplest solution could be to rebuild the image or replace the file used by the overlay using a ConfigMap (aka mount in docker world) 🫠:

Image

I think I will do the second but it's not user or ops friendly at all… but it's s6, it's more than expected 🤷‍♂️.

davinkevin avatar Jun 22 '25 19:06 davinkevin