Name of the user under which the synchronization is run is not provided, as it is automatically inserted into the log message by JIRA.
There is a bunch of helper methods to pretty-print the user under which the synchronizer runs ( {@link #username()}), produce warnings about typical {@link StructureException StructureExceptions} that may be encountered by synchronizers ({@link #warnStructureException(com.almworks.jira.structure.api.StructureException)}), and select messages based on the synchronization mode ( {@link #selectBySyncMode(Object,Object,Object)}).
All logging methods that take {@code Object...} vararg parameter delimit its contents putting a single space before the parameter. If the parameter is a character or a single-character String that is a punctuation mark, the space is not inserted before the parameter. If the parameter is an {@code Object[]}, its contents are added to the output as if they belonged to the original {@code Object...} parameter.
Example:
{@code} SyncLogger log = ... ; log.warn("cannot run because of", isKaboozle() ? "kaboozle" : new Object[]"grumbles with error", getError()}, ':', getCause())}
will produce the following log message:
{@code
Methods that end with {@code exceptionIfDebug} attempt to log exception stack trace if log level is DEBUG or lower and print only exception message if log level is higher.
@see com.almworks.jira.structure.api.sync.StructureSynchronizer @since 7.2.0 (Structure 2.0)
|
|
|
|