Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mention cal_logs in docs #9257

Merged
merged 3 commits into from
Mar 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/9257.docs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add cal_logs documentation.
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ is also available on `JDox <https://jwst-docs.stsci.edu>`__.
jwst/user_documentation/running_pipeline_command_line.rst
jwst/user_documentation/available_pipelines.rst
jwst/user_documentation/input_output_file_conventions.rst
jwst/user_documentation/logging_configuration.rst
jwst/user_documentation/logging.rst
jwst/user_documentation/datamodels.rst
jwst/user_documentation/pub_deprecation.rst
jwst/user_documentation/more_information.rst
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@
=====================
Logging Configuration
=====================
.. _logging:

=======
Logging
=======

.. _cal_logs:

DataModel cal_logs
==================

Saved files that contain :ref:`jwst-data-models` will contain log messages
from the run that produced the file. These are stored in the ASDF portion
of the file and can be inspected by opening the file as a
:ref:`jwst-data-models`.

The ``cal_logs`` attribute contains log messages as lists of strings
organized by step or pipeline name. For example to see log messages from
:ref:`calwebb_detector1`:

::

import stdatamodels.jwst.datamodels as dm
model = dm.open("jw00001001001_01101_00001_mirimage_cal.fits")
print(model.cal_logs.calwebb_detector1)

Files processed by a pipeline will contain all logs messages for that
run under the pipeline name (and not contain ``cal_logs`` for individual
steps that were part of the pipeline).

Log messages that contain sensitive information (user, hostname, paths,
IP addresses) are replaced with empty strings. Please see the console
logs for those messages.

Configuration
=============

The name of a file in which to save log information, as well as the desired
level of logging messages, can be specified in an optional configuration file.
Expand Down