Log is a visual console on the page that displays the client side logs of PrimeFaces, for example the details of an Ajax request. Own messages are added with the client side API PrimeFaces.info(), PrimeFaces.debug(), PrimeFaces.warn() and PrimeFaces.error().
<style>
.p-log {
left: 750px;
top: 250px;
}
</style>
<div class="card">
<p:log id="log"/>
<h5 class="mt-0">Client Side API</h5>
<p:commandButton type="button" id="info" value="Info"
onclick="PrimeFaces.info('This is an info message.')" styleClass="mr-2" />
<p:commandButton type="button" id="warn" value="Warn" onclick="PrimeFaces.warn('This is a warn message.')" styleClass="mr-2" />
<p:commandButton type="button" id="debug" value="Debug"
onclick="PrimeFaces.debug('This is a debug message.')" styleClass="mr-2" />
<p:commandButton type="button" id="error" value="Error"
onclick="PrimeFaces.error('This is an error message.')"/>
<h5>Ajax Request</h5>
<h:form id="form">
<h:panelGroup id="grid" layout="block" styleClass="formgrid grid p-fluid">
<div class="field col-12 md:col-6">
<p:outputLabel for="name" value="Name"/>
<p:inputText id="name"/>
</div>
</h:panelGroup>
<p:commandButton value="Submit" update="grid" styleClass="mt-3" />
</h:form>
</div>