cSeverityINFO, WARN, ERROR, FATAL or DEBUG.
AdvPL GuideFWLogMsg(cSeverity, [cTransactionId], cGroup, [cCategory], [cStep], [cMsgId], [cMessage], [nMensure], [nElapseTime], [aMessage])Records a structured Framework log message.
The API standardizes LogMsg with severity, group and correlation fields. Documented severities include INFO, WARN, ERROR, FATAL and DEBUG; debug requires FWLOGMSG_DEBUG configuration. With aMessage in console mode, cMessage is omitted to reduce overload. This example logs only an editorial message without user data, tokens or file contents. Logging is not a business commit. (Sources: refs. 1–1.)
FWLogMsg(cSeverity, [cTransactionId], cGroup, [cCategory], [cStep], [cMsgId], [cMessage], [nMensure], [nElapseTime], [aMessage])cSeverityINFO, WARN, ERROR, FATAL or DEBUG.
cTransactionIdCorrelation ID; LAST reuses the previous one.
cGroupMessage group.
cCategoryMessage category.
cStepProcessing step.
cMsgIdMessage identifier.
cMessageText message, documented 10K limit.
nMensureMessage measurement unit.
nElapseTimeElapsed time supplied by the routine.
aMessageExtra key/value data; affects cMessage in console mode.
Formal return unspecified in the page; unused here.
#Include "Protheus.ch"
User Function Ed435()
// Fictional message without secrets.
FWLogMsg("INFO",,"EDITORIAL",,,"ED435","Editorial review")
Return NilRecord follows LogServer/ConsoleLog configuration if executed. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.