public InvocationLogCapture(InvocationState invocation) { Invocation = invocation; // Set up an event stream _listener = new ObservableEventListener(); _eventStream = from events in _listener where InvocationContext.GetCurrentInvocationId() == Invocation.Id select events; }
public void Invoking(JobDescription jobdef) { Invoking(InvocationContext.GetCurrentInvocationId(), jobdef.Name, jobdef.Runtime); }
public void Ended() { Ended(InvocationContext.GetCurrentInvocationId()); }
public void DispatchError(Exception ex) { DispatchError(InvocationContext.GetCurrentInvocationId(), ex.ToString()); }
public void Extending(DateTimeOffset newTimeout) { Extending(InvocationContext.GetCurrentInvocationId(), newTimeout.ToString("O")); }
public void Started() { Started(InvocationContext.GetCurrentInvocationId()); }
public void NoEventSource(string jobName) { NoEventSource(InvocationContext.GetCurrentInvocationId(), jobName); }
public void Resumed() { Resumed(InvocationContext.GetCurrentInvocationId()); }
public void Suspended(InvocationResult result) { Suspended(InvocationContext.GetCurrentInvocationId(), DateTimeOffset.UtcNow.ToString("O"), result.Continuation != null ? result.Continuation.WaitPeriod.ToString() : "<UNKNOWN>"); }
public void UnknownStatus(InvocationResult result) { UnknownStatus(InvocationContext.GetCurrentInvocationId(), DateTimeOffset.UtcNow.ToString("O"), result.Result.ToString()); }
public void Faulted(InvocationResult result) { Faulted(InvocationContext.GetCurrentInvocationId(), DateTimeOffset.UtcNow.ToString("O"), result.Exception != null ? result.Exception.ToString() : ""); }
public void Succeeded(InvocationResult result) { Succeeded(InvocationContext.GetCurrentInvocationId(), DateTimeOffset.UtcNow.ToString("O")); }
public void BindingError(Exception ex) { BindingError(InvocationContext.GetCurrentInvocationId(), ex.ToString()); }