Logging

The following functions are provided for logging and end user notification.

LogMessageT()

Log a message that has occurred in the module, at a certain level. For example, Info, Warning, Error.

This usually logs to the log file and the stdout of the process.

Available To

PreJob

PrepareJob

PerformJob

CleanUpJob

PreJob:

C++
LogMessageT(PreJobInfoT *JobInfo, LogMessageLevelE level, const char *Message) 

PrepareJob, PerformJob or CleanUpJob:

C++
LogMessageT(JobInfoT *JobInfo, LogMessageLevelE level, const char *Message)


Arguments


JobInfo

Information about the current job.

level

The information level:

  • LOG_LEVEL_ERROR

  • LOG_LEVEL_WARN

  • LOG_LEVEL_INFO

  • LOG_LEVEL_DEBUG

  • LOG_LEVEL_TRACE

Message

The message to log.


IsLoggingEnabledForT()

Check if logging is enabled at the specified logging level.

You can use this to conditionally avoid doing expensive debug operations or to log to a separate location (use LogMessageT for normal cases).

Available To

PreJob

PrepareJob

PerformJob

CleanUpJob

PreJob:

C++
IsLoggingEnabledForT(PreJobInfoT *JobInfo, LogMessageLevelE level) 

PrepareJob, PerformJob or CleanUpJob:

C++
IsLoggingEnabledForT(JobInfoT *JobInfo, LogMessageLevelE level)


Arguments


level

The logging level:

  • LOG_LEVEL_ERROR

  • LOG_LEVEL_WARN

  • LOG_LEVEL_INFO

  • LOG_LEVEL_DEBUG

  • LOG_LEVEL_TRACE


Returns


1

Logging at the specified level is enabled.

0

Logging is not enabled at this level.


GetLogOutputLocationT()

Get the output location for logging.

This can be useful if you want to write other output to a separate file (use LogMessageT for normal cases).

Available To

PreJob

PrepareJob

PerformJob

CleanUpJob

PreJob:

C++
GetLogOutputLocationT(PreJobInfoT *JobInfo) 

PrepareJob, PerformJob or CleanUpJob:

C++
GetLogOutputLocationT(JobInfoT *JobInfo)


Arguments


JobInfo

Input

Information about the current job.


Returns


const char*

The location of the path.

NULL

If there is no location.


SendUserMessageT()

Send a message to the user whose job is being processed by this module.

These messages can be displayed in the SuperSTAR client applications.

Available To

PreJob

PrepareJob

PerformJob

CleanUpJob

PreJob:

C++
SendUserMessageT(PreJobInfoT *JobInfo, UserMessageLevelE level, const char *Message) 

PrepareJob, PerformJob or CleanUpJob:

C++
SendUserMessageT(JobInfoT *JobInfo, UserMessageLevelE level, const char *Message)


Arguments


JobInfo

Information about the current job.

level

The information level:

  • LEVEL_ERROR

  • LEVEL_WARN

  • LEVEL_INFO

Message

The user message.


Returns


1

Success.

0

Failed.


SendUserUnicodeMessageT()

Send a message to the user whose job is being processed by this module.

These messages can be displayed in the SuperSTAR client applications.

Available To

PrepareJob

PerformJob

CleanUpJob


C++
SendUserUnicodeMessageT(JobInfoT *JobInfo, UserMessageLevelE level, const wchar_t *Message)


Arguments


JobInfo

Information about the current job.

level

The information level:

  • LEVEL_ERROR

  • LEVEL_WARN

  • LEVEL_INFO

Message

The user message.


Returns


1

Success.

0

Failed.