core.medplumclient.setloglevel | Medplum

MedplumClient.setLogLevel() method

Sets the log level for the client.

Signature:

setLogLevel(level: ClientLogLevel): void;

Parameters

Parameter Type Description
level ClientLogLevel The log level to set.

Returns:

void

Example 1

// Basic logging for production

medplum.setLogLevel('basic');

await medplum.searchResources('Patient');

// Output:

// > GET https://api.medplum.com/fhir/R4/Patient

// < 200 OK

Example 2

// Verbose logging for debugging

medplum.setLogLevel('verbose');

await medplum.searchResources('Patient');

// Output includes all headers