comet.logger¶
Like the CScript class, the logger module provides advanced logging functionality during script execution.
Methods¶
- comet.logger.log(message, category='', logLevel=300)¶
Print a log message with the given priority to the logger specified by category.
A suitable configuration must exist for this category or any of it’s ancestors, otherwise nothing is printed (see general configuration hints for this module above).
If category is empty, the standard category (e.g. com.priint.indesigncc2020.comet) is used.
- Parameters:
- Return type:
None
- Raises:
TypeError – When parameter types are invalid
ValueError – When parameter logLevel has invalid value
- Available:
InDesign® comet_pdf® Illustrator®
- CScript:
- comet.logger.error(message, category='')¶
Print a log message with the priority error to the logger specified by category.
- Parameters:
- Return type:
None
- Raises:
TypeError – When parameter types are invalid
- Available:
InDesign® comet_pdf® Illustrator®
- CScript:
- comet.logger.warning(message, category='')¶
Print a log message with the priority warning to the logger specified by category.
- Parameters:
- Return type:
None
- Raises:
TypeError – When parameter types are invalid
- Available:
InDesign® comet_pdf® Illustrator®
- CScript:
- comet.logger.info(message, category='')¶
Print a log message with the priority info to the logger specified by category.
- Parameters:
- Return type:
None
- Raises:
TypeError – When parameter types are invalid
- Available:
InDesign® comet_pdf® Illustrator®
- CScript:
- comet.logger.debug(message, category='')¶
Print a log message with the priority debug to the logger specified by category.
- Parameters:
- Return type:
None
- Raises:
TypeError – When parameter types are invalid
- Available:
InDesign® comet_pdf® Illustrator®
- CScript:
- comet.logger.trace(message, category='')¶
Print a log message with the priority trace to the logger specified by category.
- Parameters:
- Return type:
None
- Raises:
TypeError – When parameter types are invalid
- Available:
InDesign® comet_pdf® Illustrator®
- CScript:
- comet.logger.getPattern(category)¶
Get the pattern of a category.
The category or any of it’s ancestors must be configured in the log.xml file
- comet.logger.setPattern(category, pattern)¶
Set the pattern of a category.
The category or any of it’s ancestors must be configured in the log.xml file
- Parameters:
- Return type:
None
- Raises:
TypeError – When parameter types are invalid
- Available:
InDesign® comet_pdf® Illustrator®
- CScript:
- comet.logger.getEscaping(category)¶
Get the escaping of a category.
The category or any of it’s ancestors must be configured in the log.xml file
- comet.logger.setEscaping(category, escaping)¶
Set the escaping of a category.
The category or any of it’s ancestors must be configured in the log.xml file
- Parameters:
- Return type:
None
- Raises:
TypeError – When parameter types are invalid
- Available:
InDesign® comet_pdf® Illustrator®
- CScript:
- comet.logger.getPath(category)¶
Get the log path of a category.
The category or any of it’s ancestors must be configured in the log.xml file
- comet.logger.setPath(category, path)¶
Set the log path of a category.
The category or any of it’s ancestors must be configured in the log.xml file
- Parameters:
- Return type:
None
- Raises:
TypeError – When parameter types are invalid
- Available:
InDesign® comet_pdf® Illustrator®
- CScript:
- comet.logger.getLevel(category)¶
Get the log level of a category.
The category or any of it’s ancestors must be configured in the log.xml file
- comet.logger.setLevel(category, level)¶
Set the log level of a category.
The category or any of it’s ancestors must be configured in the log.xml file
- Parameters:
- Return type:
None
- Raises:
TypeError – When parameter types are invalid
ValueError – When parameter level has invalid value
- Available:
InDesign® comet_pdf® Illustrator®
- CScript:
- comet.logger.reloadConfig()¶
Reload all configurations from log.xml
- Return type:
None
- Available:
InDesign® comet_pdf® Illustrator®