Skip to content

Commit

Permalink
Logging format improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottArbeit committed Jul 28, 2024
1 parent a0bb9ca commit 83567de
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Grace.Actors/Branch.Actor.fs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ module Branch =
let duration_ms = getPaddedDuration_ms activateStartTime

log.LogInformation(
"{currentInstant}: Node: {hostName}; Duration: {duration_ms}ms; Activated {ActorType} {ActorId}. BranchName: {BranchName}; {message}.",
"{currentInstant}: Node: {hostName}; Duration: {duration_ms}ms; CorrelationId: ; Activated {ActorType} {ActorId}. BranchName: {BranchName}; {message}.",
getCurrentInstantExtended (),
getMachineName,
duration_ms,
Expand Down
3 changes: 2 additions & 1 deletion src/Grace.Actors/BranchName.Actor.fs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ module BranchName =

override this.OnActivateAsync() =
log.LogInformation(
"{CurrentInstant}: Duration: 0.100ms; Activated {ActorType} {ActorId}.",
"{CurrentInstant}: Node: {hostName}; Duration: 0.100ms; CorrelationId: ; Activated {ActorType} {ActorId}.",
getCurrentInstantExtended (),
getMachineName,
this.GetType().Name,
host.Id
)
Expand Down
2 changes: 1 addition & 1 deletion src/Grace.Actors/Diff.Actor.fs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ module Diff =
let duration_ms = getCurrentInstant().Minus(activateStartTime).TotalMilliseconds.ToString("F3")

log.LogInformation(
"{CurrentInstant}: Activated {ActorType} {ActorId}. {message} Duration: {duration_ms}ms.",
"{currentInstant}: Node: {hostName}; Duration: {duration_ms}ms; CorrelationId: ; Activated {ActorType} {ActorId}. BranchName: {BranchName}; {message}.",
getCurrentInstantExtended (),
actorName,
host.Id,
Expand Down
2 changes: 1 addition & 1 deletion src/Grace.Actors/DirectoryVersion.Actor.fs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ module DirectoryVersion =
let duration_ms = getPaddedDuration_ms activateStartTime

log.LogInformation(
"{currentInstant}: Node: {hostName}; Duration: {duration_ms}ms; Activated {ActorType} {ActorId}. {message}.",
"{currentInstant}: Node: {hostName}; Duration: {duration_ms}ms; CorrelationId: ; Activated {ActorType} {ActorId}. {message}.",
getCurrentInstantExtended (),
getMachineName,
duration_ms,
Expand Down
2 changes: 1 addition & 1 deletion src/Grace.Actors/Organization.Actor.fs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ module Organization =
let duration_ms = getPaddedDuration_ms activateStartTime

log.LogInformation(
"{currentInstant}: Node: {hostName}; Duration: {duration_ms}ms; Activated {ActorType} {ActorId}. {message}.",
"{currentInstant}: Node: {hostName}; Duration: {duration_ms}ms; CorrelationId: ; Activated {ActorType} {ActorId}. {message}.",
getCurrentInstantExtended (),
getMachineName,
duration_ms,
Expand Down
3 changes: 2 additions & 1 deletion src/Grace.Actors/OrganizationName.Actor.fs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ module OrganizationName =

override this.OnActivateAsync() =
log.LogInformation(
"{CurrentInstant}: Duration: 0.100ms; Activated {ActorType} {ActorId}.",
"{CurrentInstant}: Node: {hostName}; Duration: 0.100ms; CorrelationId: ; Activated {ActorType} {ActorId}.",
getCurrentInstantExtended (),
getMachineName,
this.GetType().Name,
host.Id
)
Expand Down
2 changes: 1 addition & 1 deletion src/Grace.Actors/Owner.Actor.fs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ module Owner =
let duration_ms = getPaddedDuration_ms activateStartTime

log.LogInformation(
"{currentInstant}: Node: {hostName}; Duration: {duration_ms}ms; Activated {ActorType} {ActorId}. {message}.",
"{currentInstant}: Node: {hostName}; Duration: {duration_ms}ms; CorrelationId: ; Activated {ActorType} {ActorId}. {message}.",
getCurrentInstantExtended (),
getMachineName,
duration_ms,
Expand Down
3 changes: 2 additions & 1 deletion src/Grace.Actors/OwnerName.Actor.fs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ module OwnerName =

override this.OnActivateAsync() =
log.LogInformation(
"{CurrentInstant}: Duration: 0.100ms; Activated {ActorType} {ActorId}.",
"{CurrentInstant}: Node: {hostName}; Duration: 0.100ms; CorrelationId: ; Activated {ActorType} {ActorId}.",
getCurrentInstantExtended (),
getMachineName,
this.GetType().Name,
host.Id
)
Expand Down
2 changes: 1 addition & 1 deletion src/Grace.Actors/Reference.Actor.fs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ module Reference =
let duration_ms = getPaddedDuration_ms activateStartTime

log.LogInformation(
"{currentInstant}: Node: {hostName}; Duration: {duration_ms}ms; Activated {ActorType} {ActorId}. {message}.",
"{currentInstant}: Node: {hostName}; Duration: {duration_ms}ms; CorrelationId: ; Activated {ActorType} {ActorId}. {message}.",
getCurrentInstantExtended (),
getMachineName,
duration_ms,
Expand Down
2 changes: 1 addition & 1 deletion src/Grace.Actors/Repository.Actor.fs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module Repository =
let duration_ms = getPaddedDuration_ms activateStartTime

log.LogInformation(
"{currentInstant}: Node: {hostName}; Duration: {duration_ms}ms; Activated {ActorType} {ActorId}. {message}.",
"{currentInstant}: Node: {hostName}; Duration: {duration_ms}ms; CorrelationId: ; Activated {ActorType} {ActorId}. {message}.",
getCurrentInstantExtended (),
getMachineName,
duration_ms,
Expand Down
3 changes: 2 additions & 1 deletion src/Grace.Actors/RepositoryName.Actor.fs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ module RepositoryName =

override this.OnActivateAsync() =
log.LogInformation(
"{CurrentInstant}: Duration: 0.100ms; Activated {ActorType} {ActorId}.",
"{CurrentInstant}: Node: {hostName}; Duration: 0.100ms; CorrelationId: ; Activated {ActorType} {ActorId}.",
getCurrentInstantExtended (),
getMachineName,
this.GetType().Name,
host.Id
)
Expand Down

0 comments on commit 83567de

Please sign in to comment.