Table of Contents

Class LogMessage

Namespace
ArcanaDevelopment.adTempus.Client
Assembly
ArcanaDevelopment.adTempus.Client.dll

Represents a message logged on the server

public sealed class LogMessage : ADTObject
Inheritance
object
LogMessage

Properties

Acknowledged

Indicates whether the status of this message has been acknowledged

public bool Acknowledged { get; }

Property Value

bool

AcknowledgedByUserName

The user ID of the user who acknowledged the message, if Acknowledged is true.

[RequiredVersion(5, 0, 0, 0)]
public string AcknowledgedByUserName { get; }

Property Value

string

Remarks

This value is only set if the message was acknowledged on server version 5 or later.

AcknowledgedTimestamp

The date/time the message was acknowledged, if Acknowledged is true.

[RequiredVersion(5, 0, 0, 0)]
public DateTimeOffset? AcknowledgedTimestamp { get; }

Property Value

DateTimeOffset?

Remarks

This value is only set if the message was acknowledged on server version 5 or later.

AdditionalData

Additional data associated with the message

public string AdditionalData { get; }

Property Value

string

AgentOID

The OID of the RemoteAgent, if any

public OID AgentOID { get; }

Property Value

OID

ClassID

The Class ID for the object

[IgnoreDataMember]
public override ClassID ClassID { get; }

Property Value

ClassID

ClassKeyName

The key name for the class.

public override string ClassKeyName { get; }

Property Value

string

Remarks

This name the name used by adTempus to identify the class and is intended for programmatic use only. Use the ClassName for a user-friendly name.

ComputerName

The name of the computer where the message originated

public string ComputerName { get; }

Property Value

string

Remarks

This is the actual computer name (plus adTempus instance name, if other than default) and is stored when the message is logged.

For display purposes you should generally use ArcanaDevelopment.adTempus.Client.LogMessage.ComputerNameOrAgentName instead.

See Also
ComputerNameOrAgentName

ExecutionHistoryOID

The OID of the job instance that generated this message, if any

public OID ExecutionHistoryOID { get; }

Property Value

OID

ExecutionHistoryStepOID

The OID of the instance step that generated this message, if any

public OID ExecutionHistoryStepOID { get; }

Property Value

OID

InstanceID

The InstanceID of the instance this message is associated with, if any.

public int InstanceID { get; }

Property Value

int

Remarks

If the message is not associated with a job instance, InstanceID will be 0.

IsAlert

Indicates whether this message represents an Alert

public bool IsAlert { get; }

Property Value

bool

IsDependent

Indicates whether the object is a dependent of (owned by) another object

public override bool IsDependent { get; }

Property Value

bool

Remarks

An independent object (IsDependent is false) is an object that can exist on its own without being part of another object. For example, Jobs, Job Groups, etc.

A dependent object (IsDependent is true) is a part of another object. For example, a JobStep cannot exist independently of a Job, so the JobStep is dependent.

Dependent objects cannot be directly fetched from the server: they are only fetched as part of the object they belong to. They also cannot be saved or deleted independently: they are automatically saved or deleted when the owning object is saved or deleted.

Job

The Job to which this item belongs.

public Job Job { get; }

Property Value

Job

Remarks

The Job may be null if the message is not associated with a particular job or if the job has been deleted from the server (execution history may not be deleted at the same time the job is deleted).

See Also

JobGroupName

The name of the job group containing the job that generated the message, if any

public string JobGroupName { get; }

Property Value

string

JobGroupOID

The OID of the job group containing the job that generated the message, if any

public OID JobGroupOID { get; }

Property Value

OID

JobName

The name of this job this message is associated with

public string JobName { get; }

Property Value

string

Remarks

Even if the message was associated with a job the JobName may be null if the job has been deleted.

JobOID

The OID of the job that generated the message, if any

public OID JobOID { get; }

Property Value

OID

JobQueueName

The name of the job queue containing the job that generated the message, if any

public string JobQueueName { get; }

Property Value

string

JobQueueOID

The OID of the job queue containing the job that generated the message, if any

public OID JobQueueOID { get; }

Property Value

OID

Message

The text of the message

public string Message { get; }

Property Value

string

MessageClass

The class of message this entry represents

public int MessageClass { get; }

Property Value

int

Remarks

The MessageClass will be one of the LogMessageClass values.

MessageCode

The MessageCode of the Message associated with this log message, if any

public string MessageCode { get; }

Property Value

string

MessageID

The ID code of this message

public int MessageID { get; }

Property Value

int

Remarks

Messages generated by adTempus have a MessageID for each kind of message.

Messages generated by scripts or programs run by adTempus will have MessageClass set to SE_USER and the MessageID may not be meaningful.

MessageTimestamp

The date/time the message was logged

[ComVisible(false)]
public DateTimeOffset MessageTimestamp { get; }

Property Value

DateTimeOffset

MessageType

The MessageType of the Message associated with this log message, if any

public MessageType MessageType { get; }

Property Value

MessageType

Remarks

This property is not currently set.

MessageTypeDescription

Gets the text description of the MessageType

public string MessageTypeDescription { get; }

Property Value

string

RecordID

The record ID for this message

public int RecordID { get; }

Property Value

int

Remarks

The record ID is a unique sequential ID for the message.

RemoteAgent

The remote agent this job is associated with

public RemoteAgent RemoteAgent { get; }

Property Value

RemoteAgent

Source

The source of the message

public string Source { get; }

Property Value

string

StepNumber

The step number of the job step this message is associated with, if any.

public int StepNumber { get; }

Property Value

int

Remarks

If the message is not associated with a job step, StepNumber will be 0.

StepOID

The OID of the job step that generated this message, if any

public OID StepOID { get; }

Property Value

OID

UpdateMessageID

The update ID if this message represents a software update notification

public string UpdateMessageID { get; }

Property Value

string

UserID

The ID of the user associated with this message, if any.

public string UserID { get; }

Property Value

string

Methods

Acknowledge(int)

Marks the instance as Acknowledged

public void Acknowledge(int options)

Parameters

NameTypeDescription
options int

Reserved for future use. Set to 0.

Remarks

Marking a message as Acknowledged removes it from the Alerts view in the Console.

The caller must have Execute or Manage permission for the job or for the server if the message is not related to a job.

Exceptions

PermissionDeniedException

Thrown if the caller does not have Execute permission for the job.

See Also

FindOwningObject()

Get the owner of this object based on relationships.

protected override ADTObject FindOwningObject()

Returns

ADTObject

The owning object, or null if the object is not owned by another object or the owner has not been set.

GetObjectDescription()

Gets a description of the object's key settings.

protected override string GetObjectDescription()

Returns

string

Remarks

This method is called by GetDescription() to get a user-friendly description of the object (such as its key settings) for display to the user. The description should contain enough information to distinguish this object from others of the same class.

Refresh()

Reverts the object (and any contained objects) to their last-saved state, discarding any in-memory changes.

public void Refresh()

WriteToConfigurationReport(IADTObjectConfigurationReportWriter)

Writes the object and any contained objects to a configuration report

public override void WriteToConfigurationReport(IADTObjectConfigurationReportWriter reportBuilder)

Parameters

NameTypeDescription
reportBuilder IADTObjectConfigurationReportWriter

The report builder to write the object to.

Inherited Members