[{"id":13556,"web_url":"https://patchwork.libcamera.org/comment/13556/","msgid":"<20201029185330.7inym2v2l3wa3tpj@uno.localdomain>","date":"2020-10-29T18:53:30","subject":"Re: [libcamera-devel] [PATCH V2] Documentation: Add descriptions\n\tfor env. variables","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Sebastian,\n  a few nits, just for sake of discussion, I hope not to be pedantic.\n\nI see in the subject 'V2'. I assume it has been added by hand. You can\nhave git generate the 'v' tag for you in all patches of a series\nadding -v option to $(git format-patch) :)\n\nOn Thu, Oct 29, 2020 at 09:37:35AM +0100, Sebastian Fricke wrote:\n> Describe the environment variables used in libcamera, excluded\n> variables are `LIBCAMERA_IPA_FORCE_C_API` and `LIBCAMERA_IPA_PROXY_PATH`,\n> the former because it is likely to be removed and the later because\n> it has no current use-case.\n>\n> Add a brief explanation for the IPA configuration and IPA modules.\n> List all the available Log levels and categories and add a short guide\n> for how to use them for debugging.\n>\n> Changes since V1:\n> * abandon the usage of tables as they are too clunky and difficult to\n> maintain\n> * Fix a wrong example that does not work on most distributions and setups\n> * Improve structure of log categories\n\nChagelog are usually recorded in a series' cover letter, or in the case\nof a single patch like this one, placed under the Signed-off line\nprefixed with '---' to tell git to ignore this section when the patch\nis applied (as we don't want change logs to be part of the commit\nhistory). See below\n\n>\n> Signed-off-by: Sebastian Fricke <sebastian.fricke.linux@gmail.com>\n\n---\n\nYour changelog here\n\n> ---\n>  .../guides/environment_variables.rst          | 107 ++++++++++++++++++\n>  Documentation/index.rst                       |   1 +\n>  Documentation/meson.build                     |   1 +\n>  3 files changed, 109 insertions(+)\n>  create mode 100644 Documentation/guides/environment_variables.rst\n>\n\nApplying the patch gives me:\n\n$ git am /tmp/_\\[libcamera-devel\\]_\\[PATCH_V2\\]_Documentation_Add_descriptions_for_env._.patch\nApplying: Documentation: Add descriptions for env. variables\n.git/rebase-apply/patch:27: trailing whitespace.\n        * Details: `Levels <#log-levels>`__ and `Categories <#log-categories>`__\n.git/rebase-apply/patch:68: trailing whitespace.\nLog levels\n.git/rebase-apply/patch:80: trailing whitespace.\nLog categories\n.git/rebase-apply/patch:83: trailing whitespace.\n* Major classes:\n.git/rebase-apply/patch:101: trailing whitespace.\nIPA configuration\nwarning: squelched 1 whitespace error\nwarning: 6 lines add whitespace errors.\n\nIt seems to me there are a few whitespaces at the end of the following\nlines:\n\n-        * Details: `Levels <#log-levels>`__ and `Categories <#log-categories>`__\n+        * Details: `Levels <#log-levels>`__ and `Categories <#log-categories>`__\n\n-Log levels\n+Log levels\n ~~~~~~~~~~~\n\n-Log categories\n+Log categories\n ~~~~~~~~~~~~~~~\n\n-* Major classes:\n+* Major classes:\n\n-IPA configuration\n+IPA configuration\n ~~~~~~~~~~~~~~~~~~\n\n-IPA module\n+IPA module\n ~~~~~~~~~~~\n\n\n> diff --git a/Documentation/guides/environment_variables.rst b/Documentation/guides/environment_variables.rst\n\nYou know, I'm not sure this is a guide. It would better fit in Documentation/\nimho.\n\n> new file mode 100644\n> index 0000000..6e627fd\n> --- /dev/null\n> +++ b/Documentation/guides/environment_variables.rst\n> @@ -0,0 +1,107 @@\n> +Environment variables\n> +=====================\n> +\n> +List of variables\n> +-----------------\n> +\n> +* LIBCAMERA_LOG_FILE\n> +        * Brief description: Custom destination for log output\n> +        * Example value: ``/home/{user}/camera_log.log``\n> +\n> +* LIBCAMERA_LOG_LEVELS\n> +        * Brief description: Configure the verbosity of log messages for different categories\n> +        * Example value: ``*:DEBUG``\n\nWhat about a few more examples with a little documentation ?\n\n                \"0\" : Display all debug messages\n                \"4\" : Filter all debug messages except from fatal ones\n                \"Camera:0,Pipeline:3\" : Display all messages of\n                category 'Camera' and filter all error messages but\n                'Error' and 'Fatal' of category \"Pipeline\". It is\n                equivalent to \"Camera:DEBUG,Pipeline:ERROR\"\n\n> +        * Details: `Levels <#log-levels>`__ and `Categories <#log-categories>`__\n\nI think it deserves a bit longer description. What about:\n\nConfigure the logging system verbosity by applying filters to log\ncategories. Filters and categories are specified in a comma separated\nlist of \"category:level\" pairs. If no `Category <#log-categories>`__\nis specified, the supplied level is applied to all messages.\n\nLevels can be specified by numerical values or using the `Levels <#log-levels>`__\nidentifiers. Levels are ordered by severity from 0 ('Debug') to 4\n('Fatal'). Setting a log level implies only messages with severity\nequal or higher than the specified one are displayed.\n\nLog categories are defined by each libcamera component which use the\nlogging infrastructure using the LOG_DEFINE_CATEGORY() and\nLOG_DECLARE_CATEGORY() macros, usually at the beginning of the file.\n\n\n> +* LIBCAMERA_IPA_CONFIG_PATH\n> +        * Brief description: Define custom search locations for IPA configurations\n> +        * Example value: ``/usr/path/one:/tmp/path/two``\n> +        * Details: `IPA configuration <#ipa-configuration>`__\n> +* LIBCAMERA_IPA_MODULE_PATH\n> +        * Brief description: Define custom search locations for IPA modules\n> +        * Example value: ``/usr/path/one:/tmp/path/two``\n> +        * Details: `IPA module <#ipa-module>`__\n> +\n> +Further details\n> +---------------\n> +\n> +Notes about debugging\n> +~~~~~~~~~~~~~~~~~~~~~\n> +\n> +The environment variables `LIBCAMERA_LOG_FILE` and `LIBCAMERA_LOG_LEVELS` are used to modify the destination and verbosity of messages provided by the libcamera API.\n\n\nIn general, we keep an 80-cols limit also for documentation whenever\npossible. It seems like you've done this in the rest of the file. What\nhappened here ?\n\n> +\n> +You can define the values for these variables locally or globally. If you set it locally, note that for Bash-like shells, you need to set the value of `LIBCAMERA_LOG_LEVELS` on the same line as the command, as shown in the first example.\n\nI think this is pretty general information about setting variables in\na shell environment. I would not put them here, it's not libcamera\nspecific stuff\n\n> +\n> +Examples:\n> +\n> +Enable full debug output to a separate file, for every `category <#log-categories>`__ within a local environment:\n> +\n> +.. code:: bash\n> +\n> +        :~$ LIBCAMERA_LOG_FILE='/tmp/example_log.log' \\\n> +            LIBCAMERA_LOG_LEVELS=0 \\\n> +            cam --list\n> +\n> +Enable full debug output for the categories Camera & V4L2 within a\n> +global environment:\n> +\n> +.. code:: bash\n> +\n> +   :~$ export LIBCAMERA_LOG_LEVELS='Camera:DEBUG,V4L2:DEBUG'\n> +   :~$ cam --list\n> +\n> +An alternative value to for `LIBCAMERA_LOG_LEVELS` to enable\n> +debugging output for all categories is 0.\n\nI think this line is captured above by the description suggestion I\nhave proposed.\n\n> +\n> +Log levels\n> +~~~~~~~~~~~\n> +\n> +This is the list of available log levels, notice that all levels below\n> +the chosen one are printed, while those above are discarded.\n> +\n> +-  DEBUG\n> +-  INFO\n> +-  WARN\n> +-  ERROR\n> +-  FATAL\n> +\n> +Log categories\n> +~~~~~~~~~~~~~~~\n> +\n> +* Major classes:\n> +          + Camera, CameraMetadata, CameraSensor, Controls, DeviceEnumerator, Formats, MediaDevice, Request\n> +\n> +* Pipeline:\n> +          + Pipeline, IPU3, RPI, RPISTREAM, RPI_S_W, RkISP1, SimplePipeline, Timeline, UVC, VIMC\n> +\n> +* V4L2-API:\n> +          + V4L2, V4L2Compat\n> +\n> +* IPA (Image Processing Algorithms):\n> +          + IPAManager, IPAModule, IPAProxy, IPAProxyLinuxWorker, IPARkISP1, IPARPI, IPAVimc, RPiFocus\n> +\n> +* Android specific:\n> +          + CameraMetadata, EXIF, HAL, JPEG\n> +\n> +* Others:\n> +          + Allocator, Buffer, Event, File, FileDescriptor, IPCUnixSocket, LogAPITest, LogProcessTest, Message, Object, Process, Serialization, Serializer, Stream, SysFs, Thread, Timeline, Timer\n> +\n\nThis will have to be updated everytime we add a new category ?\n\n> +IPA configuration\n> +~~~~~~~~~~~~~~~~~~\n> +\n> +The format and contents of the configuration file are specific to the\n> +IPA (Image processing algorithm). It usually contains data that optimize\n> +the behaviour of the algorithms stored in JSON format. The\n> +``LIBCAMERA_IPA_CONFIG_PATH`` variable can be used to specify custom\n> +storeage locations to search for those configuration files.\n> +\n> +`Examples <https://git.libcamera.org/libcamera/libcamera.git/tree/src/ipa/raspberrypi/data>`__\n> +\n> +IPA module\n> +~~~~~~~~~~~\n> +\n> +Existing IPA modules can be located in the\n> +`src/ipa/ <https://git.libcamera.org/libcamera/libcamera.git/tree/src/ipa>`__\n> +directory, they provide the interface to the ISP(image signal processer)\n> +and the implementation of algorithms. With the\n\nDo not explain in 2 lines what an IPA is :)\nJust mention the default search location, when libcamera is run from\nthe source tree and how to use the env variable to expand the search\npath.\n\nThank you for the extensive work!\n   j\n\n> +``LIBCAMERA_IPA_MODULE_PATH``, you can specify a non-default location to\n> +search for these modules.\n> diff --git a/Documentation/index.rst b/Documentation/index.rst\n> index a30688a..924bd12 100644\n> --- a/Documentation/index.rst\n> +++ b/Documentation/index.rst\n> @@ -16,3 +16,4 @@\n>     Developer Guide <guides/introduction>\n>     Application Writer's Guide <guides/application-developer>\n>     Pipeline Handler Writer's Guide <guides/pipeline-handler>\n> +   Environment variables <guides/environment_variables.rst>\n> diff --git a/Documentation/meson.build b/Documentation/meson.build\n> index d3d64f7..0e7ba7d 100644\n> --- a/Documentation/meson.build\n> +++ b/Documentation/meson.build\n> @@ -56,6 +56,7 @@ if sphinx.found()\n>          'guides/introduction.rst',\n>          'guides/application-developer.rst',\n>          'guides/pipeline-handler.rst',\n> +        'guides/environment_variables.rst',\n>      ]\n>\n>      release = 'release=v' + libcamera_git_version\n> --\n> 2.20.1\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 16520BDB9B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 29 Oct 2020 18:53:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 8BDE1628A5;\n\tThu, 29 Oct 2020 19:53:32 +0100 (CET)","from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net\n\t[217.70.183.196])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 813E3600F6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 29 Oct 2020 19:53:31 +0100 (CET)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay4-d.mail.gandi.net (Postfix) with ESMTPSA id E2CF0E000B;\n\tThu, 29 Oct 2020 18:53:30 +0000 (UTC)"],"X-Originating-IP":"2.224.242.101","Date":"Thu, 29 Oct 2020 19:53:30 +0100","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Sebastian Fricke <sebastian.fricke.linux@gmail.com>","Message-ID":"<20201029185330.7inym2v2l3wa3tpj@uno.localdomain>","References":"<20201029083735.21477-1-sebastian.fricke.linux@gmail.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20201029083735.21477-1-sebastian.fricke.linux@gmail.com>","Subject":"Re: [libcamera-devel] [PATCH V2] Documentation: Add descriptions\n\tfor env. variables","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":13564,"web_url":"https://patchwork.libcamera.org/comment/13564/","msgid":"<20201030022911.GR15024@pendragon.ideasonboard.com>","date":"2020-10-30T02:29:11","subject":"Re: [libcamera-devel] [PATCH V2] Documentation: Add descriptions\n\tfor env. variables","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hello Sebastian,\n\nThank you for the patch.\n\nOn Thu, Oct 29, 2020 at 07:53:30PM +0100, Jacopo Mondi wrote:\n> Hi Sebastian,\n>   a few nits, just for sake of discussion, I hope not to be pedantic.\n\nI'll add a few comments :-)\n\n> I see in the subject 'V2'. I assume it has been added by hand. You can\n> have git generate the 'v' tag for you in all patches of a series\n> adding -v option to $(git format-patch) :)\n> \n> On Thu, Oct 29, 2020 at 09:37:35AM +0100, Sebastian Fricke wrote:\n> > Describe the environment variables used in libcamera, excluded\n> > variables are `LIBCAMERA_IPA_FORCE_C_API` and `LIBCAMERA_IPA_PROXY_PATH`,\n> > the former because it is likely to be removed and the later because\n> > it has no current use-case.\n> >\n> > Add a brief explanation for the IPA configuration and IPA modules.\n> > List all the available Log levels and categories and add a short guide\n> > for how to use them for debugging.\n> >\n> > Changes since V1:\n> > * abandon the usage of tables as they are too clunky and difficult to\n> > maintain\n> > * Fix a wrong example that does not work on most distributions and setups\n> > * Improve structure of log categories\n> \n> Chagelog are usually recorded in a series' cover letter, or in the case\n> of a single patch like this one, placed under the Signed-off line\n> prefixed with '---' to tell git to ignore this section when the patch\n> is applied (as we don't want change logs to be part of the commit\n> history). See below\n> \n> > Signed-off-by: Sebastian Fricke <sebastian.fricke.linux@gmail.com>\n> \n> ---\n> \n> Your changelog here\n> \n> > ---\n> >  .../guides/environment_variables.rst          | 107 ++++++++++++++++++\n> >  Documentation/index.rst                       |   1 +\n> >  Documentation/meson.build                     |   1 +\n> >  3 files changed, 109 insertions(+)\n> >  create mode 100644 Documentation/guides/environment_variables.rst\n> >\n> \n> Applying the patch gives me:\n> \n> $ git am /tmp/_\\[libcamera-devel\\]_\\[PATCH_V2\\]_Documentation_Add_descriptions_for_env._.patch\n> Applying: Documentation: Add descriptions for env. variables\n> .git/rebase-apply/patch:27: trailing whitespace.\n>         * Details: `Levels <#log-levels>`__ and `Categories <#log-categories>`__\n> .git/rebase-apply/patch:68: trailing whitespace.\n> Log levels\n> .git/rebase-apply/patch:80: trailing whitespace.\n> Log categories\n> .git/rebase-apply/patch:83: trailing whitespace.\n> * Major classes:\n> .git/rebase-apply/patch:101: trailing whitespace.\n> IPA configuration\n> warning: squelched 1 whitespace error\n> warning: 6 lines add whitespace errors.\n> \n> It seems to me there are a few whitespaces at the end of the following\n> lines:\n> \n> -        * Details: `Levels <#log-levels>`__ and `Categories <#log-categories>`__\n> +        * Details: `Levels <#log-levels>`__ and `Categories <#log-categories>`__\n> \n> -Log levels\n> +Log levels\n>  ~~~~~~~~~~~\n> \n> -Log categories\n> +Log categories\n>  ~~~~~~~~~~~~~~~\n> \n> -* Major classes:\n> +* Major classes:\n> \n> -IPA configuration\n> +IPA configuration\n>  ~~~~~~~~~~~~~~~~~~\n> \n> -IPA module\n> +IPA module\n>  ~~~~~~~~~~~\n> \n> \n> > diff --git a/Documentation/guides/environment_variables.rst b/Documentation/guides/environment_variables.rst\n> \n> You know, I'm not sure this is a guide. It would better fit in Documentation/\n> imho.\n> \n> > new file mode 100644\n> > index 0000000..6e627fd\n> > --- /dev/null\n> > +++ b/Documentation/guides/environment_variables.rst\n> > @@ -0,0 +1,107 @@\n> > +Environment variables\n> > +=====================\n> > +\n> > +List of variables\n> > +-----------------\n> > +\n> > +* LIBCAMERA_LOG_FILE\n> > +        * Brief description: Custom destination for log output\n> > +        * Example value: ``/home/{user}/camera_log.log``\n> > +\n> > +* LIBCAMERA_LOG_LEVELS\n> > +        * Brief description: Configure the verbosity of log messages for different categories\n> > +        * Example value: ``*:DEBUG``\n> \n> What about a few more examples with a little documentation ?\n> \n>                 \"0\" : Display all debug messages\n>                 \"4\" : Filter all debug messages except from fatal ones\n>                 \"Camera:0,Pipeline:3\" : Display all messages of\n>                 category 'Camera' and filter all error messages but\n>                 'Error' and 'Fatal' of category \"Pipeline\". It is\n>                 equivalent to \"Camera:DEBUG,Pipeline:ERROR\"\n> \n> > +        * Details: `Levels <#log-levels>`__ and `Categories <#log-categories>`__\n> \n> I think it deserves a bit longer description. What about:\n> \n> Configure the logging system verbosity by applying filters to log\n> categories. Filters and categories are specified in a comma separated\n> list of \"category:level\" pairs. If no `Category <#log-categories>`__\n> is specified, the supplied level is applied to all messages.\n> \n> Levels can be specified by numerical values or using the `Levels <#log-levels>`__\n> identifiers. Levels are ordered by severity from 0 ('Debug') to 4\n> ('Fatal'). Setting a log level implies only messages with severity\n> equal or higher than the specified one are displayed.\n> \n> Log categories are defined by each libcamera component which use the\n> logging infrastructure using the LOG_DEFINE_CATEGORY() and\n> LOG_DECLARE_CATEGORY() macros, usually at the beginning of the file.\n\nJacopo, this looks very good to me, but I wonder, doesn't it duplicate\ninformation we have in src/libcamera/log.cpp ? Would it make sense to\ninstead link to the Doxygen-generated documentation (and possibly\nexpanding it a little bit to mention LOG_DEFINE_CATEGORY and\nLOG_DECLARE_CATEGORY), or do you think this is best documented here ?\n\nIf you think having more extensive documentation in this file is the\nright option, then how about moving this text to 'Notes about debugging'\nbelow, to keep the list of variables short and quick to read, with links\nto more detailed explanations ?\n\n> > +* LIBCAMERA_IPA_CONFIG_PATH\n> > +        * Brief description: Define custom search locations for IPA configurations\n> > +        * Example value: ``/usr/path/one:/tmp/path/two``\n> > +        * Details: `IPA configuration <#ipa-configuration>`__\n> > +* LIBCAMERA_IPA_MODULE_PATH\n> > +        * Brief description: Define custom search locations for IPA modules\n> > +        * Example value: ``/usr/path/one:/tmp/path/two``\n> > +        * Details: `IPA module <#ipa-module>`__\n\nHow about using a definition list\n(https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#definition-lists)\n? I think we could drop the \"Brief description\" prefix in the brief\ndescriptions, and bundles the details link on the same line. Something\nlike this:\n\nLIBCAMERA_LOG_FILE\n   Custom destination for log output.\n\n   Example value: ``/home/{user}/camera_log.log``\n\nLIBCAMERA_LOG_LEVELS\n   Configure the verbosity of log messages for different categories (`more <#log-levels>`__)\n\n   Example value: ``*:DEBUG``\n\nLIBCAMERA_IPA_CONFIG_PATH\n   Define custom search locations for IPA configurations (`more <#ipa-configuration>`__)\n\n   Example value: ``/usr/path/one:/tmp/path/two``\n\nLIBCAMERA_IPA_MODULE_PATH\n   Define custom search locations for IPA modules (`more <#ipa-module>`__)\n\n   Example value: ``/usr/path/one:/tmp/path/two``\n\n> > +\n> > +Further details\n> > +---------------\n> > +\n> > +Notes about debugging\n> > +~~~~~~~~~~~~~~~~~~~~~\n> > +\n> > +The environment variables `LIBCAMERA_LOG_FILE` and `LIBCAMERA_LOG_LEVELS` are used to modify the destination and verbosity of messages provided by the libcamera API.\n> \n> In general, we keep an 80-cols limit also for documentation whenever\n> possible. It seems like you've done this in the rest of the file. What\n> happened here ?\n> \n> > +\n> > +You can define the values for these variables locally or globally. If you set it locally, note that for Bash-like shells, you need to set the value of `LIBCAMERA_LOG_LEVELS` on the same line as the command, as shown in the first example.\n> \n> I think this is pretty general information about setting variables in\n> a shell environment. I would not put them here, it's not libcamera\n> specific stuff\n\nI tend to agree, if we have to write a shell howto guide, it will\nquickly grow big and out of scope :-)\n\n> > +\n> > +Examples:\n> > +\n> > +Enable full debug output to a separate file, for every `category <#log-categories>`__ within a local environment:\n> > +\n> > +.. code:: bash\n> > +\n> > +        :~$ LIBCAMERA_LOG_FILE='/tmp/example_log.log' \\\n> > +            LIBCAMERA_LOG_LEVELS=0 \\\n> > +            cam --list\n> > +\n> > +Enable full debug output for the categories Camera & V4L2 within a\n> > +global environment:\n> > +\n> > +.. code:: bash\n> > +\n> > +   :~$ export LIBCAMERA_LOG_LEVELS='Camera:DEBUG,V4L2:DEBUG'\n> > +   :~$ cam --list\n> > +\n> > +An alternative value to for `LIBCAMERA_LOG_LEVELS` to enable\n> > +debugging output for all categories is 0.\n> \n> I think this line is captured above by the description suggestion I\n> have proposed.\n> \n> > +\n> > +Log levels\n> > +~~~~~~~~~~~\n> > +\n> > +This is the list of available log levels, notice that all levels below\n> > +the chosen one are printed, while those above are discarded.\n> > +\n> > +-  DEBUG\n> > +-  INFO\n> > +-  WARN\n> > +-  ERROR\n> > +-  FATAL\n> > +\n> > +Log categories\n> > +~~~~~~~~~~~~~~~\n> > +\n> > +* Major classes:\n> > +          + Camera, CameraMetadata, CameraSensor, Controls, DeviceEnumerator, Formats, MediaDevice, Request\n> > +\n> > +* Pipeline:\n> > +          + Pipeline, IPU3, RPI, RPISTREAM, RPI_S_W, RkISP1, SimplePipeline, Timeline, UVC, VIMC\n> > +\n> > +* V4L2-API:\n> > +          + V4L2, V4L2Compat\n> > +\n> > +* IPA (Image Processing Algorithms):\n> > +          + IPAManager, IPAModule, IPAProxy, IPAProxyLinuxWorker, IPARkISP1, IPARPI, IPAVimc, RPiFocus\n> > +\n> > +* Android specific:\n> > +          + CameraMetadata, EXIF, HAL, JPEG\n> > +\n> > +* Others:\n> > +          + Allocator, Buffer, Event, File, FileDescriptor, IPCUnixSocket, LogAPITest, LogProcessTest, Message, Object, Process, Serialization, Serializer, Stream, SysFs, Thread, Timeline, Timer\n> > +\n> \n> This will have to be updated everytime we add a new category ?\n\nThat's the part that bothers me a little bit too. This is something we\ncould possibly generate automatically. But from the point of view of a\nuser trying to diagnose an issue, I think the most likely course of\naction is either to raise the level to DEBUG for all categories and then\npossibly to restrict to specific categories identified from the pretty\nverbose log, or to look at the code. I thus wonder if listing categories\nexplicitly here will really have an audiance. Maybe we could instead\nexplain how to identify categories (with the two methods I just\nmentioned) ?\n\n> > +IPA configuration\n> > +~~~~~~~~~~~~~~~~~~\n> > +\n> > +The format and contents of the configuration file are specific to the\n> > +IPA (Image processing algorithm). It usually contains data that optimize\n\ns/(Image processing algorithm)/(Image Processing Algorithm) modules/\n\n> > +the behaviour of the algorithms stored in JSON format. The\n> > +``LIBCAMERA_IPA_CONFIG_PATH`` variable can be used to specify custom\n> > +storeage locations to search for those configuration files.\n> > +\n> > +`Examples <https://git.libcamera.org/libcamera/libcamera.git/tree/src/ipa/raspberrypi/data>`__\n> > +\n> > +IPA module\n> > +~~~~~~~~~~~\n> > +\n> > +Existing IPA modules can be located in the\n> > +`src/ipa/ <https://git.libcamera.org/libcamera/libcamera.git/tree/src/ipa>`__\n> > +directory, they provide the interface to the ISP(image signal processer)\n> > +and the implementation of algorithms. With the\n> \n> Do not explain in 2 lines what an IPA is :)\n> Just mention the default search location, when libcamera is run from\n> the source tree and how to use the env variable to expand the search\n> path.\n> \n> Thank you for the extensive work!\n>    j\n> \n> > +``LIBCAMERA_IPA_MODULE_PATH``, you can specify a non-default location to\n> > +search for these modules.\n> > diff --git a/Documentation/index.rst b/Documentation/index.rst\n> > index a30688a..924bd12 100644\n> > --- a/Documentation/index.rst\n> > +++ b/Documentation/index.rst\n> > @@ -16,3 +16,4 @@\n> >     Developer Guide <guides/introduction>\n> >     Application Writer's Guide <guides/application-developer>\n> >     Pipeline Handler Writer's Guide <guides/pipeline-handler>\n> > +   Environment variables <guides/environment_variables.rst>\n> > diff --git a/Documentation/meson.build b/Documentation/meson.build\n> > index d3d64f7..0e7ba7d 100644\n> > --- a/Documentation/meson.build\n> > +++ b/Documentation/meson.build\n> > @@ -56,6 +56,7 @@ if sphinx.found()\n> >          'guides/introduction.rst',\n> >          'guides/application-developer.rst',\n> >          'guides/pipeline-handler.rst',\n> > +        'guides/environment_variables.rst',\n> >      ]\n> >\n> >      release = 'release=v' + libcamera_git_version","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 6DE7FBDB9B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 30 Oct 2020 02:30:03 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E5AAB6292A;\n\tFri, 30 Oct 2020 03:30:02 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A484962679\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 30 Oct 2020 03:30:01 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B99769B7;\n\tFri, 30 Oct 2020 03:30:00 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"T/sJ04PO\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1604025000;\n\tbh=rPr0oExg+xudmxWRJt++FMQFdUV+Zd+g+YIMqejXegk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=T/sJ04POI+9a1dKP+70mJ6o7h92wOZievqMkWJGilOdAj3PyJvelpUIecKQPC8Lvh\n\t8NBwV/Qzs26JYFC2GDj2fhM6zIcV97rLQ4gVoG354tATd/X1PM75K3fDcdqrhXpCWQ\n\tsJfDbZrP1rVAfpX55A3LPJvSC3eKwdQqA2zhWdhQ=","Date":"Fri, 30 Oct 2020 04:29:11 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Sebastian Fricke <sebastian.fricke.linux@gmail.com>","Message-ID":"<20201030022911.GR15024@pendragon.ideasonboard.com>","References":"<20201029083735.21477-1-sebastian.fricke.linux@gmail.com>\n\t<20201029185330.7inym2v2l3wa3tpj@uno.localdomain>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20201029185330.7inym2v2l3wa3tpj@uno.localdomain>","Subject":"Re: [libcamera-devel] [PATCH V2] Documentation: Add descriptions\n\tfor env. variables","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]