colcon/colcon-core

Missing option to specify log path

bi3ri opened this issue · 2 comments

bi3ri commented

Hello!

there are several options to specify base, install, and build path, but for logs it is missing.

colcon build \
      --base-paths ereal_ws/src \
      --install-base ereal_ws/install \
      --build-base ereal_ws/build \
      --log-base ereal_ws/log \

It seems there was a plan to add this feature though, because the command above results in the following output.

usage: colcon [-h] [--log-base LOG_BASE] [--log-level LOG_LEVEL] {build,clean,extension-points,extensions,graph,info,list,metadata,mixin,test,test-result,version-check} ...
colcon: error: unrecognized arguments: --log-base ...

Thanks!
Johannes

Hi, because the log --log-base option affects colcon before it even parses the verb, that particular option needs to be passed before the verb, as it is shown in the example you posted.
This should work how you expect:

colcon --log-base ereal_ws/log build \
      --base-paths ereal_ws/src \
      --install-base ereal_ws/install \
      --build-base ereal_ws/build \
bi3ri commented

Thanks @cottsay!

  --log-base LOG_BASE   The base path for all log directories (default: ./log, to
                        disable: /dev/null)

That option specifies the default log path though. I was searching for an option to define the log path for each build separately.

Okay, I did misunderstand the documentation. The log path is specified for each build separately.