# Logs

The POS has two log interfaces: the **in-app Logs screen** (inside the POS application) and the **WP Admin Logs page** (inside WordPress). Together they give you a complete picture of POS activity for debugging and auditing.

<!-- -->

## POS Application Logs[​](#pos-application-logs "Direct link to POS Application Logs")

### Accessing Logs[​](#accessing-logs "Direct link to Accessing Logs")

Open the Logs screen from the left navigation drawer (the heartbeat icon).

### Interface Overview[​](#interface-overview "Direct link to Interface Overview")

#### Search & Filter[​](#search--filter "Direct link to Search & Filter")

* **Search Logs** - Find specific log entries by message content
* **Log Level filter** - Filter by log level (info, warn, error)
* **Display settings** - Configure visible columns

#### Log Table[​](#log-table "Direct link to Log Table")

Each log entry shows:

| Column      | Description                                       |
| ----------- | ------------------------------------------------- |
| **Time**    | When the event occurred                           |
| **Level**   | Severity: info (grey), warn (orange), error (red) |
| **Message** | Human-readable description of the event           |
| **Context** | Expandable JSON with additional details           |
| **Code**    | Error code (links to documentation)               |

### Log Levels[​](#log-levels "Direct link to Log Levels")

#### Info (Grey)[​](#info-grey "Direct link to Info (Grey)")

Normal operations and successful events:

* "Fetched all IDs for products"
* "Synced new customers"
* "Fetched all IDs for taxes"

#### Warning (Orange)[​](#warning-orange "Direct link to Warning (Orange)")

Non-critical issues that may need attention:

* "Unable to refresh session"
* "Retry attempt for sync"

#### Error (Red)[​](#error-red "Direct link to Error (Red)")

Problems that need to be addressed:

* "Sorry, you cannot list resources" (permission issue)
* "API request failed"
* "Database sync error"

#### Audit (Blue)[​](#audit-blue "Direct link to Audit (Blue)")

The audit log level records database changes made by the POS, capturing the full before-and-after state of each modification. This is useful for tracking exactly what changed and when, for example during order creation, stock adjustments, or customer updates.

Audit entries include:

* **Entity type** - The resource that was modified (e.g., order, product, customer)
* **Action** - The type of change (create, update, delete)
* **Before state** - The previous values before the change
* **After state** - The new values after the change

### Context Data[​](#context-data "Direct link to Context Data")

Click the expand arrow on any log entry to see detailed JSON context:

```
{

  "total": "6",

  "execution_time": "54.79 ms",

  "server_load": "[10.51, 10.42, 9.98]"

}
```

This data includes:

* **Item counts** - How many records were affected
* **Execution time** - How long the operation took
* **Server load** - Server performance metrics
* **Request/response details** - For debugging API issues

### Error Codes[​](#error-codes "Direct link to Error Codes")

Many log entries include an **error code** (e.g., `API02004`, `DB01001`). These codes link directly to the [Error Codes](/error-codes/.md) documentation, which provides:

* Detailed explanation of the error
* Common causes
* Troubleshooting steps

### Common Log Entries[​](#common-log-entries "Direct link to Common Log Entries")

#### Sync Operations[​](#sync-operations "Direct link to Sync Operations")

```
[info] Fetched all IDs for products    {...} 3 items

[info] Synced new customers            {...} 1 item

[info] Fetched all IDs for taxes       {...} 3 items
```

These indicate normal sync activity. The context shows how many items were synced.

#### Permission Errors[​](#permission-errors "Direct link to Permission Errors")

```
[error] Sorry, you cannot list resources    {...} API02004
```

This usually means the user doesn't have permission to access a resource. Check user roles in `WP Admin > POS > Settings > Access`.

#### Session Issues[​](#session-issues "Direct link to Session Issues")

```
[warn] Unable to refresh session    {...} API02007
```

The POS couldn't refresh the authentication session. This may require logging out and back in.

## WP Admin Logs Page[​](#wp-admin-logs-page "Direct link to WP Admin Logs Page")

The POS plugin also provides a server-side Logs page in the WordPress admin area. This page shows POS-specific warnings and errors logged on the server, which can help diagnose issues that may not appear in the POS application itself.

### Accessing the WP Admin Logs Page[​](#accessing-the-wp-admin-logs-page "Direct link to Accessing the WP Admin Logs Page")

Navigate to **WP Admin > POS > Settings**, then select the **Tools** tab and click **Logs**.

### Unread Badge[​](#unread-badge "Direct link to Unread Badge")

The Logs menu item displays a badge indicating unread log entries:

* **Red badge** - There are unread error-level entries
* **Amber badge** - There are unread warning-level entries (but no errors)

Visiting the Logs page resets the unread counts. The counts are tracked per-user, so each admin sees their own unread status.

### Filtering Entries[​](#filtering-entries "Direct link to Filtering Entries")

Use the level filter to narrow down log entries:

* **All** - Show all log entries
* **Errors** - Show only error-level entries
* **Warnings** - Show only warning-level entries

### Expandable Entries[​](#expandable-entries "Direct link to Expandable Entries")

Long log messages are truncated at approximately 100 characters. Click on an entry to expand it and see the full message along with any additional context data.

### Pagination[​](#pagination "Direct link to Pagination")

Log entries are paginated server-side. Use the pagination controls to navigate through older entries.

### Fatal Errors Banner[​](#fatal-errors-banner "Direct link to Fatal Errors Banner")

If the server has `fatal-errors-*.log` files, the Logs page displays a warning banner at the top. This banner links to **WooCommerce > Status > Logs** where you can view the full fatal error logs. Fatal errors are typically PHP-level crashes that prevent the POS API from responding.

## Using Logs for Support[​](#using-logs-for-support "Direct link to Using Logs for Support")

When requesting support:

1. **Reproduce the issue** - Perform the action that causes the problem
2. **Check the logs** - Look for errors (red) or warnings (orange)
3. **Expand the context** - Get the full JSON details
4. **Note the error code** - Include this in your support request
5. **Copy relevant entries** - Share the log messages with context

## Performance Monitoring[​](#performance-monitoring "Direct link to Performance Monitoring")

Logs include execution time and server load metrics. If you notice:

* **High execution times** - Server may be overloaded or slow
* **High server load values** - Consider server optimisation
* **Frequent timeouts** - Check network connectivity

## Related Documentation[​](#related-documentation "Direct link to Related Documentation")

[Error CodesDetailed error explanations](/error-codes/.md)

[TroubleshootingCommon issues and solutions](/category/troubleshooting.md)

[SupportGetting help](/support/.md)
