General Tip for Formatting Logfiles in Forum Posts

A quick tip with 4 methods for displaying Logfiles in a Forum post:

The Logfiles from the Daml Navigator are useful but are not formatted for easy reading, which is unhelpful when using them within a question or answer.

Post in complete:

5:07:03.141 [da-ui-backend-akka.actor.default-dispatcher-7] INFO  c.d.n.s.platform.PlatformSubscriber ... etc etc etc

Manually insert linebreaks:

5:07:03.141 [da-ui-backend-akka.actor.default-dispatcher-7] INFO\
 c.d.n.s.platform.PlatformSubscriber - Command '2349414276b63aae' \
completed with status 'CommandStatusError(INVALID_ARGUMENT,Invalid argument:\
Command interpretation error in LF-DAMLe: Interpretation error: Error: node NodeId(0) \
(5b500d07f51bfc12c501a88e720e9a4fd34b1aff918a8faa37a27c47bafb84e1:Prescribing\
etc etc etc\

Use a Blockquote:

5:07:03.141 [da-ui-backend-akka.actor.default-dispatcher-7] INFO c.d.n.s.platform.PlatformSubscriber - Command ‘2349414276b63aae’ completed with status ‘CommandStatusError(INVALID_ARGUMENT,Invalid argument: Command interpretation error in LF-DAMLe: Interpretation error: Error: node NodeId(0) (5b500d07f51bfc12c501a88e720e9a4fd34b1aff918a8faa37a27c47bafb84e1:PrescribingPhysician:CommenceConsult) requires authorizers Doctor,Medcentre,Patient, but only Doctor were given. Details: Last location: [DA.Internal.Prelude:378], partial transaction: root node NodeId(0): NodeCreate(ContractId(00fb2177dc86ea67ea125c91abbd0dd2a7019db81608bdd47801cec60fb39dffab),5b500d07f51bfc12c501a88e720e9a4fd34b1aff918a8faa37a27c47bafb84e1:PrescribingPhysician:CommenceConsult,ValueRecord(None,ImmArray((None,ValueParty(Medcentre)),(None,ValueParty(Doctor)),(None,ValueParty(Patient)),(None,ValueRecord(None,ImmArray((None,ValueBool(true)),(None,ValueBool(false)),(None,ValueParty(Johnny Boy)),(None,ValueInt64(3)),(None,ValueDate(2021-10-27)),(None,ValueText(Needs new Right Thumb)),(None,ValueBool(true)),(None,ValueText(Needs walking stick))))))),Simple line of placeholder textSimple line of placeholder text,TreeSet(Doctor, Medcentre, Patient),TreeSet(Doctor, Medcentre, Patient),None,V14).)’. akkaAddress=akka://da-ui-backend, sourceThread=da-ui-backend-akka.actor.default-dispatcher-5, akkaSource=akka://da-ui-backend/user/$a/party-Doctor, sourceActorSystem=da-ui-backend, akkaTimestamp=02:07:03.141UTC

My personal choice; Hidden with Blockquote; Issue in Bold:

Full Navigator.log

5:07:03.141 [da-ui-backend-akka.actor.default-dispatcher-7] INFO c.d.n.s.platform.PlatformSubscriber - Command ‘2349414276b63aae’ completed with status ‘CommandStatusError(INVALID_ARGUMENT,Invalid argument: Command interpretation error in LF-DAMLe: Interpretation error: Error: node NodeId(0) (5b500d07f51bfc12c501a88e720e9a4fd34b1aff918a8faa37a27c47bafb84e1:PrescribingPhysician:CommenceConsult) requires authorizers Doctor,Medcentre,Patient, but only Doctor were given. Details: Last location: [DA.Internal.Prelude:378], partial transaction: root node NodeId(0): NodeCreate(ContractId(00fb2177dc86ea67ea125c91abbd0dd2a7019db81608bdd47801cec60fb39dffab),5b500d07f51bfc12c501a88e720e9a4fd34b1aff918a8faa37a27c47bafb84e1:PrescribingPhysician:CommenceConsult,ValueRecord(None,ImmArray((None,ValueParty(Medcentre)),(None,ValueParty(Doctor)),(None,ValueParty(Patient)),(None,ValueRecord(None,ImmArray((None,ValueBool(true)),(None,ValueBool(false)),(None,ValueParty(Johnny Boy)),(None,ValueInt64(3)),(None,ValueDate(2021-10-27)),(None,ValueText(Needs new Right Thumb)),(None,ValueBool(true)),(None,ValueText(Needs walking stick))))))),Simple line of placeholder textSimple line of placeholder text,TreeSet(Doctor, Medcentre, Patient),TreeSet(Doctor, Medcentre, Patient),None,V14).)’. akkaAddress=akka://da-ui-backend, sourceThread=da-ui-backend-akka.actor.default-dispatcher-5, akkaSource=akka://da-ui-backend/user/$a/party-Doctor, sourceActorSystem=da-ui-backend, akkaTimestamp=02:07:03.141UTC

Hope this helps, happy to see other tips about using the Forum.

2 Likes